Closed Bug 1291796 Opened 8 years ago Closed 8 years ago

Separate Marionette harness unit tests into class-specific modules

Categories

(Remote Protocol :: Marionette, defect)

Version 3
defect
Not set
normal

Tracking

(firefox51 fixed)

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: vakila, Assigned: vakila)

References

Details

(Keywords: pi-marionette-harness-tests)

Attachments

(2 files)

At the moment, harness unit tests for various runner classes (from [1],[2]) are all contained in a single module, `tests/harness_unit/test_marionette_runner.py`[3]. 

It would be better to divide this into separate modules that are specific to a certain class (or perhaps a related group of classes), e.g. `test_marionette_runner.py`, `test_marionette_arguments.py`, `test_marionette_test_result.py` etc. 


[1] https://dxr.mozilla.org/mozilla-central/source/testing/marionette/harness/marionette/runner/base.py

[2] https://dxr.mozilla.org/mozilla-central/source/testing/marionette/harness/marionette/runtests.py

[3] https://dxr.mozilla.org/mozilla-central/source/testing/marionette/harness/marionette/tests/harness_unit/test_marionette_runner.py
Depends on: 1292300
Assignee: nobody → anjanavakil
Comment on attachment 8785294 [details]
Bug 1291796 - Split Marionette harness tests by class;

https://reviewboard.mozilla.org/r/74550/#review72522
Attachment #8785294 - Flags: review?(mjzffr) → review+
Comment on attachment 8785295 [details]
Bug 1291796 - Minor fixes to harness unit tests;

https://reviewboard.mozilla.org/r/74552/#review72524

::: testing/marionette/harness/marionette/tests/harness_unit/test_marionette_runner.py:81
(Diff revision 1)
>  def manifest_fixture(request):
>      '''
>      Fixture for the contents of mock_manifest, where a manifest
>      can include enabled tests, disabled tests, both, or neither (empty)
>      '''
> +    from manifestparser import TestManifest

Since this is parametrized, lets avoid running the import over and over. If you just import manifestparser once at the top and then refer to manifestparser.TestManifest in the test(s), the pytest warning should go away.
Attachment #8785295 - Flags: review?(mjzffr) → review-
Comment on attachment 8785295 [details]
Bug 1291796 - Minor fixes to harness unit tests;

https://reviewboard.mozilla.org/r/74552/#review72772

Thanks!
Attachment #8785295 - Flags: review?(mjzffr) → review+
Pushed by mjzffr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6a81df9a2129
Split Marionette harness tests by class; r=maja_zf
https://hg.mozilla.org/integration/autoland/rev/0d7beb4dc862
Minor fixes to harness unit tests; r=maja_zf
Blocks: 1298900
https://hg.mozilla.org/mozilla-central/rev/6a81df9a2129
https://hg.mozilla.org/mozilla-central/rev/0d7beb4dc862
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: