0
votes

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.

We just installed a full version of VS 2013 Premium on the build server (because prior tests were not being run at all). 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.

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. 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?

1
What test framework are you using? MSTest, NUnit, Xunit, MBUnit, etc? What build process template are you using?Daniel Mann
@DanielMann NUnit via the VS Test Runner (no option to change), default template (not the upgrade template). Will update the question as well.Dave Johnson
Do you have the NUnit test adapter set up as a NuGet package in your test project?Daniel Mann
@DanielMann Yes, we do.Dave Johnson

1 Answers

0
votes

Each individual test needs to be associated with a test case work item in 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. 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. 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.