5

We are using Azure DevOps to run a build that runs tests using Visual Studio Test.

Everything is working fine, Console.WriteLine lines are being written to Standard Console Output.log, however TestContext.WriteLine are not appearing in the Detailed report.

The same lines are indeed appearing in the Output link on Test Explorer in Visual Studio.


Environment Information

Build Solution: Visual Studio 2017`

VSTest: Latest

Test Framework: MSTest.TestFramework 1.3.2

Test Adapter: MSTest.TestAdapter 1.3.2


Just to reiterate, TestContext is being instantiated correctly, and we are able to check the Output on local machine (Visual Studio 2015 Update 3), however the Ouput will not be published to Azure Pipelines build

Thank you, Regards

urig
  • 16,016
  • 26
  • 115
  • 184
elgato
  • 506
  • 1
  • 5
  • 20
  • I am also having same problem. In my local VS 2017 test cases are passing but when I checkin my code, run my build in Azure DevOps they are failing. I added TestContext.Writeline(..) I want to know where I can see those messages in Azure DevOps... – Ziggler Dec 18 '18 at 19:11
  • Did you find solution... – Ziggler Dec 18 '18 at 19:11
  • 1
    Hi @Ziggler, use `Console.WriteLine` or `Debug.WriteLine`, I still have not found a solution for this problem. Regards – elgato Dec 27 '18 at 12:50
  • I used TestContext.WriteLine.. In Azure DevOps, I got my build -> run test cases stage. There you will see Publish Test Case Results to link. I go there and download .trx file and open in NotePad and there I see my logs... That's enough for me. – Ziggler Dec 27 '18 at 18:10

0 Answers0