gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 786 forks source link

Getting JS code covered by Python Selenium tests #854

Open prgrmr101 opened 6 years ago

prgrmr101 commented 6 years ago

What I have:

What I want:

Thanks a lot in advance for the help.

deanml commented 6 years ago

Saw this post describing the use of Istanbul middleware. https://medium.com/@the1mills/front-end-javascript-test-coverage-with-istanbul-selenium-4b2be44e3e98

It may work....

prgrmr101 commented 6 years ago

Hi, Thanks a lot for your response. I did go through that post, but couldnt understand step 2 & 3. How do I make the selenium tests use the instrumented JS.

Does that have to be a webpack.config change?