/
BDD Implementation

BDD Implementation

Overview

Enterprise teams practicing Behavior-Driven Development (BDD) can author, store and sync features files directly to/from Version Control Systems (VCS) like SVN, Git, GitLab, Bitbucket and Azure DevOps, using the built-in Gherkin editor in QMetry requirements. The two-way syncing between QMetry & VCS keep developers, testers and product owners up-to-date with the latest source code change commits with automated step definitions. Using QMetry automation agents, test executions could be triggered directly from QMetry. Test cases are smartly created/reused authored based on the feature step definitions and link them to requirements. Test Suite stores the automation execution results ensuring complete feature traceability with requirements.

How the use of BDD Code with Requirements help maintain quality

Organizations inject BDD (Behavior-driven Development) techniques to continuously maintain the quality of product. BDD scenarios align development and testing teams to a common goal. The Automation team transforms the provided usage scenarios into tests. The test run results are then analyzed that enable developers to develop and deliver the functionality as expected.

Workflow

  • Test Scenarios for upcoming features are written in Gherkin language by a Business Analyst or scenario writer.

  • Once finalized, the code is pushed to the repository configured with QMetry project.

  • Automation Engineers receive notification on updates of BDD Code. You can select multiple

  • At the time of test execution, the automation engineers get the latest code from the repository and use it to run automation testing.

  • On completion of the test process -

    • automated test cases, test suites, test executions are created in QMetry

    • the automation test results are updated on the Test Execution screen

Pre-requisites

Users should have the following rights in QMetry:

  • Project module "Modify" rights

  • Requirement module "Modify" rights

Users can write BDD Code in -

  • QMetry

  • QMetry Jira Add-on

Configure BDD in QMetry

Steps

1. Go to Projects > Project / Release / Cycle.

2. Open the Project details page and open the BDD Configuration tab on it.

3. Click on the + sign to add BDD Configuration.

4. The Add Configuration screen opens. Enter the following details on it:

  • Version Control System: Select the version control system your organization is using as code repository.

  • Type: The field appears on the screen when GIT/Bitbucket/GitLab/Azure DevOps is selected as the Version Control System. Select the edition of the GIT/Bitbucket/GitLab/Azure DevOps i.e. Cloud or Server.

Git Integration

  • Repository URL: Enter the Repository URL for the version control system selected above. Enter Access Token. Follow these steps to generate access token for GitHub.

GitLab Integration

The Add Configuration screen opens. Enter the following details on it:

  • Version Control System: Select GITLAB as the version control system your organization is using as code repository.

  • Type: Select the edition of the GitLab i.e. Cloud or Server.

  • Repository URL: Enter the Repository URL for the version control system selected above.

  • Enter Access Token. Follow these steps to generate access token for GitLab. Provide all the Scopes access.

5. After entering details regarding the Version Control System above, click Test to verify the provided Repository credentials.

6. Once the Test is verified successfully, click Save to save the repository details in QMetry.

The configured version control system for BDD is displayed on the BDD Configuration tab.

To edit the configuration details, click on the Edit button.

To delete the configuration with the project, click on the Delete button.

Bitbucket Integration

The Add Configuration screen opens. Enter the following details on it:

  • Version Control System: Select BITBUCKET as the version control system your organization is using as code repository.

  • Type: The field appears on the screen when GIT/Bitbucket is selected as the Version Control System. Select the edition of the GIT/Bitbucket i.e. Cloud or Server.

  • Repository URL: Enter the cloned Repository URL for Bitbucket.

      → Steps to generate the cloned URL in Bitbucket:

1. Log into Bitbucket and clone the repository.

2. Copy the cloned repository URL and paste it in QMetry.

  • Username, Password: Enter User Name and Password for the Repository. For Bitbucket Cloud, users need to generate the App Password. Read more about How to generate the App Password below.

 

→ How to generate the App Password for Bitbucket Cloud?

1. Log into Bitbucket and go to User Profile > Personal Settings.

2. On the Personal Settings screen, click on App passwords under Access Management.

3. Click on the Create app password button to create a new app password.

4. The Add app password screen opens. Enter Label, choose permissions to be granted and then click Create to create a password with defined permissions.

5. The New app password window pops up showing the password.

After entering details regarding the Version Control System above - Git or GitLab or Bitbucket, follow the steps mentioned below.

1. Click Test to verify the provided Repository credentials.

2. Once the Test is verified successfully, click Save to save the repository details in QMetry.

The configured version control system for BDD is displayed on the BDD Configuration tab.

To edit the configuration details, click on the Edit button.

To delete the configuration with the project, click on the Delete button.

Azure DevOps Integration

The Add Configuration screen opens. Enter the following details on it:

  • Version Control System: Select AZUREDEVOPS as the version control system your organization is using as a code repository.

  • Type: Select the edition of the Azure DevOps i.e. Cloud or Server.

  • Repository URL: Enter the cloned Repository URL for Azure DevOps.

Steps to generate the cloned URL in AzureDevOps: