In order to generate aggregate reports we need to use consolidate option.
We will use our Suite projects that was develop through our post on how to implement suites in protractor.
We implement consolidate option on config.js file here.
Step 1 : Open the project and implement protractor-jasmine2-html-reporter package by using this post.
Step 2 : Open config.js file and write the following script and implement onPrepare() function.
Note that all the codes of onPrepare() function comes from the previous post except consolidate option. We make consolidate as true.
Step 3 : After running the script we see separate suite names at the report and all the suites reports are generate in a single html file.
Step 4 : If we make consolidate as false and run the script we see reports are generated in two separate files for two suites.
After running script,
We see reports for only one suite.
Step 5 : Now add another option consolidateAll and make it true.
After running the script we see all the suite report in a single file.
That’s all for now.
Happy end to end testing using Protractor!!!