How to remove standard output from vstest.console test run?

When I run the code below on the Developer Command for Visual Studio:

vstest.console.exe UnitTestAssemblyName.dll

I get the following:

Passed   Test_1   
Text
Text
Text
(...)
Passed   Test_2

Where "Text" is registered as a result of Test_2 C # unit test, which uses the C library with the fprintf operator (stdout, "Text"). I want to delete these output “Text” lines so that they do not appear in the console log, but I cannot change this C library. Can I do this?

I know a similar question that has an approved answer that recommends using MSTest instead of VSTest in this case. However, this is not a good solution in my case, because I am switching from MSTest to VSTest, and that is why I started to see this problem.

+4

Source: https://habr.com/ru/post/1672473/


All Articles