-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Tests which are expected to fail / known broken #224
Comments
Spock is a Java ecosystem testing framework maintained by @leonard84. I has a
Instead of using special @leonard84 What's your opinion about using special status for these cases? |
What does it mean for a test to be aborted? There are two mesonbuild statuses which might be possible to interpret as aborted:
Is "aborted" intended as a kind of catchall? If Spock is treating expected failures that are ignored, by mapping them to "aborted", then that indicates that aborted tests are not considered errors at all, which means my assumption about what to use "aborted" for was completely off base! |
We should definitely define these statuses clearly and explicitly! In JUnit, "aborted" is similar to "skipped". While "skipped" means there was a condition that prevented the test from even being started (could be as simple as explicitly ignoring a test, checking for an env var, etc.), "aborted" means the test was started but during execution the test code decided that it couldn't complete, e.g. because of a more complicated condition that could only be evaluated midway. |
That's an interesting definition... Test frameworks such as python unittest/pytest allow marking a test as SKIP either by decorating the test definition with some condition evaluated during collection, such as an environment variable, or by raising a Test frameworks such as GNU automake or Meson don't operate by testing functions at all -- instead they collect and track test programs, and expect a test program to signal whether it gets skipped. I guess those always count as "ABORTED to use your terminology, since there's no actual way to prevent a test from even starting, and the test protocol doesn't have a way to signal whether the test program decided to signal a SKIP based on checking an env var in ... With regard specifically to mapping xfail -> aborted. Reporters which use the term "xfail" traditionally consider this important to draw attention to because xfail tests indicate missing functionality which isn't a regression from the previous state of the code. When running the tests to see what shape the project is in, you want to be able to see on the dashboard that they do need fixing and maybe you should go ahead and fix them if you can / have time, you just don't want to e.g. gate CI on those failures. I wouldn't want to have them be intermingled together with tests that signaled halfway through their execution that the feature being tested isn't available on the current system and therefore cannot be unit-tested. So I would definitely recommend adding new special statuses for this. |
Cross-post from pytest-dev/pytest#13045
It appears that there isn't currently a provision for this. Various testing frameworks support this status (off the top of my head this includes at least GNU Automake, the Test Anything Protocol, Pytest, and the Meson Build System).
I'll quote GNU Automake's manual page on "Generalities about testing" because IMHO the GNU project is, as usual, very expressive about the reasoning behind concepts. Paragraph 2 is key here:
https://www.gnu.org/software/automake/manual/html_node/Generalities-about-Testing.html
They are usually called XFAIL and XPASS (though meson calls them EXPECTEDFAIL and EXPECTEDPASS).
Both should be reported as distinct from regular passes/failures.
The text was updated successfully, but these errors were encountered: