PlannedTest Class
Definition
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.
Represents a single test that is planned to run (i.e. has been discovered and passed the active filter) in the current test run. Returned by PlannedTests.
public sealed class PlannedTest
[System.Diagnostics.CodeAnalysis.Experimental("MSTESTEXP", UrlFormat="https://aka.ms/mstest/diagnostics#{0}")]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class PlannedTest
type PlannedTest = class
[<System.Diagnostics.CodeAnalysis.Experimental("MSTESTEXP", UrlFormat="https://aka.ms/mstest/diagnostics#{0}")>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type PlannedTest = class
Public NotInheritable Class PlannedTest
- Inheritance
-
PlannedTest
- Attributes
Remarks
Instances are immutable snapshots produced at the start of test execution for the assembly. They are intended for read-only inspection (for example to decide whether expensive setup is needed in [AssemblyInitialize]); they do not carry execution-time state such as outcome, exceptions, or data-driven rows.
Constructors
| Name | Description |
|---|---|
| PlannedTest(String, String, String, String, String, String, String, Nullable<Int32>, IReadOnlyCollection<String>, IReadOnlyCollection<KeyValuePair<String, String>>) |
Initializes a new instance of the PlannedTest class. |
Properties
| Name | Description |
|---|---|
| AssemblyPath |
Gets the full path of the assembly that declares the test, on disk. |
| DeclaringFilePath |
Gets the source file path that declares the test. This value is captured at compile time
by TestMethodAttribute; it can be |
| DeclaringLineNumber |
Gets the line number within DeclaringFilePath at which the test is declared,
when available; otherwise |
| FullyQualifiedTestClassName |
Gets the fully-qualified name of the class declaring the test method. Mirrors FullyQualifiedTestClassName. |
| ManagedMethodName |
Gets the ECMA-335 managed method name (encoding parameter types) for the test method, when available. Use this for unambiguous identification of overloaded methods. |
| ManagedTypeName |
Gets the ECMA-335 managed type name for the declaring type, when available. |
| TestCategories |
Gets the categories applied to this test via TestCategoryAttribute at the method, class, or assembly level. |
| TestDisplayName |
Gets the display name of the test, when one was set; otherwise |
| TestName |
Gets the simple name of the test method. Mirrors TestName. |
| TestProperties |
Gets the name/value pairs applied to this test via TestPropertyAttribute. Multiple attributes with the same name are preserved as separate entries. |