OpenTAP 9.27
API Reference
Public Member Functions | Properties | Events | List of all members
OpenTap.IResourceManager Interface Reference

A resource manager implements this interface to be able to control how resources are opened and closed during a testplan execution. More...

Inheritance diagram for OpenTap.IResourceManager:
OpenTap.ITapPlugin

Public Member Functions

void WaitUntilAllResourcesOpened (CancellationToken cancellationToken)
 Waits for all the resources that have been signalled to open to be opened. More...
 
void WaitUntilResourcesOpened (CancellationToken cancellationToken, params IResource[] targets)
 Waits for the specific resources to be open. More...
 
void BeginStep (TestPlanRun planRun, ITestStepParent item, TestPlanExecutionStage stage, CancellationToken cancellationToken)
 Signals that an action is beginning. More...
 
void EndStep (ITestStepParent item, TestPlanExecutionStage stage)
 Signals that an action has completed. More...
 

Properties

IEnumerable< IResourceResources [get]
 Get a snapshot of all currently opened resources.
 
IEnumerable< IResourceStaticResources [getset]
 Sets the resources that should always be opened when the testplan is.
 
List< ITestStepEnabledSteps [getset]
 This property should be set to all teststeps that are enabled to be run.
 

Events

Action< IResourceResourceOpened
 This event is triggered when a resource is opened. The event may block in which case the resource will remain open for the entire call.
 

Detailed Description

A resource manager implements this interface to be able to control how resources are opened and closed during a testplan execution.

Member Function Documentation

◆ BeginStep()

void OpenTap.IResourceManager.BeginStep ( TestPlanRun  planRun,
ITestStepParent  item,
TestPlanExecutionStage  stage,
CancellationToken  cancellationToken 
)

Signals that an action is beginning.

Parameters
planRunThe planrun for the currently executing testplan.
itemThe item affected by the current action. This can be either a testplan or a teststep.
stageThe stage that is beginning.
cancellationTokenUsed to cancel the step early.

◆ EndStep()

void OpenTap.IResourceManager.EndStep ( ITestStepParent  item,
TestPlanExecutionStage  stage 
)

Signals that an action has completed.

Parameters
itemThe item affected by the current action. This can be either a testplan or a teststep.
stageThe stage that was just completed.

◆ WaitUntilAllResourcesOpened()

void OpenTap.IResourceManager.WaitUntilAllResourcesOpened ( CancellationToken  cancellationToken)

Waits for all the resources that have been signalled to open to be opened.

Parameters
cancellationTokenUsed to cancel the wait early.

◆ WaitUntilResourcesOpened()

void OpenTap.IResourceManager.WaitUntilResourcesOpened ( CancellationToken  cancellationToken,
params IResource[]  targets 
)

Waits for the specific resources to be open.

Parameters
cancellationTokenUsed to cancel the wait early.
targets

OpenTAP 9.27 API built Wed Nov 27 2024 13:14:45