简体   繁体   English

TFS 2013构建摘要未显示测试结果

[英]TFS 2013 Build Summary Not Showing Test Results

Similar issue as this question (which does not have an answer), except we are using TFS 2013 Update 4. Our tests are written using NUnit and are configured to run through the build definition, which uses the default (not upgrade) template. 该问题类似的问题(没有答案),除了我们使用的是TFS 2013 Update4。我们的测试是使用NUnit编写的,并且配置为通过构建定义运行,该定义使用默认(而非升级)模板。

We just installed a full version of VS 2013 Premium on the build server (because prior tests were not being run at all). 我们只是在构建服务器上安装了VS 2013 Premium的完整版本(因为以前的测试根本没有运行)。 With that installed, the tests are run (if I did down into the log I can see them and the results, and if we force a failure the build appropriately fails) but the build summary says that 0/0 tests were run. 安装该工具后,将运行测试(如果我记入日志,则可以看到它们和结果,并且如果我们强制失败,则构建会相应地失败),但是构建摘要指出已运行0/0测试。

I followed the steps in the selected answer to this question , and it now shows the code coverage results, but still no dice on the actual tests or their results. 我也跟着在选择答案的步骤这个问题 ,现在显示的代码覆盖率结果,但仍然没有骰子上的实际测试或他们的结果。

I also found this blog article that appears to be the same issue from TFS 2010. I have verified that all users have the View Test Runs permission set to allow, and I tried using a TFS administrator account just to be sure. 我还发现此博客文章似乎与TFS 2010存在相同的问题。我已验证所有用户的“查看测试运行”权限均已设置为允许,并且为了确保确实尝试使用TFS管理员帐户。 Still no dice. 仍然没有骰子。

How do I make TFS show me what tests were run in the summary, and also in the Test Results window that the build summary links to? 如何使TFS向我显示摘要中以及构建摘要链接到的“测试结果”窗口中运行了哪些测试?

Each individual test needs to be associated with a test case work item in Team Foundation Server. 每个单独的测试都需要与Team Foundation Server中的测试用例工作项相关联。 See this link for information on how to associate your tests. 有关如何关联测试的信息,请参见此链接 In my work, we're using TFS 2015, but I know this works in TFS 2013 as I have done this work in the past. 在我的工作中,我们正在使用TFS 2015,但是我知道TFS 2013中的工作原理与过去一样。 Once the test case work item is associated with your automation (using Visual Studio to link the test automation to the test case) then there must be a build definition for the product under test that runs your test automation as part of the build. 一旦测试用例工作项与您的自动化相关联(使用Visual Studio将测试自动化链接到测试用例),则必须有被测产品的构建定义,该定义将您的测试自动化作为构建的一部分运行。 When a build is queued, your tests are run as part of the new build. 当构建排队时,您的测试将作为新构建的一部分运行。 Once the build is done, you can then view the detailed test results. 构建完成后,您可以查看详细的测试结果。

Plus the other StackOverflow post here describes how to view the detailed results. 加上此处的其他StackOverflow帖子介绍了如何查看详细结果。

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

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