Reporting test results
Test results that output in JUnit and Maven Surefire XML formats will be automatically detected by the pipelines. Bitbucket Pipelines then displays any failed test results in a Tests tab. Successful executions can be shown in the log view in the Build tab. Let’s see how to set this up.
Getting ready
When setting up test reporting, make sure the test results are generated in one of the following locations:
./**/
surefire-reports/**/*.xml
./**/
failsafe-reports/**/*.xml
./**/
test-results/**/*.xml
./**/
test-reports/**/*.xml
./**/
TestResults/**/*.xml
Let’s now take a look at how to configure testing results on the pipeline.
How to do it…
Depending on the language, there are a number of different steps to follow to generate test results. Let’s look at each method:
- If you are using the Maven Surefire Plugin in your Maven build job, no special configuration is needed.
- If you are using PHP...