Page Coverage v1.0 for Selenium IDE Now Available

Page Coverage tool button will be available

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.

    View Page Coverage Reports

  • 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.

Sample Page Coverage Reports

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.

Other Thoughts

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…

RedditLinkedInDeliciousDiggStumbleUponPocketShare
This entry was posted in Selenium IDE Plug-ins and tagged , , , , , , , , , , , . Bookmark the permalink.

7 Responses to Page Coverage v1.0 for Selenium IDE Now Available

  1. Kalen Quam says:

    This looks very useful, is there a selenium command that will explicitly call the screen capture event? Our site uses frames and so only a third of the automatic capture were with fully loaded frames.

    • Samit Badle says:

      Hi Kalen,

      Interesting. I hope to look into this in the future. There is a Selenese command to capture a screen shot of the web page. It is called captureEntirePageScreenshot.

      Cheers,
      Samit

  2. Dave says:

    Are the reports generated for page coverage on a per-testcase basis or on a per-testsuite basis?

    • Samit Badle says:

      Hi Dave,

      Both. The reports are generated for what ever you run, i.e. if you run a test case then the report will be just for the test case. If you run a test suite, the report will be for the test suite. The report will contain a screen shot for every web page tested.

      Cheers,
      Samit

  3. Sam says:

    This is pretty cool. I wonder if there is a way to not have it capture the ENTIRE full screen, rather, just the visible browser page? The pages on our dev sites have a ton of debugging code at the bottom, and that gets captured by this plugin, causing the pictures to be tiny until you zoom in.

    • Samit Badle says:

      Hi Sam,

      I am not sure that I understand your request. Would you like to restrict the screen shot to just the visible portion of the browser window (i.e. the browser viewport)?

      Cheers,
      Samit

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>