jemishgopani / wdio-json-reporter

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

Reports are not renamed and combined #17

Closed ianoroceo closed 7 years ago

ianoroceo commented 7 years ago

I have this on my wdio-conf.js


    reporterOptions: {
        outputDir: './Reports',
        combine: 'true',
        filename: 'wdio-results' //+ process.env.NODE_ENV + browser + datetime,
    },```

but after running the suites or specs, it didn't combine the reports and didn't rename the reports
Am I missing something? (sorry for the noob question, I'm new on this one)

```==================================================================
Number of specs: 20
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
Wrote json report to [./Reports].
[12:02:42] undefined
[12:02:42] undefined
[12:02:42] undefined
[12:02:42] undefined```

node v6.11.0
npm v3.10.10
fijijavis commented 7 years ago

@ianoroceo Looks like you have a typo in your config file.

combine: 'true'

Should be

combined: 'true'
ianoroceo commented 7 years ago

omg! what a noob move of mine. thank you so much @fijijavis i changed it to combined

based on the documents, its

combined: true

i tried combined: true and combined: 'true' but it still didn't combined the reports

reporters: ['dot', 'json'],
    reporterOptions: {
        outputDir: './Reports',
        combined: true,
        filename: 'wdio-results' //+ process.env.NODE_ENV + browser + datetime,
    },

Let me know what information you need (sorry I am really new on this one node.js + webdriverio). thank you!

fijijavis commented 7 years ago

@ianoroceo I copied the snippet you provided, used it in one of my projects and got the single combined report. What version of wdio-json-reporter do you have specified in your package.json?

ianoroceo commented 7 years ago

@fijijavis it's

"devDependencies": {
    "wdio-json-reporter": "^0.1.1",
  },
fijijavis commented 7 years ago

@ianoroceo a single combined version was not introduced until 0.2.0 . Try bumping to the latest version 0.2.1 and you should be good.

ianoroceo commented 7 years ago

oh! thank you @fijijavis 👍 my bad. updated wdio-json-reporter and it combined now