Tom*_*omi 6 unit-testing white-framework ui-testing jenkins teststack
我正在寻找一个从命令行开始测试的解决方案.
我也想从詹金斯开始.我认为从命令行最简单,所以我将它添加到我的管道配置(Jenkinsfile)
stage('Run UI Tests') {
steps {
bat('"C:\\PATH_TO_MSTEST\\mstest" /testcontainer:PATH_TO_MY_TEST_PROJECT\\bin\\Debug\\MyTests.dll')
}
}
Run Code Online (Sandbox Code Playgroud)当我尝试从cmd启动它时,就像我使用常规单元测试一样,它不起作用.
它说:
Starting execution...
No tests to execute.
Run Code Online (Sandbox Code Playgroud)
我在开始"运行UI测试"阶段之前构建项目.
任何想法如何使其工作?可以在stackoverflow,TestStack的github问题以及网络上的其他荣耀位置找到它
找到了解决方案。在我的本地开发人员机器上它正在工作,mstest版本是14 在构建代理机器上,mstest版本是15,这在某种程度上不起作用(它与 TestStack White 无关,只是单元测试不起作用)
我所做的是调用vstest.console.exe而不是mstest。
C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe
Run Code Online (Sandbox Code Playgroud)
所以,而不是
stage('Run UI Tests') {
steps {
bat('"C:\\PATH_TO_MSTEST\\mstest" /testcontainer:PATH_TO_MY_TEST_PROJECT\\bin\\Debug\\MyTests.dll')
}
}
Run Code Online (Sandbox Code Playgroud)
我在 Jenkinsfile 中的命令是:
stage('Run UiTests') {
steps {
bat('"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\TestAgent\\Common7\\IDE\\Extensions\\TestPlatform\\vstest.console.exe" PATH_TO_MY_TEST_PROJECT\\bin\\Debug\\MyTests.dll')
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
293 次 |
| 最近记录: |