-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconclusive test cases in NUnit theories yield test step failures #162
Comments
Hi @moonshinebot. And thanks a lot for the detailed description and clear explanation! I have marked this issue as an improvement rather than a bug because we're running That said, I think it's a good idea to implement something in test-runner that will run a check and filter the results like you suggested. We're open to PRs for anyone who'd like to take this on. |
Bug description
When using NUnit's
TheoryAttribute
(https://docs.nunit.org/articles/nunit/writing-tests/attributes/theory.html) together with assumptions, it is normal that some test cases of a theory yield an "inconclusive" test result. This is expected, and inconclusive theory results should be filtered out from normal test results, as the NUnit documentation states:However, it seems that Unity returns exit code
2
when having inconclusive tests, and thereforerun_tests.sh
marks the run illegally as failed, here:unity-test-runner/dist/steps/run_tests.sh
Line 96 in cdfccd0
Instead, the step should not be marked as failed at this point, since it leads to a workflow failure, but detection of the final result should be deferred to the test evaluation step.
How to reproduce
Set up a test project having at least one NUnit theory test, similar to this:
This will create three test cases, two of which run successful, and one which runs without conclusion (so neither success nor failure). While the game.ci test report shows 2 successful tests of a total of 3 tests, and no failure, the test step is marked as failure due to the return code emitted by Unity.
The text was updated successfully, but these errors were encountered: