jsTestDriver set up with Visual Studio 2010

759 Views Asked by At

Am following this tutorial to set up jsTestDriver with Visual Studio 2010:

http://slmoloch.blogspot.com/2009/08/how-to-run-jstestdriver-with-visual_02.html

I manage to start the jsTestDriver server and capture a browser but when i try and run the example tests i get the following error:

java.lang.RuntimeException: Oh Snap! No server defined!
    at com.google.jstestdriver.config.DefaultConfiguration.getServer(DefaultConfiguration.java:57)
    at com.google.jstestdriver.config.Initializer.initialize(Initializer.java:97)
    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: Oh Snap! No server defined!
 Use --runnerMode DEBUG for more information.

Being a total noob to this i don't really know where to start debugging this.

2

There are 2 best solutions below

2
On

Ok, I ran into the same problem.

Well, I can easily run this with command line with another sample project, so I thought about it and discovered that it is because the jsTestDriver.conf was not found.

Thus moving the file jsTestDriver.conf to the root of my project solved the problem, hope this helps. If that doesn't fix it, look at where the project is at, and move the file around a few times, it will end up working!

0
On

In order to solve this problem, I had to save the files, both jsTestDriver.conf and all *.js files, as US-ASCII - Codepage 20127. Normally Visual Studio uses Unicode (UTF-8 with signature) - Codepage 65001. This setting can be changed via File > Advanced Save Options...