TestContext Properties

Include Protected Members
Include Inherited Members

The TestContext type exposes the following members.

Properties

  Name Description
Public property CurrentTestOutcome You can use this property in a TestCleanup method to determine the outcome of a test that has run.
Public property DataConnection When overridden in a derived class, gets the current data connection when the test is used for data driven testing.
Public property DataRow When overridden in a derived class, gets the current data row when test is used for data driven testing.
Public property DeploymentDirectory Gets the directory for files deployed for the test run. This property typically contains a subdirectory of TestRunDirectory.
Public property FullyQualifiedTestClassName Gets the fully-qualified name of the class that contains the test method that is currently running.
Public property Properties When overridden in a derived class, gets the test properties.
Public property RequestedPage Gets the requested page.
Public property ResultsDirectory Gets the top-level directory that contains test results and test result directories for the test run. This is typically a subdirectory of TestRunDirectory.
Public property TestDeploymentDir Gets the path to the test deployment directory. Deprecated. Use DeploymentDirectory instead.
Public property TestDir Gets the path to the test directory. Deprecated. Use TestRunDirectory instead.
Public property TestLogsDir Gets the path to the test log directory. Deprecated. Use TestRunResultsDirectory instead.
Public property TestName Gets the test name.
Public property TestResultsDirectory Gets the directory for the test result files.
Public property TestRunDirectory Gets the top-level directory for the test run that contains deployed files and result files.
Public property TestRunResultsDirectory Gets the top-level directory for the test run result files. This property typically contains a subdirectory of ResultsDirectory.

Top

See Also

Reference

TestContext Class

Microsoft.VisualStudio.TestTools.UnitTesting Namespace