2.1 KiB
2.1 KiB
Key CI/CD/Jenkins Concepts and their Usage
Displaying JUnit and JaCoCo Test Results
- Configure the
gradle-initializrproject to parse the JUnit XML results for unit test. The files can be found in the directorybuild/test-results/test. - Execute the build twice to generate a graph. Have a look at the executed tests in the test results.
- Include all test results (unit and integration tests) in the reporting.
- Have a look at how the test result trend changes.
- Install the JaCoCo plugin.
- Reconfigure the Gradle build step to also generate JaCoCo reports:
clean build jacocoTestReport jacocoIntegrationTestReport. - Add a post-build action for publish the JaCoCo reports. Use the following path to look for results:
build/jacoco/**.exec. - Execute the build twice to generate a graph. Have a look at the code coverage results.
Show Solution
Publish the JUnit reports by pointing to the exact directory containing the XML files.
After executing the build twice you will see a test result trend graph.
Publish the JUnit reporting by using a wild card.
The trend changes accordingly.
Install the JaCoCo plugin.
Change the task list executed by the Gradle build step.
Configure JaCoCo reporting.
The JaCoCo coverage trend renders after executing the build twice.
You can drill into the details of the report.








