Is there any tool available to determine the code coverage for my selenium tests?
My tests are written in Java having use of selenium WebDriver with BDD-Cucumber implementation in it.
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It only takes a minute to sign up.Sign up to join this community
You can use Istanbul to instrument front-end code for code-coverage.
Process looks something like this:
This article describes how you can use Istanbul to generate code-coverage from UI tests.
This question describes how to use Istanbul with Selenium.
Similar questions other tools:
Finally, this solution works for me --
Use Command - istanbul instrument test.js >> test-instumented.js
Now, use the below code in @AfterClass annotation. It will execute the below method after all tests.