Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITestExecutionPlugin::BeforeTestStarted Method (IDataCollectionRunContext^, TestExecId^)

 

This method is called before a test starts.

Namespace:   Microsoft.VisualStudio.TestTools.Execution
Assembly:  Microsoft.VisualStudio.QualityTools.ExecutionCommon (in Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll)

bool BeforeTestStarted(
	IDataCollectionRunContext^ runContext,
	TestExecId^ id
)

Parameters

runContext
Type: Microsoft.VisualStudio.TestTools.Execution::IDataCollectionRunContext^

An IDataCollectionRunContext object that represents the context for the test.

id
Type: Microsoft.VisualStudio.TestTools.Common::TestExecId^

The test ID. 

Return Value

Type: System::Boolean

true if the agent should continue to run the test; false if the agent should not run the test.

System_CAPS_noteNote

When false is returned, the agent assumes that the plug-in reported a test failure for that test and does not record a result. Even when false is returned, the plug-in will still raise a TestEnd event for that test.

Return to top
Show: