TestContext.Write Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Write(String) |
Used to write trace messages while the test is running |
Write(String, Object[]) |
Used to write trace messages while the test is running |
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
Used to write trace messages while the test is running
C#
public abstract void Write(string message);
C#
public abstract void Write(string? message);
abstract member Write : string -> unit
Public MustOverride Sub Write (message As String)
Parameters
- message
- String
formatted message string
Applies to
MSTest.TestFramework 3.8.0 and other versions
Product | Versions |
---|---|
MSTest.TestFramework | 2.1.2, 2.2.10, 3.0.4, 3.1.1, 3.2.2, 3.3.1, 3.4.3, 3.5.1, 3.6.4, 3.7.3, 3.8.0 |
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
- Source:
- TestContext.cs
Used to write trace messages while the test is running
C#
public abstract void Write(string format, params object[] args);
C#
public abstract void Write(string format, params object?[] args);
abstract member Write : string * obj[] -> unit
Public MustOverride Sub Write (format As String, ParamArray args As Object())
Parameters
- format
- String
format string
- args
- Object[]
the arguments
Applies to
MSTest.TestFramework 3.8.0 and other versions
Product | Versions |
---|---|
MSTest.TestFramework | 2.1.2, 2.2.10, 3.0.4, 3.1.1, 3.2.2, 3.3.1, 3.4.3, 3.5.1, 3.6.4, 3.7.3, 3.8.0 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: