-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible Generate Cucumber JSON Reports Post Test Run Execution #79
Comments
Hi folks any thoughts on the above ticket I created? Thanks in advance. |
Thanks for reporting! We need to revisit #1 soon. I'm hesitant to introduce something that will be incompatible with cypress way of doing tags, and would be very hrad to fix in a backward compatible way in a future. #2 - I think that's mostly on cypress. Have you tried using mocha JSON reporter - https://mochajs.org/#reporters / https://docs.cypress.io/guides/tooling/reporters.html#Custom-Reporters ? I verified that it works when I run
, it's up to cypress and cypress documentation to figure out how to get it to save to a file #3 You can indeed define step_definitions outside package.json, we use the cosmiconfig , so you have all the options listed here: https://github.com/davidtheclark/cosmiconfig#cosmiconfig to configure the cypress-cucumber-preprocessor. Once you figure out #2 and/or #3 I would love an PR with an update to the documentation. Feel free to reopen if you have more questions or more specific information. Thanks again! |
Hi @lgandecki Thanks for responding. For item 2) actually that's all on this project I'd imagine. At the end of a cucumber test run it generates a JSON report. All the cucumber runners JVM, JS, Specflow etc produce the same JSON. The JSON that cypress produces aligns to the JSON a mocha report generates which is significantly different to the JSON a cucumber runner generates hence me thinking that is item for this project. |
if you want a different reporter than you need to create a mocha reporter that aligns to the cucumber format. :-) |
That sounds drastic all right :(. Hmm I originally didn't think you needed to do that but looking at this a bit more now I'm not sure. Up to cucumberjs v3 you could get access to the JSON report easily enough via a cucumberjs API. Hence I was thinking this wouldn't be too bad to accomplish. That seems to be removed according to this link so I can understand why possibly a custom reporter may be needed I notice this project is inspired from https://github.com/sitegeist/gherkin-testcafe which has further evolved to this project https://github.com/kiwigrid/gherkin-testcafe. I have an issue for them here be interesting to see how that gets implemented. Maybe functionality implemented there could be re-used here assuming the code bases have an element of commonality between them. Thanks for your thoughts btw. |
@bhreinb Any workaround so far? I have the same problem. I want to use a tool that parses that json to living documentation (https://github.com/rmpestano/cukedoctor), but I can't get that json anywhere. And apparently no one created some Cypress Cucumber Json Reporter. |
This would be really nice, anyone make progress on this? |
@RobertLowe this has been available for a while now, see https://github.com/TheBrainFamily/cypress-cucumber-preprocessor#output for details of how to configure the output of cucumber JSON files |
Hello good afternoon, I am using cypress with cucumber in my local, the report cucumber-json is generated correctly, however in the azure pipeline the report is never generated, does anyone have any idea what may be happening? @jcundill please any ideas? grateful for the help provided |
Hi there
I'm currently evaluating the toolset for a project I'm currently working on. I have used cucumber js with protractor before which worked very well for me in the past so hoping to do something similar with this toolset and cucumber js. I must say from starting in December the project has evolved significantly so well done on that 👍 .
I notice though that the project doesn't quiet have feature parity with cucumber js. I list key gaps from an e2e test perspective
I focus on item number 2. When I run protractor tests with cucumber js I was able to get a cucumber JSON report (typically I got this as a file). All the cucumber families (for example Cucumber-JVM & CucumberJs)
sample.json.zip
produce the same JSON.
I notice cypress supports a number of reporters formats (https://docs.cypress.io/guides/tooling/reporters.html#) from mocha, junit, etc, however I don't know how to get JSON from a cucumber js run.
The reason why I request JSON from cucumber is I can pass that JSON to this report module on a CI server (namely this module https://github.com/jenkinsci/cucumber-reports-plugin which internally uses this library https://github.com/damianszczepanik/cucumber-reporting).
Having the above but especially item number 2 opens the toolset to a wider QA audience in my opinion. Thoughts? Thanks in advance re any help with the above.
The text was updated successfully, but these errors were encountered: