You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
Currently running unit tests from the terminal only prints the test results to the terminal source link. If there are any failing unit tests, the user needs to examine the printed xml for any errors. The exit status will always remain 0 (succeeded).
For example running
./ml localtest
will only return an exit status of 0 despite whether a unit test failed or not.
Use case
Returning an exit status for the unit tests would be valuable to automated builds of a project so that a build will fail a unit test fails.
Potential solution
One potential way to return the exit status based on the success of unit tests would be to parse the XML output from the test script, /test/default.xqy, and check if the "errors" or "failures" attributes in the testsuite element is anything but 0.
I plan on writing a solution for my local project. Let me know if you would like me to submit a pull request.
The text was updated successfully, but these errors were encountered:
Exit status always 0 for unit tests
Currently running unit tests from the terminal only prints the test results to the terminal source link. If there are any failing unit tests, the user needs to examine the printed xml for any errors. The exit status will always remain 0 (succeeded).
For example running
will only return an exit status of 0 despite whether a unit test failed or not.
Use case
Returning an exit status for the unit tests would be valuable to automated builds of a project so that a build will fail a unit test fails.
Potential solution
One potential way to return the exit status based on the success of unit tests would be to parse the XML output from the test script, /test/default.xqy, and check if the "errors" or "failures" attributes in the testsuite element is anything but 0.
I plan on writing a solution for my local project. Let me know if you would like me to submit a pull request.
The text was updated successfully, but these errors were encountered: