Closed Bug 1208057 Opened 9 years ago Closed 7 years ago

Luciddream should be able to run devtools tests in js directly

Categories

(Testing :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: ochameau, Unassigned)

References

Details

Attachments

(2 files, 3 obsolete files)

In relation to bug 1208050, it would be great to reference existing devtools tests directly in luciddream.ini.
These existing tests are devtools mochitests. The goal of luciddream is to be able to run them against remote targets like simulator/b2g-desktop/mulet or devices. (Instead of running them only against firefox webpages)
So that we can know when our tools regress against these remote targets.

But in order to do that, we have to educate luciddream harness to handle Javascript files directly.
Attached patch patch v1 (obsolete) — Splinter Review
Here is a WIP patch. This adds a LucidDreamJavascriptTestCase similar to MarionetteJSTestCase.
It includes a bunch of devtools specifics in luciddream but it is really nice
to be able to reference existing mochitests file like this.
May be there is some ways to put some more logic in /devtools instead of /testing/luciddream?
Blocks: 1199205
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #8665419 - Attachment is obsolete: true
Spliting the patch in two:
- this one, dedicated to luciddream python code:
   * Introduced the JavascriptTestCase, make it so that we can run a js file instead of python.
   * Run /devtools/shared/luciddream/b2g-head.js in b2g runtime once for all tests
                                    /browser-head.js in desktop runtime before each test
   * Execute each test (with browser-head.js first, head.js and the test itself)
Attachment #8666729 - Attachment is obsolete: true
Attached patch javascript patch - v1 (obsolete) — Splinter Review
- this other one, dedicated to test helpers in javascript:
    * b2g-head.js setup prefs/settings to have a decent test environment 
    * browser-head.js do the same thing in firefox, but also fake a Mochitest
    environment and hook critical devtools test helpers like
    `openInspector` method  in order to target an app context via webide
    (instead of a regular tab in Fx).
    * also tweak test-actor and head.js to connect all the things.
Fixed duplicated test actor fronts that creates random breakages.
Attachment #8668494 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: