Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

test management not works in golang

Ambrose Qiu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2026

截圖 2026-03-11 下午3.10.46.png截圖 2026-03-11 下午3.10.34.png截圖 2026-03-11 下午3.09.54.png

 

- 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 !

1 answer

0 votes
Himanshu Tiwary
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 11, 2026

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.

Ambrose Qiu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 14, 2026

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.

Himanshu Tiwary
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 14, 2026
Hi Ambrose,
 
Thanks for your response.
You mentioned that you already generated the test-output in the JUnit XML format and configured it correctly. However, the issue seems to be that Bitbucket Pipelines only shows the test results when the JUnit XML file is located in a supported folder. Please double-check if the test-results folder is within the pipeline's workspace, and ensure it is in a directory that Bitbucket expects (for example, under a folder like /artifacts/test-results/).
 
It might also help to explicitly set the path for the JUnit report in the Bitbucket Pipeline configuration file to ensure the pipeline can access it. For example:
 
  - step:
      name: Run Tests
      script:
        - ./gradlew test
      artifacts:
        - test-results/**/*.xml
 
Make sure the artifacts section points to the directory where the XML file is being generated.
 
If the test results are passing and the report is in the correct folder, the issue may lie in how the pipeline is outputting results in the UI, which could sometimes take a moment to refresh.
 
Please also check that the format of the JUnit XML file matches Bitbucket's requirements (e.g., the correct XML tags). If the issue persists, feel free to share more specifics on how your pipeline is set up and where the results are stored.
 
Let me know if this resolves your issue! Also an up vote will be appreciated 
Like Ambrose Qiu likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events