microsoft/Vipr

[Test code improvement] Suppress request/response standard output from MockService while running tests.

Closed this issue · 5 comments

Description

At the moment, when unit tests are run on a command line, they produce thousands of lines of REQUEST <<<<<<< and RESPONSE >>>>> information. This output is useful for debugging failing tests, however in this case it makes it hard to use command line tools to test VIPR.

I think we should suppress this output unless the test fails. That way, we get output for cases where we want to debug and we still can use our CLI tools to build and test efficiently. This will also make it easier for other developers to interpret failures from our CI builds.

Minimal repro steps

Run test.cmd

Expected result

Only place information on standard output when it pertains to a test failure.
Little noise

Actual result

Immense amounts of noise from generated request patterns that don't help identify issues.

Do you have a strategy for limiting output to failing tests only in XUnit?

I've got no clue. I was doing a build and figured I'd log an issue to track this. I'd tag this as up-for-grabs + needs-investigation.

You can assign to me. I'll move the output to show up only when running under the debugger. 5 points to anyone who figures out how to determine we're on a test failure path, though :)

@MrTomWhite This is addressed in PR #56. Please verify & close the issue.

Fixed by PR #56