Skip to content
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

HTML report is created only for last spec file that is being executed in sauce labs #35

Open
premkh9 opened this issue Jun 16, 2016 · 3 comments

Comments

@premkh9
Copy link

premkh9 commented Jun 16, 2016

We are trying to execute 13 spec file at the same time in sauce labs. At the end of execution, html report being created contains results for the spec file that ran lastly in sauce labs.

onPrepare: function() {
    jasmine.getEnv().addReporter(
        new Jasmine2HtmlReporter({
            savePath: 'target/screenshots',
            takeScreenshots: false,
            consolidate: true,
            consolidateAll: true
        })

    );
},

Why is it wiping other reports and displaying the report only for one spec file. How to fix this issue and possible solutions ?

@afterbangx
Copy link

I have this same problem running sharded test files. I set consolidate to true, and it appears that it does consolidate all the results but the last test file to finish is the one that sets the title shown at the top of the document. I know that they are being consolidated because each file has 5 tests in it and the results show 10 passing tests all under the same title/description.

@RHeijnen
Copy link

RHeijnen commented Sep 6, 2016

I have this same problem running sharded test files. I set consolidate to true, and it appears that it does consolidate all the results but the last test file to finish is the one that sets the title shown at the top of the document. I know that they are being consolidated because each file has 5 tests in it and the results show 10 passing tests all under the same title/description.

This is not the case at all, the files get overwritten and NOT consolidated. If you have 10 tests each containing 1 assertion and sharding on 2 - you will end with the final 2 tests, containing only 1 assertion each.

As for OP - this issue seems to be going on for a while, and I do not think its going to get fixed.

@premkh9
Copy link
Author

premkh9 commented Oct 14, 2016

@Kenzitron , Can you please fix this issue. Because of this issue, we are not able to use the report. Appreciate your help on the same

Can you make use of below. protractor-jasmine2-screenshot-reporter is working as expected but html content is not good

beforeLaunch: function() {
return new Promise(function(resolve){
reporter.beforeLaunch(resolve);
});
},

afterLaunch: function(exitCode) {
    return new Promise(function(resolve){
        reporter.afterLaunch(resolve.bind(this, exitCode));
    });
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants