Closed Bug 1081427 Opened 10 years ago Closed 10 years ago

Use custom interface so we can add hooks for screenshot dumps, html dumps, custom reporting ,etc..

Categories

(Testing Graveyard :: JSMarionette, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jlal, Assigned: jlal)

Details

Attachments

(1 file)

Mocha has great support for custom DSL and reporters we use custom reporters a bit but do not yet integrate any kind of custom DSL (via custom interfaces) we should begin by porting the existing "tdd" interface but also add custom error handling (for screenshots, etc...) [make the interface marionette aware]
Note- this PR does not do anything fancy just moves logic around so we always use the custom interface instead of the random global pollution we do now.
Summary: Use custom interface to add hooks for screenshot dumps, html dumps, custom reporting ,etc.. → Use custom interface so we can add hooks for screenshot dumps, html dumps, custom reporting ,etc..
Comment on attachment 8503541 [details] [review]
https://github.com/mozilla-b2g/marionette-js-runner/pull/40

Generally this looks very positive, but there are a couple things I'm still murky about, so let's do another review pass after this one. Thanks!
Attachment #8503541 - Flags: review?(gaye)
Also the tests are failing on travis which we should look into also
Comment on attachment 8503541 [details] [review]
https://github.com/mozilla-b2g/marionette-js-runner/pull/40

The changes look sane, but they're breaking gaia-integration. I get:

/Users/mdas/Code/gaia/shared/test/integration/setup.js:1
(function (exports, require, module, __filename, __dirname) { marionette.plugi
                                                              ^
ReferenceError: marionette is not defined
    at Object.<anonymous> (/Users/mdas/Code/gaia/shared/test/integration/setup.js:1:63)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /Users/mdas/Code/marionette-js-runner-mozillab2g/node_modules/mocha/lib/mocha.js:184:27
    at Array.forEach (native)
    at Mocha.loadFiles (/Users/mdas/Code/marionette-js-runner-mozillab2g/node_modules/mocha/lib/mocha.js:181:14)
    at Mocha.run (/Users/mdas/Code/marionette-js-runner-mozillab2g/node_modules/mocha/lib/mocha.js:393:31)
    at Object.<anonymous> (/Users/mdas/Code/marionette-js-runner-mozillab2g/node_modules/mocha/bin/_mocha:380:16)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
make: *** [test-integration-test] Error 8
There will need to be a gaia side change (to remove the use of --ui tdd) which should fix the above error.
Comment on attachment 8503541 [details] [review]
https://github.com/mozilla-b2g/marionette-js-runner/pull/40

r+,  with the --ui change it's working well locally
Attachment #8503541 - Flags: review?(mdas) → review+
https://github.com/mozilla-b2g/marionette-js-runner/commit/0f9df1c1bdd58ddf10cbfad8788f5087c504e517
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: