jemishgopani / wdio-json-reporter

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

Report creation with '|' in name fails #3

Closed dgasi closed 8 years ago

dgasi commented 8 years ago

Hi, I noticed when using wdio-json-reporter if you have large number of files that it fails after 28 files: . . . Wrote json report to [reports]. Wrote json report to [reports]. Failed to write json report to [reports]. Error: Error: ENOENT: no such file or directory, open '%PATH%\WDIO.json.chrome.0|.json'

So reports CID it starts with '0a' and after going trough the alphabet it starts with special characters because it created: WDIO.json.chrome.0}.json and then tried WDIO.json.chrome.0|.json where it failed.

So is it possible to reformat the name or to use numbers instead of characters?

Thx.

fijijavis commented 8 years ago

Sure. I'll take a look at this later today.

dgasi commented 8 years ago

Hi,

Any news regarding this issue?

Thx.

fijijavis commented 8 years ago

Sorry... Had some things come up between work and home. Will look at this today.

fijijavis commented 8 years ago

By any chance have you tried using the wdio-junit-reporter? I'm curious to see if the problem exists there too.

CID is generated from within WDIO so I'm thinking it might make more sense to address this issue at the root instead of a one off fix here.

dgasi commented 8 years ago

Just checked with Junit reporter and it's the same thing.

dgasi commented 8 years ago

@fijijavis - I opened the issue on webdriverio project and got response from @christian-bromann:

https://github.com/webdriverio/webdriverio/issues/1518

@dgasi I think we should not include the capability id in the name then. I think this should be fixed in the json reporter then.

does this help you to fix the issue?

fijijavis commented 8 years ago

Yes, I guess that does. If the direction is to not use cid in the name of the file then I'll work on an adjustment.

dgasi commented 8 years ago

thanks man. let me know when you have it done I can try it out really fast.

fijijavis commented 8 years ago

Published v0.0.4 with the above referenced change. I tried it with a 2 spec files and it looks good. Let me know what you think

dgasi commented 8 years ago

Hi,

Just did a run and no fails in reports creation .Works like a charm :-D

Thanks man.