RVL script is a spreadsheet containing set of 7 columns in fixed order:
1 - Flow
This column is dedicated to specifying structural information such as blocks, branches (If-Else), loops.
Also it contains information about single row and multi row comments. Possible values are limited by the list:
//- single row comment
/*- begin of multi row comment (comment is valid up to line starting with
*/- end of multi row comment started earlier from
If- conditional branch. Row type must be
Condition. The row may be followed with one or more
ElseIfstatements, zero or one
Elsestatement and then should end with
2 - Type
Type of operation specified in this row. One of:
Action- row defines an action. Action is a call for operation for one of the objects. Object is defined in the next column. See Actions.
Param- signals that this row contains action parameter or condition parameter defined in last 3 columns (
Output- this type of row must go after last Param for an action and defines a variable that should accept output value retured from the call to the Action.
Variable- this row defines or assigns value to a local or global variable. See Variables.
Assert- first row for the Assertion. See Assertions.
3 - Object
Id of the object to be used for an action. Rapise provides set of predefined global objects and objects recorded/learned from the AUT.
4 - Action
One of the actions applicable to the object selected in the previous column:
5 - ParamName
Name of a parameter to the action selected in the previous column. See Params for more details.
6 - ParamType
The type of a parameter determines valid input for the next
bool- ParamValue should be
string- ParamValue is a text string
number- ParamValue is an integer or floating point number,
variable- ParamValue is a variable name. Actual value is read from the variable.
Map Name- ParamValue is a column name from the given
Map. Usually this feature is used for data driven testing.
7 - ParamValue
This columns defines actual values passed to actions. Depends on the ParamType.
In addition to these columns there may be any number of other columns used for storing supplementary data, comments, calculations, thoughts etc. Additional columns may be utilized for script itself (i.e. contain expected values or reference data).
Adding Custom Columns¶
By default RVL always displays column
H. It is sometimes useful (to store temp value, add a note etc).
One may show more columns. To do this open the file (i.e.
Main.rvl.xlsx) in the spreadsheet editor or Excel and define some values in columns
J etc respectively:
Now if you re-open this document in RVL these columns will also be displayed:
The usage of this columns is up to you. You may use them just for information or make them 'live' by assigning custom actions as will be described in the next section.
Custom Column Actions¶
RVL is flexible and one may use more columns to implement custom script logic.
The script occupies first 7 columns of the spreadsheet (A, B, C, D, E, F, G).
By default the script also displays the column H. It may also display as many additional columns as needed (see previous section). It may have some value but has no side effects, i.e.:
- Provide links (to requirements, documentation)
- Mark Status (review) and notes.
However the script may see this value and use it for own purpose, i.e.:
- Set report attribute
- Assign global variable
- Do Screenshot
- Do custom action.
You may have one or more custom columns defined in the script to achieve necessary goals. This will require you to override
OnRVLScriptStep function as described below.
Custom column actions are processed in the
OnRVLScriptStep function that should be defined in the
User.js file or in the custom library.
function OnRVLScriptStep(item, place, status, ctx, stackItem)
The function is mostly intended for internal use. Here you need information about the following parameters:
item- current RVL action item. We need to use the following property of this item:
item.Startrow- First RVL row for given item (in RVL each statement takes one or more rows).
item.Startrow.SheetRowIndex- Row index in the current sheet.
item.Startrow.Ext- The structure, containing values for rows
Hfor the current action
Ifor the current action
Jfor the current action
place- One of
"before"- callback just before executing row action,
"after"- callback called after action has just been done.
- KB 433 Using Extra Columns in RVL to add Report Attributes