This project runs tests with Cypress
and collect code coverage using v8 native Profiler
and the Chrome Debugger Protocol
for then generating reports using c8
.
NOTE: This project is really a PoC... I gathered together a set of plugins for Cypress amongst which this one which aims at consolidating what I did here.
Well... in this case just clone the project and tailor it to your needs. Happy hacking!
git clone https://github.com/glromeo/cypress-c8.git
cd cypress-c8
yarn install
yarn ci
the report will be available in coverage/index.html
This project follows the convention explained here
The only way I could get electron
to enable CDP is to use the environment variable
ELECTRON_EXTRA_LAUNCH_ARGS=--remote-debugging-port=8315
...if anyone managed to get it working with launchOptions, please help!
- The Cypress team for cypress-example-kitchensink
- Gleb Bahmutov for cypress-native-chrome-code-coverage-example
- Benjamin E. Coe for his amazing c8 - native V8 code-coverage
- Andrea Cardaci for chrome-remote-interface