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?
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?
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
Thanks a lot for your reply. I had to mute the unit test script completely to not receive any return code at all.
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.
After some debugging the reason was found in depraction warning which return non-zero result also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the update, Miroslav. A non-zero exit code would indeed cause the step to fail.
We have a feature that allows a pipeline to continue with the next steps if a certain step fails. If you'd be interested in that, you can check the feature's documentation here:
Otherwise, you'd need to adjust the test script so that it doesn't return a non-zero exit code in case of warnings (if this is how you'd like the script to behave).
Kind regards,
Theodora
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.