3

The log entry shows up fine in the test console when I call Log.Information("Test") from my integration test file. If I call the same static function from within the controller being tested with a WebApplicationFactory, nothing will show up in the test console.

Oddly enough, Console.WriteLine("Test") also doesn't show up in the test console when called from a controller created with a WebApplicationFactory

Is there a way to display in the test console log entries dispatched from controllers being tested using a WebApplicationFactory? Or simply a way to redirect console output from the created WebHost to the test output?

0 Answers0