Code Coverage for Selenium java web application Eclipse IDE
Code Coverage for Selenium Java web application Eclipse IDE
Generate code coverage for a web application by running Selenium tests in Eclipse IDE
In this 4mins video, you will see how to generate code coverage by building a web application and run selenium tests with 3 simple steps in Eclipse IDE.
At the end of video you can see how one can just prefix the rktracer keyword to maven build in command line mode, run selenium tests and generate code coverage reports
How to integrate RKTracer tool with Eclipse IDE
Open a new command prompt and run the following command to install the RKTracer tool plugin for eclipse IDE.
rktracer -ec -integrate
Once successfully RKTracer tool is integrated with Eclipse IDE. You can see RKTracer tool options in Run menu–> External tools
Generate code coverage for web application and selenium tests in Eclipse IDE
Ensure that you’re able to build the application and run the selenium tests.
Step 1: Enable the RKTracer tool
Select the project in eclipse in the project explorer and enable the RKTracer tool.
Run–> External Tools –> RKTracer ON
Step 2: Rebuild and run selenium tests.
Run maven clean and maven test to build web application and run selenium tests. In general, testing can be unit testing or functional testing.