Question

I'm using JSTestDriver Eclipse plug-in and I want to install the coverage plugin: does anybody know how to get it working in Eclipse?

thanks in advance

Other things to note: I am under Win XP 64 bits, Eclipse version: Eclipse Java EE IDE for Web Developers. Version: Helios Service Release 2 Build id: 20110218-0911

The plugin part in the .conf file is:

plugin:
  - name: "coverage"
    jar: "F:/eclipse/plugins/coverage-1.3.4.b.jar"
    module: "com.google.jstestdriver.coverage.CoverageModule"
Was it helpful?

Solution

The coverage.jar is NOT an eclipse plugin, it is a JsTestDriver plugin. The JsTestDriver ecplise plugin does not support testcoverage. Your tests fail because your coverage plugin must be located in the same folder or a subfolder relative to your configfile.

For example

plugin:
- name: "coverage"
  jar: "plugins/coverage-1.3.4.b.jar"
  module: "com.google.jstestdriver.coverage.CoverageModule"

If you want to know the testcoverage for your project, you should download JsTestDriver-1.3.4.b.jar from http://code.google.com/p/js-test-driver/downloads/list.

Then run a command like

java -jar JsTestDriver-1.3.4.b.jar --browser <browserpath> --port 4224 --tests all

in your console.

For this, your configfile and the JsTestDriver.jar should be in the same folder.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top