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. :)

asked May 27, 2015 at 19:33

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.

answered May 27, 2015 at 20:47
1
  • I have played around with JSCover in the past. It is certainly possible to run Selenium tests and gather the JSCover coverage results. See this answer: stackoverflow.com/a/13868746/1088584 Commented Mar 23, 2016 at 9:57

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.