Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate Single Report while parallel execution in Nightwatch

I have written browser automation test cases using Nightwatch. I have also implemented the 'phantomjs-prebuilt' for headless test cases. I am able to create a single report for all my test cases when I set 'test_workers': { 'enabled': false. }. However, when I set this to true it generate a single report but the data will be for last executed test suit only. It is overriding the other test suit.

Can anybody would able to generate a single report while executing in Parallel mode?

Thanks in advance.

like image 959
bhushan patil Avatar asked Dec 08 '25 15:12

bhushan patil


1 Answers

I'm making the assumption that you're running your Nightwatch command using the --reporter option. If you're still seeing only a single report created when running without --reporter then you have a different issue. Can you provide the Nightwatch command you are using to run your tests?

But based on the assumption, I came across a similar issue when using built in reports as part of the test command using '--reporter'.

My solution was to run a separate script after the tests have completed, pointing it at the directory the reports are saved in, it will then compile each XML into a single report.

Heres an example using nightwatch-html-reporter...

nightwatch --group <someGroupg> --env <env>; nightwatch-html-reporter -d /reports/  --output generatedReport.html 

Hope that helps :)

like image 189
Asoc Avatar answered Dec 14 '25 05:12

Asoc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!