我有一个C#.NET单元测试项目,它使用ChromeDriver在网页上运行自动UI测试。这是在Windows 7 64位上。这些测试在Visual Studio 2010中运行良好。Selenium WebDriver + ChromeDriver + Jenkins + MSTest
我已经设置了一个Jenkins盒以在本地(在主服务器上)运行测试,它是Windows 2008 Server。测试构建,但是我的MSTest命令神秘失败:
“C:\ Program Files文件(x86)的\微软的Visual Studio 10.0 \ Common7 \ IDE \ MSTest.exe”/ resultsfile:C:\詹金斯\职位\ FXO_UI_Tests \ workspace \ TestResults.TRX /testcontainer:c:\jenkins\jobs\FXO_UI_Tests\workspace\bin\Debug\Calculators.FXOptions2.Automation2.dll /testsettings:c:\ jenkins \ jobs \ FXO_UI_Tests \ workspace \ FXO .testsettings
有了这个输出:
Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Loading c:\jenkins\jobs\FXO_UI_Tests\workspace\FXO.testsettings...
Loading c:\jenkins\jobs\FXO_UI_Tests\workspace\bin\Debug\Calculators.FXOptions2.Automation2.dll...
c:\jenkins\jobs\FXO_UI_Tests\workspace\bin\Debug\Calculators.FXOptions2.Automation2.dll
The file exists.
c:\jenkins\jobs\FXO_UI_Tests\workspace>exit 1
Build step 'Execute Windows batch command' marked build as failure
令人烦恼的部分是,粘贴在命令窗口中的相同MSTest命令运行得非常好。手动运行时,我看不到“文件存在”。
我曾尝试将Jenkins作为服务运行,但它目前在登录用户帐户中独立运行。同样的詹金斯设置可以打开Chrome.exe,所以我不明白为什么该命令刚刚结束。
请帮忙!