OpenTAP 9.24
API Reference
Public Member Functions | List of all members
OpenTap.TestPlanRunSummaryListener Class Reference

Class for generating the summary for a test plan. More...

Inheritance diagram for OpenTap.TestPlanRunSummaryListener:
OpenTap.ResultListener OpenTap.IArtifactListener OpenTap.Resource OpenTap.IResultListener OpenTap.IEnabledResource OpenTap.ValidatingObject OpenTap.IResource OpenTap.INotifyActivity OpenTap.IResource OpenTap.ITapPlugin OpenTap.IResource OpenTap.IValidatingObject

Public Member Functions

 TestPlanRunSummaryListener ()
 Creates an instance and removes the ResultListener log from the TraceSources, so log messages from this listener wont go anywhere.
 
override void OnTestPlanRunStart (TestPlanRun planRun)
 Clears the memory. More...
 
override void OnTestStepRunStart (TestStepRun stepRun)
 Saves which steps are started. More...
 
override void OnTestStepRunCompleted (TestStepRun stepRun)
 Called when a test step run is completed. Result might still be propagated to the result listener after this event. More...
 
void PrintArtifactsSummary ()
 Prints the artifact summary.
 
void PrintSummary ()
 Prints the summary.
 
void OnArtifactPublished (TestRun run, Stream artifactStream, string artifactName)
 Invoked when an artifact is published. Note the artifactStream MUST be disposed after use. The artifact may be a FileStream, in which case it can be used as such. More...
 
- Public Member Functions inherited from OpenTap.ResultListener
virtual void OnTestPlanRunCompleted (TestPlanRun planRun, System.IO.Stream logStream)
 Called when test plan finishes. At this point no more results will be sent to the result listener from the test plan run.
More...
 
virtual void OnResultPublished (Guid stepRunId, ResultTable result)
 Called when a result is received. More...
 
- Public Member Functions inherited from OpenTap.Resource
 Resource ()
 Instantiate a new instance of Resource class and creates logging source.
 
override string ToString ()
 Overrides ToString() to return the Name of the resource. Can be overridden by derived classes to provider a more descriptive name. Note the overrider should include the Name in the output.
 
virtual void Open ()
 When overridden in a derived class, should contain implementation to open a connection to the resource represented by this class. Any one time initialization should be done here as well.
 
virtual void Close ()
 When overridden in a derived class, should contain implementation to close the connection made to the resource represented by this class.
 
void OnActivity ()
 Triggers the ActivityStateChanged event.
 
- Public Member Functions inherited from OpenTap.ValidatingObject
void OnPropertyChanged (string propertyName)
 Triggers the PropertyChanged event. More...
 

Additional Inherited Members

- Protected Member Functions inherited from OpenTap.ResultListener
virtual void onEnabledChanged (bool oldValue, bool newValue)
 Called when IsEnabled is changed. More...
 
- Protected Member Functions inherited from OpenTap.ValidatingObject
virtual string GetError (string propertyName=null)
 Return the error for a given property
 
void ThrowOnValidationError (bool ignoreDisabledProperties)
 Checks all validation rules on this object (Rules) and throws an AggregateException on errors. More...
 
- Properties inherited from OpenTap.Resource
TraceSource Log [get]
 Default log that the resource object can write to. Typically used by instances and extensions of the Resource object.
 
string Name [getset]
 A short name displayed in the user interface where space is limited.
 
bool IsConnected [getset]
 Indicates whether this resource is currently connected. This value should be set by Open() and Close().
 
- Properties inherited from OpenTap.ValidatingObject
ValidationRuleCollection Rules [get]
 All the validation rules. Add new rules to this in order to get runtime value validation.
 
string Error [get]
 Gets the error messages for each invalid rule and joins them with a newline.
 
- Properties inherited from OpenTap.IValidatingObject
ValidationRuleCollection Rules [get]
 A collection of all the currently defined validation rules. Add new rules here in order to get runtime value validation.
 
- Properties inherited from OpenTap.IResource
string Name [getset]
 A short name to display in the user interface in areas with limited space.
 
bool IsConnected [get]
 Indicates whether this DUT is currently connected. This value should be set by Open() and Close().
 
- Properties inherited from OpenTap.IEnabledResource
bool IsEnabled [getset]
 Gets or sets if this resources is enabled.
 
- Events inherited from OpenTap.Resource
EventHandler< EventArgs > Activity
 Invoked on activity.
 
- Events inherited from OpenTap.ValidatingObject
PropertyChangedEventHandler PropertyChanged
 Standard PropertyChanged event object.
 
- Events inherited from OpenTap.INotifyActivity
EventHandler< EventArgs > Activity
 Invoked on activity.
 

Detailed Description

Class for generating the summary for a test plan.

Member Function Documentation

◆ OnArtifactPublished()

void OpenTap.TestPlanRunSummaryListener.OnArtifactPublished ( TestRun  run,
Stream  artifactStream,
string  artifactName 
)
inline

Invoked when an artifact is published. Note the artifactStream MUST be disposed after use. The artifact may be a FileStream, in which case it can be used as such.

Parameters
runMay be a TestPlanRun or TestStepRun depending on how the artifact is published. If it is published with a TestStepRun it means it belongs to that specific step. If its a TestStepRun, TestStepRunCompleted has not been called for that step run.
artifactStreamThe stream containing the artifact data.
artifactNameThe name of the artifact. e.g results.csv

Implements OpenTap.IArtifactListener.

◆ OnTestPlanRunStart()

override void OpenTap.TestPlanRunSummaryListener.OnTestPlanRunStart ( TestPlanRun  planRun)
inlinevirtual

Clears the memory.

Parameters
planRun

Reimplemented from OpenTap.ResultListener.

◆ OnTestStepRunCompleted()

override void OpenTap.TestPlanRunSummaryListener.OnTestStepRunCompleted ( TestStepRun  stepRun)
inlinevirtual

Called when a test step run is completed. Result might still be propagated to the result listener after this event.

Parameters
stepRunStep run parameters.

Reimplemented from OpenTap.ResultListener.

◆ OnTestStepRunStart()

override void OpenTap.TestPlanRunSummaryListener.OnTestStepRunStart ( TestStepRun  stepRun)
inlinevirtual

Saves which steps are started.

Parameters
stepRun

Reimplemented from OpenTap.ResultListener.

OpenTAP 9.24 API built Tue Apr 30 2024 13:44:42