0
votes

I am using protractor-flake to re run failure test cases. For reporting with screenshot I am using protractor-jasmine2-screenshot-reporter. I am wondering if there is any option to show all reports even there is next attempt from protractor flake.
For example,

100 test cases -1st attempt - all success -> Report showing 100 test cases -> OK

100 test cases - 1st attempt - 90 success & 10 failures - 2nd attempt all success (10 specs those failed on 1st attempt) -> Report showing only 10 specs -> Incomplete Report

I know protractor screen shot reporter replaced the reports every time in destination folder. Possibly that is the reason to showing only final attempt report.

For report perspective it is incomplete to showing only last attempt spec. Is it possible to storing every attempt's success and last attempt failure specs report and showing all report at once or any other reporting plugin which handle such situation?

Below is my configuration for report,

   var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');
    var htmlReporter = new HtmlScreenshotReporter({
            dest: 'e2e/testreports', 
            filename: 'e2eReport.html', 
            reportOnlyFailedSpecs: false,
            captureOnlyFailedSpecs: true, 
            showSummary: true,
            showQuickLinks: true
    });

  exports.config = {
    .....
    onPrepare: function() {
        ....
        jasmine.getEnv().addReporter(htmlReporter);
        ....
    },
    beforeLaunch: function() {
        return new Promise(function(resolve){
            htmlReporter.beforeLaunch(resolve);
        });
    },

   ...
};
1

1 Answers

0
votes

As you said this is the "basic limitation" of the reporter setup you've implemented. What it now does is create a report with filename e2eReport.html for each run.

What if you add a timestamp to is when it is generated, so it becomes more unique. You will then get Date.now() + '-e2eReport.html' => 1496809660080-e2eReport.html and for example 1496809686906-e2eReport.html.

Hope it helps