Where is the TFS UNIT test stored?

I run:

  • VS 2012
  • Latest TFS Version
  • Separate build agent on a dedicated virtual machine

My tests are built on builds and unit tests. In my assembly, I found the following folder: C: \ Builds \ 4 \ SolutionName \ SolutionName \ TestResults, but, unfortunately, it is empty. I would like to find and analyze test result files. I would like to know what matches the build results and what it's called using a third-party tool. Somebody knows?

+6
source share
2 answers

It probably depends on your MSBuild / MSTest settings, especially for a gated build (which can do different things in different ways), but hopefully one of the following might at least offer you some hints ...

Test results are usually deleted in the server build folder (not in the drop folder, but in the working folder, in which the MSBuild process stores and builds all the source code, etc.) using datestamped filenames for each of the test runs you performed.

However, it looks like your folder is empty, which indicates that you are looking for the wrong place (if you are doing a gated assembly, it may use a different working folder than the regular assembly, perhaps the C: \ Builds \ 4 folder is next) , or test results are not generated (disabled or not working).

I would try to find the build log, as it will almost certainly tell you what happened to the tests, and if / where any results were written.

If you can find the test result files, you can simply double-click the main test result file to load the test results in Visual Studio (to display the test results in the user interface) - so programmatically you should be able to simply Process.Start(testResultsFilename) to run Visual Studio to view the results (while VS is installed on the computer on which you are using your tool).

+1
source
  • In Team Explorer, view assemblies (double-click the name of your assembly)
  • Find and view the completed assembly file (double-click to open).
  • Click the "view log at the top " link.
  • Scroll down to the section "Starting MSTest for the metadata file"

At the end of the section, you will see the details as shown below: shows the location of .trx (test result file):

 Results file: C:\Source\TestResults\tfsbuild_PMBUILD7 2013-08-05 08_32_02_Any CPU_Release.trx Test Settings: Default Test Settings Waiting to publish... Publishing results of test run tfsbuild@PMBUILD7 2013-08-05 08:32:02_Any CPU_Release to http://pmtfs:8080/tfs/DefaultCollection... ....Publish completed successfully. 
+3
source

All Articles