【发布时间】:2012-01-13 00:50:31
【问题描述】:
我想弄清楚如何让 TeamCity 运行我的 MSTest。我已经使用以下参数设置了构建步骤:
- MSTest.exe 的路径: %system.MSTest.10.0%
- 列出程序集文件: Projects\Metadude..Tests\bin\Debug\Metadude..Test.dll
- MSTest 运行配置文件: Local.testsettings
但是,当此步骤运行时,它不会执行任何测试。这是日志的输出:
[02:13:49]: Step 2/2: Run Unit Tests (MSTest)
[02:13:49]: [Step 2/2] Starting: "D:\Program Files (x86)\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe" #TeamCityImplicit
[02:13:49]: [Step 2/2] in directory: D:\Program Files (x86)\TeamCity\buildAgent\work\1f82da3df0f560b6
[02:13:50]: [Step 2/2] Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1
[02:13:50]: [Step 2/2] Copyright (c) Microsoft Corporation. All rights reserved.
[02:13:50]: [Step 2/2]
[02:13:50]: [Step 2/2] Please specify tests to run, or specify the /publish switch to publish results.
[02:13:50]: [Step 2/2] For switch syntax, type "MSTest /help"
[02:13:50]: [Step 2/2] Process exited with code 1
[02:13:50]: Publishing internal artifacts
[02:13:50]: [Publishing internal artifacts] Sending build.finish.properties.gz file
[02:13:50]: Build finished
我已尝试使用以下命令指定要运行的测试:
- 测试: Tests.Metadude.Core.Extensions.StringExtensionsTests
但这不起作用。我似乎在 Google 上找不到任何与 TeamCity 中的 MSTest 构建步骤相关的文档。
更新 好吧,我是个白痴。好吧,这可能有点苛刻,但是测试程序集的程序集名称中缺少一个“s”。不过,如果能在构建日志中得到这样的效果,那就太好了。
【问题讨论】:
-
@Leslie Hanks 答案中的哪些步骤解决了您的问题?
-
@wal 好吧,我的程序集名称有误。
-
我也是一个白痴,错过了程序集名称中的“s”。值得三重检查:)
标签: .net continuous-integration teamcity mstest