Selenium: Is there any JS (JavaScript) code coverage tool which we can integrate with Selenium Server/RC

后端 未结 6 563
南方客
南方客 2021-01-01 20:48

Selenium: Is there any JS (JavaScript) code coverage tool which we can integrate with Selenium Server/RC

Hi,

I want to JS code coverage done by my Selenium T

6条回答
  •  臣服心动
    2021-01-01 21:39

    There is no particular tool that can integrate with Selenium to do JS coverage. However there are lots of tools which test JS on every page which can tell if the JS that executing on your web page had any errors. This may not ideal solution but on each page you will have the measure of uptil which point JS executed properly on your webpage under test. There are two solutions for that:

    1.) JSErrorCollector API: It will integrate directly with Selenium and let you know if there were any error on the page. Can be found at: http://mguillem.wordpress.com/2011/10/11/webdriver-capture-js-errors-while-running-tests/

    2.) Full fledged JS coverage tools: There is an excellent list of tools here which will essentially help you in covering JS on on your web pages. Can be found at: JavaScript unit test tools for TDD

提交回复
热议问题