Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using msbuild.exe to push Test results to TFS 2010, but do not see the results show up

Using Mstest.exe to run a collection of unit tests and push the results into TFS gives the following output as expected:

MSTest command:

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe" /testcontainer:C:\temp\AnyCPU\Release\TestAssembly.dll /publish:http://tfsserver:8080/tfs/prod /TeamProject:ProjectName /publishbuild:1.2.3.4.5 /platform:AnyCPU /flavor:Release"

output:

Summary
-------
Test Run Completed.
  Passed  15
  ----------
  Total   15
Results file:  C:\temp\MachineName 2012-04-17 18_57_48_AnyCPU_Release.trx
Test Settings: Default Test Settings
Waiting to publish...
Publishing results of test run alias@machinename 2012-04-17 18:57:48_AnyCPU_Release to http://tfsHost:8080/tfs/prod.
..
........Publish completed successfully.

However, looking in TFS and in reporting services I do not see these results available anywhere. It is quite possible that I'm not looking in the correct place, or do not have proper permissions.

How may I see these Test Results in TFS or its operational store?

UPDATE: Solved

The problem was that MSTEST.exe shows a successful publish even if it does not properly associate with a build.

The problem was with the /platform:"Any CPU" flag I was using. It wanted /platform:"Any CPU" which includes a space between Any and CPU

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe" /testcontainer:C:\temp\AnyCPU\Release\TestAssembly.dll /publish:http://tfsserver:8080/tfs/prod /TeamProject:ProjectName /publishbuild:1.2.3.4.5 /platform:"AnyCPU" /flavor:"Release"
like image 538
Chris Ballance Avatar asked Apr 17 '12 23:04

Chris Ballance


1 Answers

You can see this also from the MTM as an Automation runs, and can analyze this result and recorded why it fail to reflect this to the plan

enter image description here

like image 176
Mohamed.Radwan -MVP Avatar answered Oct 11 '22 18:10

Mohamed.Radwan -MVP