Closed Bug 1272109 Opened 8 years ago Closed 8 years ago

Lots of Marionette unittests not executed on desktop because "@skip_if_b2g" is set on test class level

Categories

(Testing :: Marionette Client and Harness, defect)

defect
Not set
major

Tracking

(firefox49 fixed)

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: whimboo, Assigned: automatedtester)

References

Details

(Keywords: pi-marionette-client, regression)

Attachments

(1 file)

As I have seen today while working on bug 1271758, lots of our unit tests aren't getting run on desktop because the skip decorator for b2g is set on class level. Due to that the whole test class is skipped on every platform!

Here the instances:

http://mxr.mozilla.org/mozilla-central/search?string=%40skip_if_b2g&find=testing/marionette/harness/marionette

If we have more decorators and those are also attached on the class, it would be the same problem. 

Due to that we miss a lot of test coverage!
Quick scan showed me the following entries:

tests/unit/test_elementsize.py
tests/unit/test_execute_script.py
tests/unit/test_window_title.py
WIth Skip_if_b2g

Ran 664 tests
Expected results: 627
Unexpected results: 5 (ERROR: 2, FAIL: 3)
Skipped: 32

without

Ran 695 tests
Expected results: 653
Unexpected results: 10 (ERROR: 5, FAIL: 5)
Skipped: 32

Looks like we were missing 31 tests
Please notice the skip count of both! It's in each case 32. That means with the skip decorator we do not count those tests as skipped. We simply loose them.
Looks like I broke this when I landed bug 965308
It looks like when I landed bug 965308 it stopped looking at any tests
that had @skip_if_b2g decorator. Since we no longer need to support b2g
we should just remove the decorator.

Review commit: https://reviewboard.mozilla.org/r/52163/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/52163/
Assignee: nobody → dburns
Blocks: 965308
Status: NEW → ASSIGNED
Keywords: regression
FWIW it is possible to test the platformName capability if it matches "B2G" instead of testing for the presence of the b2g capability.

I notice that testing/marionette/harness/marionette/marionette_test.py has quite a few references to the latter, which was removed in bug 965308.
Also I’m not sure if removing support for disabling tests on B2G is a good idea at this point.  Are we confident they are not being run or will be activated again in the future?
Flags: needinfo?(dburns)
(In reply to Andreas Tolfsen ‹:ato› from comment #7)
> Also I’m not sure if removing support for disabling tests on B2G is a good
> idea at this point.  Are we confident they are not being run or will be
> activated again in the future?

The python tests have been disabled as, just before the announcement in mozlando, they were converting them to marionettejs. I am happy to remove this support.

Also... https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&filter-tier=3 shows that B2G hasnt been building for a while so even less concerned now...
Flags: needinfo?(dburns)
Comment on attachment 8751698 [details]
MozReview Request: Bug 1272109: Remove skip_if_b2g decorator for tests

https://reviewboard.mozilla.org/r/52163/#review49099

That makes sense then.  Can you make sure you do a try run as well?
Attachment #8751698 - Flags: review+
Depends on: 1271758
(In reply to Andreas Tolfsen ‹:ato› from comment #9)
> Comment on attachment 8751698 [details]
> MozReview Request: Bug 1272109: Remove skip_if_b2g decorator for tests
> 
> https://reviewboard.mozilla.org/r/52163/#review49099
> 
> That makes sense then.  Can you make sure you do a try run as well?

Most definitely, there are executeScript failures that I would like to see if they are gone with bug 1271758 and rebase on top of that before I do a try run.
My patch landed, but afair the failures haven't been fixed with it given that my patch has very specific conditions. So all the failures should still be present.
I’m looking at the fallout in the test_execute_script.py tests.
Depends on: 1272642
Comment on attachment 8751698 [details]
MozReview Request: Bug 1272109: Remove skip_if_b2g decorator for tests

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/52163/diff/1-2/
Backed out for failure in test_execute_script.py.

Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/f4f23a7dd307
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=613c6e5d56a216823cdc11d85f4408c778160e2d
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=28013326&repo=mozilla-inbound

04:14:57     INFO -  TEST-START | test_execute_script.py TestExecuteChrome.test_lasting_side_effects
04:14:57     INFO -  Failed to gather test failure debug.
04:14:57     INFO -  Traceback (most recent call last):
04:14:57     INFO -    File "C:\slave\test\build\venv\lib\site-packages\marionette\runner\base.py", line 614, in gather_debug
04:14:57     INFO -      rv['source'] = marionette.page_source
04:14:57     INFO -    File "C:\slave\test\build\venv\lib\site-packages\marionette_driver\marionette.py", line 1319, in page_source
04:14:57     INFO -      return self._send_message("getPageSource", key="value")
04:14:57     INFO -    File "C:\slave\test\build\venv\lib\site-packages\marionette_driver\decorators.py", line 36, in _
04:14:57     INFO -      return func(*args, **kwargs)
04:14:57     INFO -    File "C:\slave\test\build\venv\lib\site-packages\marionette_driver\marionette.py", line 757, in _send_message
04:14:57     INFO -      self._handle_error(err)
04:14:57     INFO -    File "C:\slave\test\build\venv\lib\site-packages\marionette_driver\marionette.py", line 818, in _handle_error
04:14:57     INFO -      raise errors.lookup(error)(message, stacktrace=stacktrace)
04:14:57     INFO -  NoSuchFrameException: NoSuchFrameException: No such content frame; perhaps the listener was not registered?
04:14:57    ERROR -  TEST-UNEXPECTED-FAIL | test_execute_script.py TestExecuteChrome.test_lasting_side_effects | AssertionError: False is not true
04:14:57     INFO -  Traceback (most recent call last):
04:14:57     INFO -    File "C:\slave\test\build\venv\lib\site-packages\marionette\marionette_test.py", line 344, in run
04:14:57     INFO -      testMethod()
04:14:57     INFO -    File "C:\slave\test\build\tests\marionette\tests\testing\marionette\harness\marionette\tests\unit\test_execute_script.py", line 233, in test_lasting_side_effects
04:14:57     INFO -      send("return typeof window.wrappedJSObject == 'undefined'"))
Flags: needinfo?(dburns)
The patch should not have landed before bug 1272642 got fixed. Ideally those tests should have been fixed immediately to reduce the dependency.
The dependent bug hasnt landed and I thought it did... which caused the backout.
Flags: needinfo?(dburns)
https://hg.mozilla.org/mozilla-central/rev/112f894e71ff
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Product: Testing → Remote Protocol

Moving bugs for Marionette client due to component changes.

Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
Version: 49 Branch → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: