jemishgopani / wdio-json-reporter

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

Tag support added to the reporter #20

Closed ania-s closed 6 years ago

ania-s commented 6 years ago

The tests tags are included now into the report. E.g. if the test looks like that:

@a_new_tag Scenario: Exemplary test ...

the report would contain:

...
...
{  
         "name":"Exemplary test",
         "tags":[  
            "@a_new_tag"
         ],
...
...
fijijavis commented 6 years ago

Thanks for the PR. This is a nice addition to the reporter. Would you mind adding something to the documentation?

ania-s commented 6 years ago

Sorry I completely forgot about documentation. Now it's added there - I updated the Sample output of README.md with the tags example. The output is for mocha, which I am not familiar with, but I briefly checked and it looks it has tags as well so I assumed they would be picked up the same way as in cucumber. I checked that it worked with cucumber framework. If you tested it with mocha and it's not picked up please let me know and I will update the README clearly stating that tags are included in a report generated for cucumber.

fijijavis commented 6 years ago

@ania-s I merged this into Master but was not able to get this to work for Mocha. I had to add a guard against test.tags not existing. Can you pull master and see if this works for you with cucumber? If it is still good then maybe you could update the README to

1) Indicate this feature is only for Cucumber 2) Provide a cucumber output sample 3) Provide a sample implementation

FYI... I made a few other changes regarding how the project works. I have converted to yarn from npm.