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

How to get report for protractor e2e test? #1267

Closed
Helen109 opened this issue Jan 13, 2020 · 4 comments
Closed

How to get report for protractor e2e test? #1267

Helen109 opened this issue Jan 13, 2020 · 4 comments
Labels

Comments

@Helen109
Copy link

Helen109 commented Jan 13, 2020

I want to get protractor e2e test code coverage, can I use this one?

@AndrewFinlay
Copy link
Contributor

I use nyc to get coverage for Protractor tests.

The nyc instrument command works well for creating instrumented client side source that you can serve to your Protractor tests.
I use this lib to collect the coverage data generated during the tests. You'll need to put an entry into your Protractor config like:

    plugins: [{
        inline: require('protractor-istanbul-plugin'),
    }],

I mix the test coverage files with a baseline coverage file, see #1202 for how and why to do this.
Then I create coverage reports with nyc report.

Hope this helps!

@Helen109
Copy link
Author

@AndrewFinlay thank you very much for your answer. May I ask you did this for javascript or typescript? I am working on typescript now.

@AndrewFinlay
Copy link
Contributor

We're working with AngularJS so it's all javascript.
It should be possible to do with typescript though, have a look at the nyc instructions page for more info on how to work with typescript.

@stale
Copy link

stale bot commented Jan 18, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Jan 18, 2021
@stale stale bot closed this as completed Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants