Maven plugin

AssertThat - BDD & Cucumber for Jira provides a Maven plugin to enable integration with your automated test framework.

Download Feature files - downloadFeatures

The scenarios and feature files can be downloaded from the plugin into your automation test framework using the plugin provided. In addition to using tags to filter the scenarios for execution, the plugin provides 3 optional fields:

Upload test results (cucumber json file) into AssertThat - submitReport

The AssertThat - BDD Test Automation in Jira will parse the results of the cucumber json file and load them so that the results can be viewed in Jira alongside the user stories - Test Execution status for User Stories. The automated test results will automatically be linked to existing defects and the results loaded into the reporting tool. The failed tests can then be easily reviewed and assigned for further analysis - Automated Test Report Analysis.

Mandatory fields

The only mandatory field required is the projectId. The following parameters are also required however can be passed as environment variables - ASSERTTHAT_ACCESS_KEY and the ASSERTTHAT_SECRET_KEY. All 3 parameters are available from the AssertThat Configuration page - AssertThat Configuration.

Usage

We recommend running cucumber tests on integration-test phase as

  • download features is running on pre-integration-test phase

  • report submission on post-integration-test

Example project

Refer to example project assertthat-bdd-maven-example

pom.xml

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 <plugin> <groupId>com.assertthat.plugins</groupId> <artifactId>assertthat-bdd-maven-plugin</artifactId> <version>1.6.3</version> <configuration> <projectId> <!--Jira project id e.g. 10001--> </projectId> <!--Optional can be supplied as environment variable ASSERTTHAT_ACCESS_KEY --> <accessKey> <!-- ASSERTTHAT_ACCESS_KEY --> </accessKey> <!--Optional can be supplied as environment variable ASSERTTHAT_SECRET_KEY --> <secretKey> <!-- ASSERTTHAT_SECRET_KEY --> </secretKey> <!-- Used for jira server integration only. If using cloud remove this option--> <jiraServerUrl>https://mycompanyjira.com</jiraServerUrl> </configuration> <executions> <execution> <configuration> <!--Optional - default ./features--> <outputFolder>src/test/resources/com/assertthat/features</outputFolder> <!--Optional - all features downloaded by default - should be a valid JQL--> <jql>project = XX AND key in ('XXX-1')</jql> <!--Optional - default automated (can be one of: manual/automated/both)--> <mode>automated</mode> <!--Optional - tag expression filter for scenarios. More on tag expressions https://cucumber.io/docs/cucumber/api/#tag-expressions--> <tags>(@smoke or @ui) and (not @slow)</tags> </configuration> <id>features</id> <goals> <goal>features</goal> </goals> <phase>pre-integration-test</phase> </execution> <execution> <id>report</id> <goals> <goal>report</goal> </goals> <phase>post-integration-test</phase> <configuration> <!--Optional - default ./report--> <jsonReportFolder>target/report/surefire-reports/cucumber/</jsonReportFolder> <!--Optional - default - **/*.json --> <jsonReportIncludePattern>**/cucumber.json</jsonReportIncludePattern> <!--Optional - default cucumber (can be one of: cucumber/karate)--> <type>cucumber</type> <!--Optional - all Jira tickets will be updated with test results by default; when JQL is provided only filtered tickets will be updated --> <jql>project = XX AND key in ('XXX-1')</jql> </configuration> </execution> </executions> </plugin>