TFS Build Test Results

自古美人都是妖i 提交于 2019-12-30 07:55:47

问题


We're working on Visual Studio 2010 and TFS 2010. We have our own BuildTemplate that is a copy of default template, but with some additions like (create Directory...), but the main point, that all that is in DefaultTemplate - is left.

We have witten "unit" tests that also are working. I have made Build definition that runs all the unit tests. Have read the information here - http://geekswithblogs.net/jakob/archive/2009/06/03/tfs-team-build-2010-running-unit-tests.aspx and a lot of other places also.

Build runs just perfect, the only thing that is'nt working is a Build summary - Test results, Code coverage like in the link above.

So when i'm watching Activity log while building my application, it shows that:

Run MSTest for Test Assemblies
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe /nologo /usestderr /testSettings:"C:\Builds\7\**Project**\**BuildName**\Sources\**ProgramName**\**ProgNameAndVersion**\Solutions\**SolutionName**\localtestrunDebug.testrunconfig" /searchpathroot:"C:\Builds\7\**Project**\**BuildName**\Binaries" /resultsfileroot:"C:\Builds\7\**Project**\**BuildName**\TestResults" /testcontainer:"C:\Builds\7\**Project**\**BuildName**\Binaries\**TestProjectName**.dll" /publish:"http://***:8080/tfs/MSLN" /publishbuild:"***:///Build/Build/14599" /teamproject:"**ProjectName**" /platform:"x86" /flavor:"**Release**" 
Loading C:\Builds\7\**Project**\**BuildName**\Sources\**ProgramName**\**ProgNameAndVersion**\Solutions\**SolutionName**\localtestrunDebug.testrunconfig...
Loading C:\Builds\7\**Project**\**BuildName**\Binaries\**TestProjectName**.dll...
Starting execution...

Results               Top Level Tests
-------               ---------------
Failed                ***.Test.***
Failed                ***.Test.***
Failed                ***.Test.***
Passed                ***.Test.***
Passed                ***.Test.***
Inconclusive          ***.Test.***
Inconclusive          ***.Test.***
Passed                ***.Test.***
<many other tests>
...
5/154 test(s) Passed, 147 Failed, 2 Inconclusive

Summary
-------
Test Run Failed.
Failed        147
Passed          5
Inconclusive    2
-----------------
Total         154
Results file:  C:\Builds\7\**Project**\**BuildName**\TestResults\***tfsbuild_***TFSBUILDER 2013-04-19 10_03_42_x86_Release.trx
Test Settings: Local Test Run

And at the end of the Build summary is blank:

1 projects/solutions compiled No Test Results No Code Coverage Results

Why does it not show test results like in the link: http://geekswithblogs.net/jakob/archive/2009/06/03/tfs-team-build-2010-running-unit-tests.aspx

I'm a starter in TFS so help me with this by giving advices in simple language =)

This link seems to have moved to (edited 2019-09-23): https://blog.ehn.nu/2009/06/tfs-team-build-2010-executing-unit-tests/


回答1:


You probably don't have required permissions to see test results. Please check you permissions for example with TFS 2010 Power Tools or some other tool. With TFS Power Tool you go to Team > Team Project Settings > Security and check View test runs permission on the group that you are in.




回答2:


You could also copy up your .trx files to the workspace.



来源:https://stackoverflow.com/questions/16099280/tfs-build-test-results

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!