简体   繁体   English

使用Visual Studio 2010设置jsTestDriver

[英]jsTestDriver set up with Visual Studio 2010

Am following this tutorial to set up jsTestDriver with Visual Studio 2010: 我正在按照本教程使用Visual Studio 2010设置jsTestDriver:

http://slmoloch.blogspot.com/2009/08/how-to-run-jstestdriver-with-visual_02.html 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: 我设法启动jsTestDriver服务器并捕获浏览器,但是当我尝试运行示例测试时,出现以下错误:

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. 作为一个完全菜鸟,我真的不知道从哪里开始调试它。

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. 好吧,我可以在另一个示例项目中通过命令行轻松地运行它,因此我考虑了一下,发现这是因为未找到jsTestDriver.conf。

Thus moving the file jsTestDriver.conf to the root of my project solved the problem, hope this helps. 因此将文件jsTestDriver.conf移到我项目的根目录即可解决此问题,希望对您有所帮助。 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! 如果这样不能解决问题,请查看项目所在的位置,然后将文件移动几下,最终可以正常工作!

为了解决此问题,我不得不将jsTestDriver.conf和所有* .js文件都保存为US-ASCII-代码页20127。通常,Visual Studio使用Unicode(带签名的UTF-8)-代码页65001。可以通过文件>高级保存选项...来更改设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM