wdio-cucumberjs-json-reporter icon indicating copy to clipboard operation
wdio-cucumberjs-json-reporter copied to clipboard

Custom file name when generating report

Open saurabhkjain opened this issue 3 years ago • 4 comments

Hi,

I'm want to customise the name of the report that is generated. I haven't seen anything the documentation.

Does anyone know if that's possible. If so, could you let me know, please.

Thanks in advance.

saurabhkjain avatar Feb 25 '22 18:02 saurabhkjain

Hi @saurabhkjain

What do you exactly mean, do you mean the name of the JSON file that is being generated based on each feature file? If so then this can't be changed.

wswebcreation avatar Mar 06 '22 07:03 wswebcreation

Hi, Yes, that's what I meant. Is that something which can be implemented? It would be really helpful.

Thanks

saurabhkjain avatar Mar 15 '22 16:03 saurabhkjain

Hi @saurabhkjain

It's currently not possible, can you explain what you would like to have and how this would look like. I can then see if this can be done. For now it can't. Everything is based on the name of the feature file itself and is autogenerated.

wswebcreation avatar Mar 16 '22 00:03 wswebcreation

Currently the report is generated using:

onComplete: () => {
    // Generate the report when it all tests are done
    generate({
      // Required
          jsonDir: '.tmp/json/',
         reportPath: '.tmp/report/',
      // for more options see 
    });
  }

Can you add an option for the JSON report like that: jsonFileName: '.tmp/json/something.json'

Because right now you get a .tmp/json/default_16666142545489763.json

fatkobra avatar Oct 06 '22 12:10 fatkobra

@fatkobra I think this is not possible because multiple workers wrote overwrite their reports if everyone writes in the same file.

I will go ahead and close this issue. Let me know if you have further questions.

christian-bromann avatar Apr 28 '23 19:04 christian-bromann