Menu

Scenario Automation Config & Execution

Configure BDD Framework with Maven

You need to follow these steps to configure and execute a running automation:

  1. Go to JIRA, select qTest Scenario > User Setting from Menu bar.
  2. Click Generate API Key to create a new API Key.
  3. Select Build tool as Maven, then copy the generated script. New update: In qTest Scenario version 1.0, we have just added a new tag (<qtest_release><!-- Put qtest release id here (for example: RL-1) --></qtest_release>) to allow user to specify the Release for execution.
  4. Go to Eclipse and open your Maven project.
  5. Open the POM file and enter the following information:
    • Paste the script copied in step 2 into the POM file.
    • Note: the script generated from JIRA doesn't contain the destinationDirJIRA jql and JIRA Feature ID; you need manually enter these values. 
      • destinationDir: the folder to execute the test.
      • JIRA jql: the jql to filter the Feature tickets in JIRA.
      • JIRA Feature ID: the ID of Feature ticket in JIRA. System will combine the results of JIRA jql and JIRA Feaure ID list to get all appropriate Features to run.
  6. Open the java file to configure certain execution options and check if the features option within @CucumberOptions is pointing to the feature folder to execute the test.

IMPORTANT: This is the same folder as you config at step 5 in <DestinationDir>.

e.g:

Execute With Maven Command Line

Run the following commands to execute Features:

  1. Open the windows command line. Use the cd command to point to BDD Framework location. Execute Maven.
  2. Use the following commands to execute a specific action:
    • >mvn qtestscenario:prepare-test // To retrieve the declared Feature files to destination folder.

      >mvn test // To execute the test and push executed results to your server.

      >mvn qtestscenario:prepare-test test // To retrieve Features and execute the test. So, instead of doing the two above commands one by one, you can use this command to save time.

      >mvn qtestscenario:prepare-test test -Dcucumber.options="--tags @<tag value>" // This one also retrieves and executes like the third one, but it only executes Features or Senarios with specified tags. e.g mvn qtestscenario:prepare-test test -Dcucumber.options="--tags @negative_cases.
  3. After the execution is completed, you can view the result in the Execution Tracking pane on Jira.

 

 

Subscribe To Our Blog
Powered by Zendesk