Closed
Bug 885141
Opened 11 years ago
Closed 11 years ago
Failure in setup* or teardown* methods are not always counted
Categories
(Testing Graveyard :: Mozmill, defect)
Testing Graveyard
Mozmill
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: whimboo, Assigned: whimboo)
References
Details
(Keywords: regression, Whiteboard: [mozmill-2.0+][ateamtrack: p=mozmill q=2013q3 m=1])
Attachments
(1 file)
15.07 KB,
patch
|
davehunt
:
review+
|
Details | Diff | Splinter Review |
There are some cases when a failure in any setup* or teardown* method is not counted. Here two examples: 1. The test module only has a setupModule or setupTest method which fails 2. The test module has a teardownModule or teardownTest method which fails It's important to know if there are failures in those methods. This seems to be a regression from bug 639691. We might want to account those failures to the right test.
If we don't want to count them as specific tests, then I don't see why we'd suddenly care about line by line failures. If the method goes wrong in a big way (throws an exception or something) then I think we will still stop the test at that point. I don't want us to count specific checks inside the setup/teardown functions when they fail but not when they pass. That sounds like it would make things far more confusing.
Assignee | ||
Comment 2•11 years ago
|
||
Nope, that does not work. If there is no test function in a module, failures in setupModule and setupTest will be hidden. Same applies to any teardown function. I thought that with bug 639691 we wanted to account possible failures to the current test. I will setup some tests for Mutt so that we can figure out what to do.
Assignee | ||
Comment 3•11 years ago
|
||
So the problem here is that line: https://github.com/mozilla/mozmill/blob/master/mozmill/mozmill/extension/resource/modules/frame.js#L225 if (test.__passes__ && (modulelist.indexOf(test.__name__) != -1)) { A check for test.__passes__ is not doing what you might expect. It's an empty array in case of no passes but a failure. So we will not determine the correct state here. The patch is simple. I will have it ready later and some additional tests.
Assignee | ||
Comment 4•11 years ago
|
||
It's kind of a simple fix. I have also added a couple of tests to ensure we don't regress that again.
Comment 5•11 years ago
|
||
Comment on attachment 779796 [details] [diff] [review] Patch v1 Review of attachment 779796 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, thanks Henrik!
Attachment #779796 -
Flags: review?(dave.hunt) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Landed as: https://github.com/mozilla/mozmill/commit/31daf5f982c17c9a58bb758a501fffe4f2b535fd As the investigation has shown this was absolutely a blocker for 2.0. Setting whiteboard entry accordingly.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-2.0?] → [mozmill-2.0+][ateamtrack: p=mozmill q=2013q3 m=1]
Updated•8 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•