Rapise Visual Language (RVL)
Sometimes test set requires a value passing through the sequence of test cases. Good example is User ID assigned during sign it and then used in subsequent test cases.
Another use case is when test case requires some input value that should always be unique.
Rapise includes API simplifying reading and storing of values between sessions:
Global.GetProperty('Propname', defValue) -- Read property value from %WORKDIR%\Config.json. See online help.
Global.SetProperty('PropName', value)-- Set property value to %WORKDIR%\Config.json. If the file does not exist it will be created. See online help.
Here is a sample function. Every time it is called the value is incremented by 1 and new value is returned as a string INV-nnn, where nnn is a new number.
// Read invoice number (or 100 if no previous number set yet)
var invoiceNo = Global.GetProperty('InvoiceNo', 100)
// Increment value by 1
// Store it for next use
// Make final string like 'INV-123'
You may put this function into Functions (<testname>.user.js) file.
Once function is defined in the .user.js it may be called from RVL using the Functions object (all global functions are shown as methods for this object).
You may download and this sample test.
Selected files will be attached to any email sent on saving ticket.
Select files to upload
Or drag and drop files here
Save to upload the selected file(s)