Hi, if you use plovr to run tests as described at:
I just landed a change that will let you run
java -jar plovr.jar test <config_id>
to run the tests headless using WebDriver/HtmlUnit. The change is really sloppy and I'm going to be doing a bunch of follow-up work, which you can get the gist of by reading the TODOs in the change:
For example, the above command for running the tests is a bit of a lie because I do not want to bundle all of HtmlUnit/WebDriver with plovr because the plovr jar is already pretty big. That means that you are responsible for including the subset of WebDriver that you need to run your tests using the various WebDrivers:
plovr will only include the selenium-java-2.21.0.jar that is needed to compile against the WebDriver APIs, not all of the drivers themselves (IE, Chrome, Firefox, etc.).
Unfortunately, building up a long classpath for Java on the command line really sucks, and the easiest way that I do it is by using Ant. For example, to test this feature, I have been using this Ant script:
<project>
<target name="test">
<java classname="org.plovr.cli.Main" fork="true">
<classpath>
<fileset dir="../selenium-2.21.0/selenium-2.21.0" includes="*.jar"/>
<fileset dir="../selenium-2.21.0/selenium-2.21.0/libs" includes="*.jar"/>
<fileset dir="tools" includes="plovr.jar" />
</classpath>
<arg value="test" />
<arg value="pconfigs/desktop.js" />
</java>
</target>
</project>
Ultimately, when things are working properly, I will have better information documented on
http://plovr.com/testing.html. But if you are interested in this feature, it would be great to provide feedback now on how you think it should work before I invest more time in it.
Cheers,
Michael