...
download features is running on
pre-integration-test
phasereport submission on
post-integration-test
Alternatively, if you are running your tests on test
phase, then change features and report phases as follows
download features is running on
generate-test-resources
phasereport submission on
test
Example project
Refer to example project assertthat-bdd-maven-example
...
Code Block | ||
---|---|---|
| ||
<plugin> <groupId>com.assertthat.plugins</groupId> <artifactId>assertthat-bdd-maven-plugin</artifactId> <version>1.67.3<0</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> <!--Optional - default cucumber (can be one of: cucumber/karate)--> <type>cucumber</type> <!--Optional - whether the phase is enabled (default is true)--> <enabled>true</enabled> <!--Optional - prepend ordinal to feature file name on download (default is true)--> <numbered>true</numbered> </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> <!--Optional - whether the phase is enabled (default is true)--> <enabled>true</enabled> </configuration> </execution> </executions> </plugin> |