Closed
Bug 960438
Opened 10 years ago
Closed 6 years ago
BaseMarionetteTestRunner should be able to have some customizable setup code
Categories
(Remote Protocol :: Marionette, defect, P3)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: mdas, Assigned: mdas)
Details
(Keywords: pi-marionette-runner, Whiteboard: [affects=mtbf])
Before we run a test suite, we want to be able to run some setup code, say before run gets called here: http://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/runner/base.py#249 Not sure if unittest has built in support for this, or if we'll need to add this functionality
Updated•10 years ago
|
Whiteboard: [runner]
Comment 1•10 years ago
|
||
unittest provides https://docs.python.org/2/library/unittest.html#setupclass-and-teardownclass and https://docs.python.org/2/library/unittest.html#setupmodule-and-teardownmodule Since gaia-ui-test is NOT organized in classes, for example: class TestMusic(): def testMusic1(self): //test case #1 ... def testMusic2(self): //test case #2 ... setUpClass and tearDownClass will be the same as setUp and tearDown
Assignee | ||
Comment 2•10 years ago
|
||
(In reply to Paul Yang [: pyang] from comment #1) > unittest provides > https://docs.python.org/2/library/unittest.html#setupclass-and-teardownclass > and > https://docs.python.org/2/library/unittest.html#setupmodule-and- > teardownmodule > > Since gaia-ui-test is NOT organized in classes, for example: > > class TestMusic(): > def testMusic1(self): //test case #1 > ... > def testMusic2(self): //test case #2 > ... > > setUpClass and tearDownClass will be the same as setUp and tearDown Ah, what we're looking for here is different. What you suggest is good for running something before each test class, but this particular bug is to help us get customizable code running before any tests are run. So, pointing to a more recent base.py, it's something we want to add here: https://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/runner/base.py?rev=9347f1e2551a#1003
Keywords: ateam-marionette-runner
Whiteboard: [runner] → [affects=mtbf]
Comment 3•10 years ago
|
||
I'm not saying we should have something run before class, but it's sort of solution if we arrange test cases which have the same pre-condition in the same class, and 0 line needed to be added. Since our test cases are suite based, agree that we can add handler there.
Comment 5•6 years ago
|
||
I don’t think we should put any more effort into Mn harness features.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•