-
Notifications
You must be signed in to change notification settings - Fork 18
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
Standard for test status #4
Comments
Here's an initial attempt at a matrix:
Please advise me of updates as needed (or edit this comment yourself). |
Jasmine has |
@slackersoft: Thanks! Does Jasmine have anything for "Inconclusive" or "Global Error"? |
Jasmine tries to catch all errors unless you explicitly tell it not to, in which case they bubble all the way out and stop the entire run, so they just become uncaughtExceptions. I'm not totally sure what Inconclusive means. The only other real state jasmine has is a spec with no expectations at all, but that isn't reported as a unique state, but as |
Inconclusive is based on the TODO status from the TAP spec (do a find for "TODO tests") but it is a weird one to me as well. Essentially, I read it as "a test is annotated such that any failures/errors will not count as failures to the test/suite/run". |
Buster also uses |
Updated.
I broke out all of the distinct types of status that can occur, mostly in order to see if any of the frameworks thought them worthy of distinction. From the data gathered so far, only Jasmine treats "pending" and "skipped" tests differently. |
@cjohansen: Does Buster have anything resembling the "Inconclusive" status? I'm actually assuming that none of our frameworks will but I'd like to confirm that before I mark it as such on the matrix. |
Buster also has I think we should settle on a set of core events, possibly small, and then also specify a wider range of events such that if someone wants more functionality, there is a common vocabulary for it. I guess if you squint, unsupported could be considered "inconclusive", but not really from the definition above. |
That's the goal. My point here is just to cast the net wide to see where the overlaps are (e.g. most frameworks treat failures/errors/timeouts as just a failure), and then we can work toward agreeing upon a smaller mutual subset of standard/"core" statuses.
I'd say |
Intern does not use a single status field, but we do broadcast topics that are picked up by reporters, which are documented at Using and writing reporters. Tests themselves have |
What exactly happens in Mocha, Jasmine or Buster.JS when an exception is thrown outside a test context? They don't handle it at all and just let the framework die? |
Buster catches it and reports it as a global failure. |
Mocha catches global errors as well. If they happen during an async test, they are even associated with the correct test case. |
@cjohansen @mantoni: Do following tests continue to run after the global error has been handled, or does the test run halt there? |
Just did a quick test to confirm that Mocha continues to run the remaining test cases: it("fails as expected", function (done) {
setTimeout(function () { throw new Error("GLOBAL OMG!"); }, 1);
}); |
Jasmine should continue to run remaining test cases if an Error is thrown from within a |
Buster associates the error with the current test when it can and keeps running. |
So we all agree on that behavior. Awesome bonus knowledge! |
In this issue thread, I would like to focus on standardizing the collection of test statuses (status names) between testing frameworks.
Some of the known status types from various frameworks:
The text was updated successfully, but these errors were encountered: