Test Data Function is a super-set of Random Test Data. It is unlike other Test Data Types in that it allows us to generate Test Data rather than use already created data.
More details about supported Test Data Types is available in this article - What are the different types of test data supported in Testsigma?
A Couple of Test Data Functions are available by default for dynamic Test Data generation. The Function Parameter is invoked by using the !|Function| format where Function is replaced by the Custom Function name.
You may also create your own Custom Test Data Functions using Java. Please follow this guide to create your own Custom Functions and thereby generate Custom Test Data - How to create and use Custom Functions in Testsigma?
Note: You can also request the Testsigma Support Team to generate a Custom Function for you. The Team will evaluate the feasibility of the request and generate a function for you in a short time.
Usage of Test Data Functions
Test Data Functions can be used to generate Test Data in any NLP statement that contains a Test Data declaration such as "Type test data in ui identifier field". While creating a Test Step, available Test Data Functions can be listed as follows:
1. Double click on the test data declaration in the test step and clear it by pressing backspace or delete button on your keyboard. A list of available test data types will appear as shown below:
We have already edited the Step to include the a ui identifier. Please check the following article to learn how to create a UI Identifier - How to create UI Identifier?
2. Select the !|Function| test data type from the dropdown list and press down key. Another list of available Test Data Functions will appear as shown:
3. Select one of the Test Data Functions as required. Additional fields will appear below the Action Text box to enter values for arguments of the selected function.
4. Enter the values of Data type as specified in the fields and click on Create/Update to save the Test Step. That's all we need to do to make use of Test Data Functions in Testsigma.
Please check the following article for a complete list of Test Data Functions available in Testsigma - List of default Test Data Functions available in Testsigma