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

Selenium: add code coverage for selenium tests #924

Merged
merged 1 commit into from
Feb 17, 2016
Merged

Conversation

philschatz
Copy link
Member

This injects the JS built by webpack with coverage recording and then the selenium mocha tests extract the coverage data out at the end of each test using the __coverage__ global that istanbul fills. refs #931

Example coverage Report

To run

Run npm run test-integration. This command:

  1. builds the JS files with coverage recording sprinkled in
  2. serves the files at http://localhost:8000
  3. runs selenium tests while recording coverage information to /coverage-selenium.json
  4. generates an HTML and .lcov report in /coverage/

TODO

  • save the __coverage__ data to a file and then generate a report

Thoughts @openstax/tutor-fe ?

@philschatz philschatz added this to the :art: Refactor milestone Jan 1, 2016
@philschatz philschatz changed the title add code coverage for selenium tests Selenium: add code coverage for selenium tests Feb 8, 2016
@philschatz philschatz force-pushed the selenium-coverage branch 4 times, most recently from fc43f96 to f6df520 Compare February 14, 2016 06:30
philschatz added a commit that referenced this pull request Feb 17, 2016
Selenium: add code coverage for selenium tests
@philschatz philschatz merged commit 4f0af88 into master Feb 17, 2016
@philschatz philschatz deleted the selenium-coverage branch February 17, 2016 21:09
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

Successfully merging this pull request may close these issues.

1 participant