Export test results from Test Explorer visual studio 2013

可紊 提交于 2019-12-10 17:23:20

问题


I want to find a solution to export my test results from test explorer to TFS or any other format like excel. I saw some posts bases on .trx file. In test results folder of my project I have a folder generated each time I run a test with 2 sub folders IN and OUT. The IN folder is always empty and OUT folder contains AgentRestart.dat file. If I run my whole test suite I can only see number of passed and failed tests in Test Explorer. To find out result of each test case and store I need to select on test case one at a time and copy paste to word. I'm looking for a better solution.

I'm using unit test project with MS Test.

Can some one help me with this?

Thanks


回答1:


Currently, there is no way to export test results from VS UI. However, you can use VSTest.Console.exe command-line to achieve it:

vstest.console.exe myTestFile.dll /Logger:trx

If you want to To publish test results to Team Foundation Server, use TfsPublisher:

/logger:TfsPublisher;
Collection=<team project url>;
BuildName=<build name>;
TeamProject=<team project name>;
[;Platform=<Defaults to “Any CPU”>]
[;Flavor=<Defaults to “Debug”>]
[;RunTitle=<title>]


来源:https://stackoverflow.com/questions/37052807/export-test-results-from-test-explorer-visual-studio-2013

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