locked
TFS 2012 Build Unit Test Runsettings Missing Test Results RRS feed

  • Question

  • Hello all.

    I have set up a new workflow and build definition using 2012 templates. The build runs unit tests using a runsettings file.  The Visual Studio build summary has the unit test data (pass/fail) and code coverage numbers as expected.  When I check the build agent output folders, I cannot find the actual test results file (.trx) and code coverage file (.coverage) in the TestResults folder.  I can download them from TFS but I cannot find them in the build agent.  When I run vstest using the runsettings file and using /logger:trx, those files I am looking for are generated and present. 

    How can I get the TFS build to generate those files on the build agent?


    -7

    Wednesday, October 29, 2014 12:21 AM

Answers

  • Hi,

    Thanks for your post.

    As far as I know, TFS build agent calls vstest.console.exe to run the test, there is not /logger:trx option by default, so you can't see .trx file on build agent machine:

    But if you choose MSTest.exe to run the test, the .trx file will be generated automatically:


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    • Edited by Cece Dong Wednesday, October 29, 2014 9:29 AM update
    • Marked as answer by smyrin Wednesday, October 29, 2014 3:13 PM
    Wednesday, October 29, 2014 9:25 AM

All replies

  • Hi,

    Thanks for your post.

    As far as I know, TFS build agent calls vstest.console.exe to run the test, there is not /logger:trx option by default, so you can't see .trx file on build agent machine:

    But if you choose MSTest.exe to run the test, the .trx file will be generated automatically:


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    • Edited by Cece Dong Wednesday, October 29, 2014 9:29 AM update
    • Marked as answer by smyrin Wednesday, October 29, 2014 3:13 PM
    Wednesday, October 29, 2014 9:25 AM
  • Link to last reply

    So you can consider choosing MSTest.exe to run the test in Build Definition:

    And point the MSTest ToolPath to VS 2012 version(the default is VS 2010, the ToolPath should look like: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE):

    Let us know whether this works.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Cece Dong Wednesday, October 29, 2014 9:37 AM update
    Wednesday, October 29, 2014 9:33 AM
  • Thanks for the response.  I just needed confirmation that use of the vstest via TFS Build does not by default produce the .trx and .coverage files. 

    -7

    Wednesday, October 29, 2014 3:13 PM