Script that generates extracted coverage data from a replay #6117
Replies: 1 comment
-
This now exists! Mostly! After posting this idea last night, today I was able to whip up a real live working example in just a few hours. It can successfully connect to our backend via the protocol API, fetch sources for a file, fetch line hits, and then uses the Istanbul code coverage tool's library APIs to generate a real HTML code coverage report! It's still a proof-of-concept in that it's hardcoded to load one known recording and one specific file, but this proves out the basic principle. From here, we could expand on this. Imagine showing code coverage percentages in the sources tree in our UI, or a button to export code coverage reports for download. I've also created a new Replay protocol examples repo, and added both the code coverage script and Jason's React component stack frame analysis example: |
Beta Was this translation helpful? Give feedback.
-
Jest's coverage info can be written out in several formats (apparently based on Istanbul reporters).
It would be really neat if we had a Node script that could leverage the protocol API to:
Beta Was this translation helpful? Give feedback.
All reactions