Configure BDD Framework with Maven
You need to follow these steps to configure and execute a running automation:
- Go to JIRA, select qTest Scenario > User Setting from Menu bar.
- Click Generate API Key to create a new API Key.
- 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.
- Go to Eclipse and open your Maven project.
- 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 destinationDir, JIRA 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.
IMPORTANT: This is the same folder as you config at step 5 in <DestinationDir>.
Execute With Maven Command Line
Run the following commands to execute Features:
- Open the windows command line. Use the cd command to point to BDD Framework location. Execute Maven.
- 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.