-
Hi, I recently started to use Is there a way to have Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @dfev77 public static class TestContextExtensions {
public static void LogToProgressAndOutput(this TestContext context, string message) {
context.Out.WriteLine(message);
context.Progress.WriteLine(message);
}
} could then be invoked as TestContext.Current.LogToProgressAndOutput("hello world"); |
Beta Was this translation helpful? Give feedback.
Hi @dfev77
To my knowledge they are different output streams to serve different use cases, but if you want to write to both easily you would likely need to code that yourself. A minimal way to do this could be define your own extension method on the
TestContext
class. For example, the following untested code:could then be invoked as