nikseras / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

Exception while running JSCoverage #298

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Configure JsTestDriver to use the coverage. Running JSTestDriver alone to 
test the code is working fine.
plugin: (jsTestDriver.conf) 
server: http://localhost:42442
load:
- web/*.js
- test/*.js

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

2. Project structure which is used to run the JSTestDriver and Coverage
/
 JsTestDriver-1.3.3d.jar
 jsTestDriver.conf
 JsTestDriver.jar
 plugins
    coverage-1.3.3d.jar
        coverage-nodeps-1.3.3d.jar
        coverage.jar
 test
 web

3. Run tests java -jar JsTestDriver.jar --testOutput results --tests all. This 
is done after starting the server at port 42442 in another command prompt.

What is the expected output? What do you see instead?

User> jsTestDriver.conf-coverage.dat should be populated with coverage data. 

Instead, no file is generated and we are getting an exception

java.lang.NullPointerException
        at java.io.File.<init>(Unknown Source)
        at com.google.jstestdriver.PathResolver.resolvePath(PathResolver.java:60)
        at com.google.jstestdriver.PathResolver.resolve(PathResolver.java:185)
        at com.google.jstestdriver.config.ParsedConfiguration.resolvePaths(ParsedConfiguration.java:103)
        at com.google.jstestdriver.config.Initializer.initialize(Initializer.java:84)
        at com.google.jstestdriver.JsTestDriver.runConfigurationWithFlags(JsTestDriver.java:259)
        at com.google.jstestdriver.JsTestDriver.runConfiguration(JsTestDriver.java:211)
        at com.google.jstestdriver.JsTestDriver.main(JsTestDriver.java:144)
Unexpected Runner Condition: null
 Use --runnerMode DEBUG for more information.

What version of the product are you using? On what operating system?
User> 
JsTestDriver.jar and JsTestDriver-1.3.3d.jar(Tried with both JAR’s).
coverage.jar and coverage-1.3.3d.jar(Tried with both JAR’s).
Windows Vista SP2 
Java version 1.6.0_29

Please provide any additional information below.

User>Able to run test all the tests without adding the coverage information in 
jsTestDriver.conf file.

Original issue reported on code.google.com by sachin.a...@gmail.com on 25 Nov 2011 at 7:17

GoogleCodeExporter commented 8 years ago
Does it run without the coverage plugin?

Original comment by corbinrs...@gmail.com on 29 Nov 2011 at 8:49

GoogleCodeExporter commented 8 years ago
Closing this defect. Am not able to recreate the same problem when I ran once 
again next day. Apparently, I was playing around with JAR files and the 
configuration file and it does seem to get fixed. It now works as stated in the 
manual. 

Thanks for looking into it. One more thing - I shouldn't be using the 
JsTestDriver-*.jar and coverage-*.jar's. Plain Vanilla JsTestDriver.jar and 
coverage.jar did the trick for me.

Original comment by sachin.a...@gmail.com on 5 Dec 2011 at 7:16

GoogleCodeExporter commented 8 years ago
Closing this defect.

Original comment by sachin.a...@gmail.com on 5 Dec 2011 at 7:17

GoogleCodeExporter commented 8 years ago

Original comment by corbinrs...@gmail.com on 5 Dec 2011 at 7:23

GoogleCodeExporter commented 8 years ago

Original comment by corbinrs...@gmail.com on 5 Dec 2011 at 7:25

GoogleCodeExporter commented 8 years ago

Original comment by corbinrs...@gmail.com on 5 Dec 2011 at 7:25