4

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"
Pierpaolo
  • 567
  • 3
  • 7
  • 17
  • What problems are you having with it, exactly? – Levi Hackwith Jun 06 '12 at 13:26
  • Simple: when the coverage plugin is configured in the .conf file, I run the test, the message "run js-test-driver Tests Job" appears in the progress view and that's it. Nothing else happens. If I open Chrome's JS console, all I can see is a sequence of "current command noop". No way to stop the task from running in Eclipse: I have to kill Eclipse from task manager. Also, no .dat coverege file is created. – Pierpaolo Jun 07 '12 at 07:36
  • Today I have tried to launch some tests and patiently waited to see whether eclipse was actually stuck. I've found this in the error log: "An internal error occurred during: "Run js-test-driver Tests Job" null Error Thu Jun 07 09:35:03 CEST 2012 An internal error occurred during: "Run js-test-driver Tests Job". some of the details: while scanning a double-quoted scalar found unknown escape character p(112) any hint? – Pierpaolo Jun 11 '12 at 11:46

1 Answers1

1

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.

Jens Ehrlich
  • 873
  • 2
  • 11
  • 19
  • thanks to you I have managed to run JSTestDriver with the coverage plugin. I was just wondering whether the coverage result is written into a file or just output to the console. Or is there a parameter to set to write the file? – Pierpaolo Jun 19 '12 at 10:47