jemishgopani / wdio-json-reporter

A WebdriverIO plugin. Report results in json format. http://webdriver.io
13 stars 32 forks source link

Final state #1

Closed monolithed closed 8 years ago

monolithed commented 8 years ago

Could you add a final state of result?

{
   "state": "fail",  // pass
   "suites": [ ... ]
}

My current fix is ugly:

let state = suites.some(suite => {
   return suite.tests.some(test => {
       return test.state === 'fail';
    })
});
fijijavis commented 8 years ago

Sure. To be clear, if all tests pass then state would be pass. Otherwise, state will be fail.

monolithed commented 8 years ago

Or, It can be more informative:

state: { passed: 0, failed: 1 }
fijijavis commented 8 years ago

I like that better. I'll make the change tomorrow and push out a new version.

fijijavis commented 8 years ago

All done.

monolithed commented 8 years ago

Thanks!

fijijavis commented 8 years ago

No problem