Object that holds the state of a specific TestPlan run. Also internally manages resources and threads relating to the TestStepRun. Note: ResourceManager manages opening and closing a Resource.
More...
|
class | SpecialParameterNames |
| Special Parameters refer to result parameters on a test plan run that describe relevant metadata about the run. They can be extracted with e.g. 'Run.Parameters.FirstOrDefault(p => p.Name == SpecialParameterNames.Property)' More...
|
|
|
void | AddResultListener (IResultListener listener) |
| Result listeners can be added just before the test plan actually starts. If the operation fails an exception will be thrown.
|
|
void | RemoveResultListener (IResultListener listener) |
| Removes a result listener from the active result listeners in this run. Note this can only be done at specific times during test plan execution, namely when result listeners has not been connected. If the operation fails an exception will be thrown.
|
|
void | WaitForResults () |
| Waits for result propagation thread to be idle.
|
|
void | WaitForResourcesOpened (CancellationToken cancel, params IResource[] resources) |
| Waits for the given resources to become opened. More...
|
|
| TestPlanRun (TestPlan plan, IList< IResultListener > resultListeners, DateTime startTime, long startTimeStamp, bool isCompositeRun=false) |
| Starts tasks to open resources. All referenced instruments and duts as well as supplied resultListeners to the plan. More...
|
|
| TestPlanRun (TestPlan plan, IList< IResultListener > resultListeners, DateTime startTime, long startTimeStamp, string testPlanXml, bool isCompositeRun=false) |
| Starts tasks to open resources. All referenced instruments and duts as well as supplied resultListeners to the plan. More...
|
|
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 asynchronously. More...
|
|
void | PublishArtifact (string file) |
| Publishes an artifact for the test plan run.
|
|
Task | PublishArtifactAsync (string file) |
| Publishes an artifact for the test plan run asynchronously.
|
|
| TestRun () |
| Creates a new TestRun
|
|
|
string | TestPlanXml [get] |
| XML for the running test plan.
|
|
string? | Hash [get] |
| The SHA1 hash of XML of the test plan.
|
|
string | TestPlanName [get] |
| Name of the running test plan.
|
|
bool | FailedToStart [getset] |
| Set by the TestPlan execution logic to indicate whether the TestPlan failed to start the TestPlan.
|
|
TapThread | MainThread [get] |
| The thread that started the test plan. Use this to abort the plan thread.
|
|
IEnumerable< string > | Artifacts [get] |
| Returns a list of all published artifacts. This list will get updated as the test plan progresses.
|
|
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.
|
|
Object that holds the state of a specific TestPlan run. Also internally manages resources and threads relating to the TestStepRun. Note: ResourceManager manages opening and closing a Resource.
◆ TestPlanRun() [1/2]
OpenTap.TestPlanRun.TestPlanRun |
( |
TestPlan |
plan, |
|
|
IList< IResultListener > |
resultListeners, |
|
|
DateTime |
startTime, |
|
|
long |
startTimeStamp, |
|
|
bool |
isCompositeRun = false |
|
) |
| |
|
inline |
Starts tasks to open resources. All referenced instruments and duts as well as supplied resultListeners to the plan.
- Parameters
-
plan | Property Plan |
resultListeners | The ResultListeners for this test plan run. |
startTime | Property StartTime. |
startTimeStamp | |
isCompositeRun | |
◆ TestPlanRun() [2/2]
OpenTap.TestPlanRun.TestPlanRun |
( |
TestPlan |
plan, |
|
|
IList< IResultListener > |
resultListeners, |
|
|
DateTime |
startTime, |
|
|
long |
startTimeStamp, |
|
|
string |
testPlanXml, |
|
|
bool |
isCompositeRun = false |
|
) |
| |
|
inline |
Starts tasks to open resources. All referenced instruments and duts as well as supplied resultListeners to the plan.
- Parameters
-
plan | Property Plan |
resultListeners | The ResultListeners for this test plan run. |
startTime | Property StartTime. |
startTimeStamp | |
isCompositeRun | |
testPlanXml | Predefined test plan XML. Allowed to be null. |
◆ PublishArtifact()
void OpenTap.TestPlanRun.PublishArtifact |
( |
Stream |
stream, |
|
|
string |
artifactName |
|
) |
| |
Publishes an artifact for the test plan run.
- Parameters
-
stream | The 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. |
artifactName | The name of the published artifact. |
◆ PublishArtifactAsync()
Task OpenTap.TestPlanRun.PublishArtifactAsync |
( |
Stream |
stream, |
|
|
string |
artifactName |
|
) |
| |
Publishes an artifact for the test plan run asynchronously.
- Parameters
-
stream | The 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. |
artifactName | The name of the published artifact. |
◆ WaitForResourcesOpened()
void OpenTap.TestPlanRun.WaitForResourcesOpened |
( |
CancellationToken |
cancel, |
|
|
params IResource[] |
resources |
|
) |
| |
|
inline |
Waits for the given resources to become opened.
- Parameters
-