Closed Bug 970886 Opened 10 years ago Closed 9 years ago

MarionetteTestRunner runs tests twice if the filename is the same

Categories

(Remote Protocol :: Marionette, defect, P2)

x86_64
Linux
defect

Tracking

(firefox42 fixed)

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: zcampbell, Assigned: parkouss)

References

Details

(Keywords: pi-marionette-runner, Whiteboard: [runner][affects=webqa marionette])

Attachments

(2 files)

Here we have two py files with identical names.
Their class names and test methods are different, however when running the second test file the TestRunner will also run the test case from the first file again.


$ gaiatest --address localhost:2828 --testvars testvars.json --html-output results/index.html tests/app1/ tests/app2/

starting httpd
running webserver on http://10.246.27.126:53424/
test_do_something_app1 (test_case_1.App1) ... ok

----------------------------------------------------------------------
Ran 1 test in 10.833s

OK
test_do_something_app1 (test_case_1.App1) ... ok
test_do_something_app2 (test_case_1.App2) ... ok

----------------------------------------------------------------------
Ran 2 tests in 22.684s

OK

SUMMARY
-------
passed: 3
failed: 0
todo: 0
Attached file bug_970886.zip
Here is the folder and tests I used for this
Blocks: 970669
To prove real-world scenario, this arose where we had:

accessibility/lockscreen/test_unlock_to_homescreen.py
functional/lockscreen/test_unlock_to_homescreen.py
Ha!

Elevating to major, this should never happen!
Severity: normal → major
Whiteboard: [runner]
Priority: -- → P2
Whiteboard: [runner] → [runner][affects=webqa marionette]
Attached patch 970886.patchSplinter Review
I tried locally with the example provided in the zip (just modified the import to use MarionetteTestCase instead of gaia*, but the issue was the same).

So without the patch, the first test is ran twice, and the log shows 3 executed tests.

With the patch, this is fixed and we execute only 2 tests, as expected.
Assignee: nobody → j.parkouss
Status: NEW → ASSIGNED
Attachment #8634041 - Flags: review?(dburns)
Attachment #8634041 - Flags: review?(dburns) → review+
https://hg.mozilla.org/mozilla-central/rev/13388633bfc4
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: