OpenTAP 9.27
API Reference
Public Member Functions | Properties | List of all members
OpenTap.TestStepRun Class Reference

Test step Run parameters. Contains information about a test step run. Unique for each time a test plan is run. If the same step is run multiple times during the same TestStep run, multiple instances of this object will be created. More...

Inheritance diagram for OpenTap.TestStepRun:
OpenTap.TestRun

Public Member Functions

void WaitForCompletion ()
 Waits for the test step run to be entirely done. This includes any deferred processing.
 
void WaitForCompletion (CancellationToken cancellationToken)
 Waits for the test step run to be entirely done. This includes any deferred processing. It does not break when the test plan is aborted
 
 TestStepRun (ITestStep step, Guid parent, IEnumerable< ResultParameter > attachedParameters=null)
 Constructor for TestStepRun. More...
 
bool BreakConditionsSatisfied ()
 Returns true if the break conditions are satisfied for the test step run.
 
void SetResultSource (IResultSource resultSource)
 Sets the result source for this run.
 
void PublishArtifact (Stream stream, string artifactName)
 Publishes an artifact for the test plan run. More...
 
Task PublishArtifactAsync (Stream stream, string artifactName)
 Publishes an artifact for the test plan run. More...
 
void PublishArtifact (string file)
 Publishes an artifact file for the test plan run.
 
Task PublishArtifactAsync (string file)
 Publishes an artifact file for the test plan run.
 
- Public Member Functions inherited from OpenTap.TestRun
 TestRun ()
 Creates a new TestRun
 

Properties

Guid Parent [get]
 Parent run that is above this run in the TestPlan tree.

 
Guid TestStepId [getprotected set]
 TestStep.Id of the TestStep that this run represents.

 
string TestStepName [getprotected set]
 TestStep.Name of the TestStep that this run represents.
More...
 
string TestStepTypeName [getprotected set]
 Assembly qualified name of the type of TestStep that this run represents.

 
Guid? SuggestedNextStep [getset]
 If possible, the next step executed. This can be implemented to support 'jump-to' functionality. It requires that the suggested next step ID belongs to one of the sibling steps of TestStepId.
 
bool SupportsJumpTo [getset]
 True if the step currently supports jumping to a step other than the next. Only true while the step is running or at BreakOffered.
 
TapThread StepThread [get]
 The thread in which the step is running.
 
- Properties inherited from OpenTap.TestRun
Guid Id [getprotected set]
 ID of this test run; can be used to uniquely identify a TestStepRun or TestPlanRun.

 
Verdict Verdict [get]
 OpenTap.Verdict resulting from the run.
 
Exception Exception [get]
 Exception causing the Verdict to be 'Error'.
 
virtual TimeSpan Duration [getprotected set]
 Length of time it took to run.
 
DateTime StartTime [getset]
 Time when the test started as a DateTime object.

 
long StartTimeStamp [getprotected set]
 Time when the test started as ticks of the high resolution hardware counter. Use with Stopwatch.GetTimestamp and Stopwatch.Frequency to convert to a timestamp.

 
ResultParameters Parameters [getprotected set]
 A list of parameters associated with this run that can be used by ResultListener.
 

Detailed Description

Test step Run parameters. Contains information about a test step run. Unique for each time a test plan is run. If the same step is run multiple times during the same TestStep run, multiple instances of this object will be created.

Constructor & Destructor Documentation

◆ TestStepRun()

OpenTap.TestStepRun.TestStepRun ( ITestStep  step,
Guid  parent,
IEnumerable< ResultParameter attachedParameters = null 
)
inline

Constructor for TestStepRun.

Parameters
stepProperty Step.
parentProperty Parent.
attachedParametersParameters that will be stored together with the actual parameters of the steps.

Member Function Documentation

◆ PublishArtifact()

void OpenTap.TestStepRun.PublishArtifact ( Stream  stream,
string  artifactName 
)

Publishes an artifact for the test plan run.

Parameters
streamThe artifact data as a stream. When publishing an artifact stream, the stream will be disposed by the callee and does not have to be disposed by the caller.
artifactNameThe name of the published artifact.

◆ PublishArtifactAsync()

Task OpenTap.TestStepRun.PublishArtifactAsync ( Stream  stream,
string  artifactName 
)

Publishes an artifact for the test plan run.

Parameters
streamThe artifact data as a stream. When publishing an artifact stream, the stream will be disposed by the callee and does not have to be disposed by the caller.
artifactNameThe name of the published artifact.

Property Documentation

◆ TestStepName

string OpenTap.TestStepRun.TestStepName
getprotected set

TestStep.Name of the TestStep that this run represents.


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