Closed
Bug 940924
Opened 12 years ago
Closed 12 years ago
Marionette should list the number of unexpected/expected fails at the end of the test run
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla32
People
(Reporter: Bebe, Assigned: parkouss)
Details
(Keywords: pi-marionette-runner, Whiteboard: [runner])
Attachments
(1 file, 3 obsolete files)
|
3.78 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
now at the end of a test run we see:
passed: 66
failed: 1
todo: 69
FAILED TESTS
-------
test_lockscreen_unlock_to_homescreen.py test_lockscreen_unlock_to_homescreen.TestLockScreen.test_unlock_to_homescreen
But the failed tests is actually a unexpected success.
Can we have a report that makes a difference on what's what:
passed: 66
failed: 0
unexpected: 1
todo: 69
UNEXPECTED SUCCESS TESTS
-------
test_lockscreen_unlock_to_homescreen.py test_lockscreen_unlock_to_homescreen.TestLockScreen.test_unlock_to_homescreen
Comment 1•12 years ago
|
||
An unexpected success is considered a failure. These are called out in the HTML report though, does that meet your needs? I suspect that changing this console output may have an affect on how TBPL identifies failures, but jgriffin would probably know that better than me.
Similarly, we don't currently call out the expected failures, and skipped tests are identified as 'todo'. I expect that with TBPL 2 we won't need to be so restricted.
Comment 2•12 years ago
|
||
For TBPL's benefit, we need the list of passed/failed/todo counts as they are today; we could add additional information about them though, e.g.,
passed: 10
failed: 5 (unexpected successes: 3)
todo: 2 (skipped: 2)
Updated•12 years ago
|
Whiteboard: [runner]
| Assignee | ||
Comment 3•12 years ago
|
||
I'd like to take the bug. Should I add the behaviour as described in the last comment ?
Flags: needinfo?(jgriffin)
Comment 4•12 years ago
|
||
Yes, feel free to implement the suggestion in comment #2.
Flags: needinfo?(jgriffin)
Updated•12 years ago
|
Keywords: ateam-marionette-runner
| Assignee | ||
Comment 5•12 years ago
|
||
Attachment #8425736 -
Flags: review?(jgriffin)
Comment 6•12 years ago
|
||
Looking at this patch and related code, I can see we're treating known failures a bit different than we do for other harnesses, like mochitest. In mochitest, a known failure is marked as a 'todo'; in Marionette, we add it to 'passed'.
If we keep the current sense of 'todo', then there isn't any need to break out skipped tests, since todo always means skipped. Alternately, and more accurately, we could make known failures increment todo, in which case breaking out the skipped tests makes sense.
Zac or Dave, do you have an opinion on this?
Comment 7•12 years ago
|
||
Not a strong opinion. I can see that it's misleading to count a known failure as a passed test. The most aesthetically pleasing solution to me would be to list passed tests, expected failures, (unexpected) failures, and skipped tests, but we're restricted by TBPL, and I don't object to having 'todo' to bundle both expected failures and skipped tests.
Comment 8•12 years ago
|
||
j.parkouss, can you amend this patch per comment #6? I.e., move expectedFailures from passed to todo, and NOT count those in skipped? Thanks!
Updated•12 years ago
|
Assignee: nobody → j.parkouss
| Assignee | ||
Comment 9•12 years ago
|
||
Sure - patch corrected as comment #6. Let me know if I misunderstood something.
Attachment #8425736 -
Attachment is obsolete: true
Attachment #8425736 -
Flags: review?(jgriffin)
Attachment #8426824 -
Flags: review?(jgriffin)
Comment 10•12 years ago
|
||
Comment on attachment 8426824 [details] [diff] [review]
Marionette should list the number of unexpected/expected fails at the end of the test run
Review of attachment 8426824 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/marionette/client/marionette/runner/base.py
@@ +812,1 @@
> self.logger.info('todo: %d' % self.todo)
Here, we can now write something like:
'todo: 5 (skipped: 3)', assuming that 2 of the 5 failures were expectedFailures, and the rest were skipped.
Attachment #8426824 -
Flags: review?(jgriffin) → review-
| Assignee | ||
Comment 11•12 years ago
|
||
Sorry for the inconvenience;
With the new patch, i can see an output like this:
> OK (skipped=1, expected failures=2, unexpected successes=1)
>
> SUMMARY
> -------
> passed: 16
> failed: 1 (unexpected sucesses: 1)
> todo: 2 (skipped: 1)
when I inject errors like this:
@skip("skip")
def testSkip(self):
pass
@expectedFailure
def testIt(self):
assert True
@expectedFailure
def testIt1(self):
assert False
@expectedFailure
def testIt2(self):
assert False
Nothe that I have to import skip and expectedFailure from marionette_test (and not from unittest) for this to work; but I thinks it's a known behaviour.
Attachment #8426824 -
Attachment is obsolete: true
Attachment #8427568 -
Flags: review?(jgriffin)
Comment 12•12 years ago
|
||
Comment on attachment 8427568 [details] [diff] [review]
Marionette should list the number of unexpected/expected fails at the end of the test run
Review of attachment 8427568 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/marionette/client/marionette/runner/base.py
@@ +979,5 @@
> self.results.append(results)
>
> self.failed += len(results.failures) + len(results.errors)
> if hasattr(results, 'skipped'):
> + self.skipped += len(results.skipped)
I think we want to add len(results.skipped) to both self.skipped and self.todo, similar to how we add len(results.unexpectedSuccesses) to self.failed and self.unexpected_successes. This way, our logging will look like:
todo: 5 (skipped: 2) (assuming 5 total tests, 2 of which were skipped)
rather than
todo: 3 (skipped: 2)
Attachment #8427568 -
Flags: review?(jgriffin) → review-
| Assignee | ||
Comment 13•12 years ago
|
||
Well I misunderstood again; It is now corrected.
Attachment #8427568 -
Attachment is obsolete: true
Attachment #8429383 -
Flags: review?(jgriffin)
Comment 14•12 years ago
|
||
Comment on attachment 8429383 [details] [diff] [review]
Marionette should list the number of unexpected/expected fails at the end of the test run
Review of attachment 8429383 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm! I'll run this on try.
Attachment #8429383 -
Flags: review?(jgriffin) → review+
Comment 16•12 years ago
|
||
Flags: needinfo?(jgriffin)
Comment 18•12 years ago
|
||
Keywords: checkin-needed
Comment 19•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Updated•3 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•