Unit test execution for automated testing
In the PetClinic
example, unit tests are written in JUnit. Unit test cases individually and independently verify specific methods of an application. In build definition Maven tasks, the test configuration was kept as default.Â
After executing the build successfully, we can go to Explorer
tab and click on the Tests
links in the build execution logs to get more details on the test execution.
Verify the total number of tests, the passed and failed percentage, and the duration of test execution:
To get more details, click on the Test
link on the top bar. Click on the Test runs
.Â
Verify the Completed
status of the test run in the Recent test runs
. Double click on the entry:
We will get the summary, run type, build version number, and outcome in the form of a chart showing passed and failed test results. In the following chart, it shows that all 41 unit tests have been executed successfully:
Click on the Test results
tab to get results based on unit tests available...