Closed Bug 1853120 Opened 10 months ago Closed 9 months ago

WebDriver browser configuration (like environment variables) are not forwarded to the pytestrunner

Categories

(Testing :: web-platform-tests, defect, P1)

defect
Points:
2

Tracking

(firefox120 fixed)

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 4 open bugs)

Details

(Whiteboard: [webdriver:m8], [wptsync upstream])

Attachments

(4 files)

Environment variables are currently not forwarded to the pytestrunner. As such our Mozilla specific tests do not run with the MOZ_DISABLE_NONLOCAL_CONNECTIONS environment variable set and causing crashes when trying to get async events working with Wdspec (see bug 1852243).

This is actually not only for environment variables but basically related to a lot of the browser configuration arguments.

For the public WdSpec tests the webdriver binary gets started by the FirefoxWdSpecBrowser (WebDriverBrowser) class.

But for Mozilla specific tests we start another instance of geckodriver via the GeckoDriver fixture. And here we would have to pass the extra information like environment settings via the pytestrunner and WdspecExecutor.

It looks like that we might have to subclass WdspecExecutor to have a WdspecFirefoxExecutor class specific for Firefox (similar for Android), so that we can pass all the arguments from the FirefoxWdSpecBrowser class as well. Otherwise we miss a lot of those arguments and start Firefox with incorrect settings.

Given that this sounds like a larger refactoring I would like to hear the feedback from James, or let it get discussed in next weeks triage meeting. Maybe we can find a quick solution for environment variables?

Flags: needinfo?(james)
Summary: Environment variables are not forwarded to the pytestrunner → WebDriver browser configuration (like environment variables) are not forwarded to the pytestrunner
Whiteboard: [webdriver:triage]
No longer blocks: 1852243
Blocks: 1848957

This allows it to be used in fixtures that directly control processes.

Assignee: nobody → james
Status: NEW → ASSIGNED

I imagine something like the patch attached will work? I haven't extensively tested it though (and for some reason try didn't run any jobs).

Flags: needinfo?(james)
Priority: -- → P1
Whiteboard: [webdriver:triage] → [webdriver:m8][webdriver:external]

https://treeherder.mozilla.org/jobs?repo=try&selectedTaskRun=Pc8DVyfQTUafrwUlUW9tvw.0&revision=7897f3711204e2735d5cf35d9cba90b10b5edb3c is now running and we do indeed get some new crashes with this patch due to passing in the disabled network connections.

Assignee: james → hskupin
Whiteboard: [webdriver:m8][webdriver:external] → [webdriver:m8]

(In reply to James Graham [:jgraham] from comment #4)

https://treeherder.mozilla.org/jobs?repo=try&selectedTaskRun=Pc8DVyfQTUafrwUlUW9tvw.0&revision=7897f3711204e2735d5cf35d9cba90b10b5edb3c is now running and we do indeed get some new crashes with this patch due to passing in the disabled network connections.

The problem here was with the profile root test, where geckodriver itself creates a new profile but doesn't have a reference to the default profile. As such only the recommended preferences are set and not those from the wpt's user.js file. The extra revision that I just pushed fixes the problem.

Points: --- → 2
Attachment #9355031 - Attachment description: Bug 1853120 - Make fixtures getting argument values more robust, → Bug 1853120 - [wdspec] Make Mozilla specific profile fixtures for getting argument values more robust
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/43c06d6ece96
[wdspec] Update Mozilla specific test "test_profile_root" to use wpt default preferences. r=webdriver-reviewers,jgraham
https://hg.mozilla.org/integration/autoland/rev/cd110eb5314b
Pass the environment in to wdspec configuration r=webdriver-reviewers,jgraham
https://hg.mozilla.org/integration/autoland/rev/6ce94024661c
[wdspec] Make Mozilla specific profile fixtures for getting argument values more robust r=whimboo,webdriver-reviewers
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/42196 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m8] → [webdriver:m8], [wptsync upstream]
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/autoland/rev/a0949ab56be3
[wpt] Fix formatting and spelling errors in pytestrunner script. r=jgraham,Sasha
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: