Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi,

I've been trying to get up and running with JsTestDriver to support continuous integration with my JS tests however when I run the tests I just get a report saying that 0 tests have been run.



I've followed the numerous guides:

1. Installed Java (C:\Program Files\Java\)

2. Downloaded JsTestDriver-1.3.1.jar (and moved to C:\Program Files\Java\jstestdriver)

3. Start the server
- I've used both command prompt and powershell to do this. In either case I've right-clicked and run as administrator.
- java -jar "C:\Program Files\Java\jstestdriver\JsTestDriver-1.3.1.jar" --port 4224

4. Point Google Chrome to http:\\localhost:4224 and then clicked on 'capture'

5. I then start another Powershell instance and navigate to my project which has the following structure:
<br />
/js<br />
  /production<br />
    -Greeter.js<br />
  /testing<br />
    -jsTestDriver.conf<br />
    /tests<br />
       -GreeterTest.js<br />



My jsTestDriver.conf looks like this:

<br />
server: http://localhost:4224<br />
<br />
load:<br />
  - ../production/*.js<br />
  - tests/*.js<br />


I then issue the following command:

<br />
java -jar "C:\Program Files\Java\jstestdriver\JsTestDriver-1.3.1.jar" --tests all<br />


And the output I get is:

<br />
Total 0 tests (Passed: 0; Fails: 0; Errors: 0) (0.00 ms)<br />
Tests failed: No tests executed<br />


The tests are present (the Greeter.js and associated tests have been taken from the Google Code page) they just don't seem to be being seen/run.

I've tried renaming the files and altering the config - if I put an invalid test file or source file name then an error is flagged and the test will not run, so from what I can tell, the files are being seen and loaded.

Any suggestions/help?

josh
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900