I'm using MSTest to run some tests (in C#). One of the routines I'm testing creates a new process and that process often dumps some output stdout. I'd like to capture that output in the test. While it isn't important to see if the test failed, it is very helpful in figuring out why the test failed. How can I do this?
Some details. Unfortunately, I can't touch the code that is creating the process. Worse, it is C++, and it is being called via a C++/CLI wrapper. If I create a .NET console app (in C#) then the stdout of the subprocess I want to capture does appear in the window of the console app when it makes the call. When I run the same code in the MSTest context the sub-process creation pops up a new window, and the subprocess dumps its output in that window. It is that output I'd like to capture if at all possible.
Many thanks!