ITestExecutionPlugin.BeforeTestStarted Method
This method is called before a test starts.
Namespace: Microsoft.VisualStudio.TestTools.Execution
Assembly: Microsoft.VisualStudio.QualityTools.ExecutionCommon (in Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll)
Syntax
'Declaration
Function BeforeTestStarted ( _
runContext As IDataCollectionRunContext, _
id As TestExecId _
) As Boolean
bool BeforeTestStarted(
IDataCollectionRunContext runContext,
TestExecId id
)
bool BeforeTestStarted(
IDataCollectionRunContext^ runContext,
TestExecId^ id
)
abstract BeforeTestStarted :
runContext:IDataCollectionRunContext *
id:TestExecId -> bool
function BeforeTestStarted(
runContext : IDataCollectionRunContext,
id : TestExecId
) : boolean
Parameters
runContext
Type: Microsoft.VisualStudio.TestTools.Execution.IDataCollectionRunContextAn IDataCollectionRunContext object that represents the context for the test.
id
Type: Microsoft.VisualStudio.TestTools.Common.TestExecIdThe test ID.
Return Value
Type: Boolean
true if the agent should continue to run the test; false if the agent should not run the test.
Note
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
ITestExecutionPlugin Interface