2

I did some transform on the server for my UnitTests from xUnit Xml to Trx as part of my build. This way TFS can show the UnitTest counts in the build summary. That part works fine, the user can see the count of the UnitTests on the summary of the build. The user can also click the link and see the list of UnitTests that were run under the "Test results" tab. UnitTest List

However when you double click one of the tests to see the standard output from the UnitTest, TFS does not show the standard output.

As seen in this image TFS 2015

When I take the same Trx file and view it in VS 2015. The text shows as expected. VS 2015

I'm at loss why it won't show in TFS, I tried to populate all of the sections I think are relevant under output, such as.

<StdOut>
<DebugTrace>
<TextMessages>
<TraceInfo>
Orn Kristjansson
  • 3,435
  • 4
  • 26
  • 40

2 Answers2

0

Make sure you have selected "Upload Test Attachments" in "Visual Studio Test" step:

enter image description here

Then you'll see the .trx attachment:

enter image description here

Adding more screenshots:

enter image description here

enter image description here

enter image description here

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • That part is working fine, the results are attaching as they should. What I'm focusing on is the output of the individual test when I drill down test by test. I do not see the output of the test in TFS, but I do see it in Visual Studio. Unless it's a test that failed, then I do see the Error message and the stacktrace both in TFS and VS. – Orn Kristjansson Mar 17 '16 at 17:15
  • So you want to know how many test methods in the test run, correct? You can get test result from build summary, or Run summary, or test results (check the adding screenshots). I'm using TFS 2015 Update2 RC2. – Cece Dong - MSFT Mar 18 '16 at 09:07
  • I have updated my question to better describe what I'm experiencing. No, that part is working just fine, it gives me count of the UnitTests and the nice little graphs as well. When I drill down on one UnitTest the standard output for that test is not shown. It shows in Visual Studio but not in TFS, using the same Trx file. – Orn Kristjansson Mar 18 '16 at 16:26
  • Seems TFS web access don't show the .trx result. You can submit your thought at website https://visualstudio.uservoice.com/forums/121579-visual-studio-2015. – Cece Dong - MSFT Mar 21 '16 at 12:02
0

I have the same thing - I have test cases that fail. When I look at the failed test; I can see the Error Message, and the Stack Trace, but the Stdout is missing? (See linked image)

To find out where in the test it failed - I have to navigate to the Test Run summary, download the .trx file, then open it in Visual Studio, then clicking on the failed test shows me all three (error,stack and output).

Test Case result

Jason A
  • 46
  • 8