jemishgopani / wdio-json-reporter

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

Cannot read poperty 'suites' of undefined #48

Closed tpronk closed 4 years ago

tpronk commented 4 years ago

Hey!

I'm a bit inexperienced, so please be gentle :).

Using version 2.0.0, I followed the steps in the README to write the json logs to individual files and then merge them together:

reporters: [
  'dot',
  ['json',{
      outputDir: './Results'
  }]
],
const mergeResults = require('wdio-json-reporter/mergeResults')
mergeResults('./Results', 'wdio-json-*', 'wdio-custom-filename.json')

I got an error "cannot read property suites of undefined". Diving a bit deeper, I spotted that the filenames are named "wdio-0-0-json-reporter.log" etc., so I could fix it by changing the script above to...

const mergeResults = require('wdio-json-reporter/mergeResults')
mergeResults('./Results', 'wdio-*', 'wdio-custom-filename.json')
fijijavis commented 4 years ago

@tpronk It looks like you have found an error in the documentation. Thanks for letting me know!

tpronk commented 4 years ago

Happy to help!

github-actions[bot] commented 4 years ago

Stale issue message