I'm struggling to make test reporting work on Bitbucket Pipelines.
- My maven project defines a couple of JUnit tests.
- Test reports are generated by maven surefire plugin on the right place at first glance.
This is an excerpt of my pipelines log:
+ ls -lia target/surefire-reports/*.xml
5522980 -rw-rw-rw-. 1 root root 62399 Jul 15 15:54 target/surefire-reports/TEST-ut.com.nolddor.capgras.rest.model.SwitchAuthorizationTest.xm
Which looks like good, as xml reports are located in one of the default scanned paths following the documentation:
Configuring test reporting
To enable test reporting, make sure that build test reports are generated in one of the supported default locations (with a directory depth of 3 levels):./**/surefire-reports/**/*.xml
The test report file scanner will begin searching from the base directory of your build:
Configuring test runners
Maven Surefire / Failsafe plugins
For Maven build jobs, no special configuration is required if you are using Maven Surefire Plugin or Maven Failsafe Plugin. The reports are automatically generated when the unit or integration maven test goals are executed.
Thank you for the detailed description. It was very helpful!
Once I read It I went right away to test it myself and observe the same behavior. Which is:
If the test passes
You will only see them reported in the left panel beside the pipeline step name.
If the test fails
You will see a new tab with the reports for the tests that failed.
My first glance was to check our docs to see if this information was available there and it was:
Note: the Tests tab will only show if you have failed tests to review.
I guess I learned something today =]
Please confirm if this is the same scenario you see there otherwise we will need to investigate this a bit further.
Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster ! While we’re all excited about the new improvements to Bitbucket ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events