I have some code that outputs to stdout:
std::cout << "foo" << std::endl;
I have a test written with Microsoft Unit Test Framework that calls that code. I then call the test:
vstest.console.exe myCode.dll
I expect to see "foo" but I don't see any stdout from my code. How do I see stuff that my code has written to stdout?
To be clear, I'm not talking about using Logger::WriteMessage()
, or any other method of printing a message from the test code. I am talking about seeing stdout from the code under test.
Honestly I feel insane for asking something so basic, something that other test frameworks don't make difficult, but my colleagues are also at a loss. What's the missing magic?