Tutorials showcasing the integration between Gradle and Xray Test Management.
Each folder contains a project that can be built using Gradle (and also Maven, just for reference). There are examples both for JUnit (4 and 5) and TestNG. A basic test class example is provided showcasing the chosen testing framework built-in capabilities (i.e., using only the built-in XML report provided by that framework). Besides, there's also an enhanced example that uses specific extensions for Xray, allowing users to embed additional information during the execution of the tests.
- junit4_basic: some tests implemented using JUnit 4.13.x, generating a "standard" JUnit XML report
- junit5_basic: some tests implemented using JUnit 5, generating a "standard" JUnit XML report
- junit5_enhanced: some tests implemented using JUnit 5, using annotations and other capabilities from xray-junit-extensions, generating an enhanced JUnit XML report that Xray can process
- testng_basic: some tests implemented using TestNG 7.6.x, generating a "standard" TestNG XML report
- testng_enhanced: some tests implemented using TestNG 7.6.x, using annotations and other capabilities from xray-testng-extensions, generating a enhanced TestNG XML report that Xray can process
In order to run this tutorial you need to have Java 11+ and Gradle 7.4.2+.
Tests can be executed locally with the following command
gradle clean compileJava test
To generate the enhanced TestNG XML report that Xray can process (as shown on testng_enhanced), we need to run the tests with a custom task. For more info, check build.gradle.
gradle clean compileJava testngTest
Results can be submitted to Jira so that they can be shared with the team and their impacts be easily analysed using Xray Test Management.
For Xray on Jira Cloud, depending on the testing framework used, one of the following tasks is available in these examples:
gradle importJunitResultsToXrayCloud
gradle importTestNGResultsToXrayCloud
For Xray on Jira server/datacenter, depending on the testing framework used, one of the following tasks is available in these examples:
gradle importJunitResultsToXrayDC
gradle importTestNGResultsToXrayDC
Any questions related with this code, please raise issues in this GitHub project. Feel free to contribute and submit PR's. For Xray specific questions, please contact Xray's support team.