If my scenarios got failed the JSON report not generating. But for passes scenarios I can able to see the JSON report.
Please find my config file as below.
In comment prompt console I can able to see the failure message:
W/launcher - Ignoring uncaught error AssertionError: expected false to equal true
E/launcher - BUG: launcher exited with 1 tasks remaining
You can save the report by using a hook, so don't generate the file form the
protractor.conf.js
file, but use a cucumber-hook for it.The hook can look like this
reportHook.js:
You can save this code to the file
reportHook.js
and then add it to thecucumberOpts:.require
so it will look like this in your codeEven with failed steps / scenario's it should generate the report file.
Hope it helps