Pipeline fails even if PHPUnit tests pass

Miroslav Kodet
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!
February 20, 2025

PHPUnit tests pass (with warnings) and pipeline fails:

Searching for test report files in directories named [test-results, failsafe-reports, test-reports, TestResults, surefire-reports] down to a depth of 4
Found matching test report file /opt/atlassian/pipelines/agent/build/test-reports/junit.xml
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 5 tests, with 0 failures and 0 errors.
Located test suite containing 2 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 3 tests, with 0 failures and 0 errors.
Located test suite containing 2 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 2 tests, with 0 failures and 0 errors.
Located test suite containing 2 tests, with 0 failures and 0 errors.
Located test suite containing 3 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 12 tests, with 0 failures and 0 errors.
Located test suite containing 4 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 3 tests, with 0 failures and 0 errors.
Located test suite containing 4 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 3 tests, with 0 failures and 0 errors.
Located test suite containing 2 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 4 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 7 tests, with 0 failures and 0 errors.
Located test suite containing 5 tests, with 0 failures and 0 errors.
Located test suite containing 2 tests, with 0 failures and 0 errors.
Located test suite containing 2 tests, with 0 failures and 0 errors.
Located test suite containing 3 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 2 tests, with 0 failures and 0 errors.
Located test suite containing 1 tests, with 0 failures and 0 errors.
Located test suite containing 2 tests, with 0 failures and 0 errors.
Located test suite containing 2 tests, with 0 failures and 0 errors.
Located test suite containing 2 tests, with 0 failures and 0 errors.
Located test suite containing 3 tests, with 0 failures and 0 errors.
Finished scanning for test reports. Found 1 test report files.
Merged test suites, total number tests is 98, with 0 failures and 0 errors.
Uploading test results
Finished uploading test results.

 

OK, but there were issues!
Tests: 98, Assertions: 339, Warnings: 2.

 

what could be the problem? Retun code? 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 21, 2025

Hi Miroslav and welcome to the community!

Is there any error on the build's page, in the column right next to the build log, like in the screenshot below?

671a0464-5813-4504-82d3-0eb193a253a9.png

If not, and if all the commands of that step run, then I believe the most likely reason is that the last command returns a non-zero exit code.

If you have Docker installed on your computer, you can troubleshoot the failed step locally with Docker as per the following guide:

While on Step 5, after you run all the commands of your step, you can use the command echo $? to check what exit code the last command returns.

Kind regards,
Theodora

Suggest an answer

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

Atlassian Community Events