A few days back, I posted how Page Coverage is a useful technique to determine if any test cases have been missed and to keep managers happy. Page Coverage plugin for Selenium IDE that get you the page coverage of the Selenium IDE based tests. I have uploaded it to the Mozilla Addons website, but the approval process to make it public usually takes a while. The good news is that you can grab it right now from the addons page.
Once you install the plugin, a Page coverage tool button will be available on the Selenium IDE toolbar. See the screen shot.
Mini user guide for the plugin
- Click on the Page Coverage tool button to turn on page coverage.
- Run your test case or test suite to capture page coverage.
- Click on the small arrow next to the Page coverage icon and then click View Page Coverage menu item to open the page coverage reports.
- This should open the all page coverage reports or the latest one if you have just executed a test case or test suite.
- Click on the Page Coverage tool button again to turn off page coverage.
Sample Page Coverage Reports
These reports show the elements that were used in the test.
Known Issues / Notes
- The last link or button clicked that triggers a page load will not be captured in the page coverage.
- Using page coverage with this plugin is destructive, i.e. it changes the web page to mark the elements used by the tests . This may sometimes affect your tests. So always run your tests without page coverage to verify the correct results.
- You will see “Error: Image corrupt or truncated” in the error log almost every time a screen shot is taken. The screen shot is still saved correctly.
- If you turn on both highlight elements and page coverage at the same time, page coverage will take precedence. You can have them both installed without problems.
To use this plugin, you will need to install Selenium IDE extension of at least version 1.0.4 first. Only in English for now.
This plugin was very challenging! I had to spend a fair amount of my holidays working on it. The biggest challenge was to determine the right time to grab the screen shot of the web page. My first attempt was to manually insert the grab screen shot commands in the script, which, as you can guess was very painful. Finally, I reached the stage when the screen shots are usually captured at the right moment.
As usual feel free to leave comments, improvements, advise, criticism, problems…