views:

139

answers:

1

I'm trying to use jstestdriver to generate some unit tests in my ant build in Windows. I plan to do this by running jstestdriver from an ant target using the <java> ant task.

So far for my ant build file I have the following:

 <target name="jstestdriver" description="Runs the js unit tests">

        ...

Now inside the <java> tags ( "..." above) I've tried adding the following:

 <arg value="--config" />
 <arg value="../../jstestdriver.conf" />

 <arg value="--tests" />
 <arg value="${whichTests}" />

 <arg value="--testOutput" />    
 <arg value="${reports.dir}" />

When I run the jstestdriver target, no messages are displayed on the console, and there are no junit output files in the directory they are to be generated in.


I have also tried the code snippet below instead, which seems to indicate that the jar is being executed:

 <arg value="--config ..\..\jstestdriver.conf" />
 <arg value="--tests ${whichTests}" />
 <arg value="--testOutput ${reports.dir}" />

However all it does is display an error message:

  "--config ..\..\jstestdriver.conf" is not a valid option

...and additionally displays a list of options for the jstestdriver jar.

I'm not sure what I'm doing wrong...

+1  A: 

I think it's likely that you want to break each argument and its value into separate arguments. E.g.:

<arg value="--config" />
<arg value="..\..\jstestdriver.conf" />
<arg value="--tests" />
<arg value="${whichTests}" />
<arg value="--testOutput" />
<arg value="${reports.dir}" />
Kaleb Pederson
I did that. That's when I get no output from the command...
leeand00
Found it! It was a mis-spelled property name...it caused it to have no output.
leeand00
It was report.dir not reports.dir :-p
leeand00
Anybody know why there were no error messages?
leeand00