AscentialTest Support Hub

Notifications

Clear all

Using sStepName



1

Posts


1

Users


0

Reactions


36.5 K

Views

(@petemahoney)
Active Member

Joined: 9 years ago
Posts: 3

Topic starter
 

The Step class contains an attribute sStepName which can be used to obtain the name of the current step. This attribute can then be used to identify from which step a specific output line occurs in the results of a test run. This annotated output can be helpful in quickly determining from where specific Print, LogData, LogError, and Exceptions occurred without leaving the Results tab. While errors can be traced back to the originating line of code in the Results tab, it does not indicate from which instance of step (if there is more than one of the same step) in test.

class ItemEntry : Step
Main()
Print (“{this.sStepName} step : Begins”)

Print (“{this.sStepName} step : Item being entered”)

LogData (ItemData, “{this.sStepName} step : Items being entered”)

LogError (“{this.sStepName} step : An error occurred entering Item”)

throw Exception (“{this.sStepName} step : An exception thrown entering Item”)

Print (“{this.sStepName} step : Ends”)

Note:
This attribute is not documented in Step class section of the AscentialTest help file and may not be a supported feature or available in future releases. However, when editing in the Source Editor, typing “Step.” will show “sStepName” as autocomplete option which is how this attribute was discovered.



   

Quote

Share:

Can’t Find An Answer in the Forum?

Contact Our Team