- I wrote a simple custom pipeline to generate unit test output
- I add a dummy test to make the pipeline failed since the topic said only failed test would shown on test tab but the tab still empty
- no self-hosted pipeline were set in the configuration
- my workspace is on standard plan
- i read most topic about this new feature but didn't help
Big thanks for any support !
Hi @Ambrose Qiu ,
This is most likely not a Golang issue, but a Bitbucket test reporting behavior.
Bitbucket Pipelines only shows test results when your build generates a JUnit XML report in a supported folder such as test-results or test-reports. So for Go, it’s not enough to just run go test — you usually need to convert the output into JUnit format first.
Also, one confusing detail: in the pipeline step view, the Tests tab only appears when there are failed or errored tests. If all tests pass, Bitbucket may still process the report, but it won’t show that tab in the same way.
For Go, the usual approach is something like:- go test -v ./... 2>&1 | go-junit-report > test-results/junit.xml
So I’d check:
that the report is really being generated as JUnit XML
that it is saved under test-results/ or test-reports/
and that the pipeline log shows Bitbucket detecting the file
If your tests are passing, that may explain why you don’t see much in the UI even though the report is there.
If this helped, I’d appreciate a Kudos.
Thanks for your help. Based on my current understanding, I believe I have already covered the points you mentioned.
I already converted the Go test output into a supported JUnit XML format using gotestsum.
I also intentionally added a failing test, since I understand that only failed tests are shown in the Tests tab.
However, the Tests tab is still empty, which is why I’m confused.
From the screenshots I shared, it seems that I already tried both generating JUnit XML output and making the pipeline fail on purpose, but I still could not get the expected result.
So I’d like to ask whether there might be any other requirement, limitation, or configuration that I may have missed.
Thanks again for your support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.