1

I am working on a GIS API that used the OpenLayers 2 library.

I performed the unit tests with QUnit and the code coverage is done with BlanketJS. It works like a charm. :)

Now, I am writing the integration tests (automated testing) with Selenium WebDriver 2 (java version).

My current app is basically:

  • an HTML page,
  • a JavaScript file with the GIS API (this has been tested with QUnit)
  • a JavaScript file where I manage the elements of the HTML page, using jQuery and so on (I wanted to cover this file and know how much I have tested from it)

I have been reading about code coverage for Selenium WebDriver and I came across this question, which is certainly a good solution.

But I think it means that I should run the tests on an other machine. Is there a simpler way to perform the code coverage of such a project? I mean, is there a way to do it on my machine, without installing SonarQube and stuff like that?

The app is quite small for now, so I would prefer a simpler way to do the test coverage of the JS file mentioned above.

Forgive me if this question sounds repeated or noob-like, but I am a newbie with Selenium WebDriver that is looking for simple things to start.

Thanks a lot. :)

1 Answer 1

1

I did a Google search and came across this blog post that seems to fit the bill. It goes over how to use JSCover with Selenium.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.