Share via


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

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

See Also

Reference

ITestExecutionPlugin Interface

Microsoft.VisualStudio.TestTools.Execution Namespace

TestEnd

IDataCollectionRunContext