NumberFunctions Function Type


NumberFunctions function type allows you to perform mathematical operations on numerical data. It enables you to generate unique and random numbers through various functions, such as custom calculations, sequences, and random values. This type helps you create diverse data sets with numerical results.


Prerequisites

Before utilising the different data generator functions, it's essential to understand basic concepts such as creating Test Cases and Test Steps and adding data generators in test steps.


Selecting NumberFunctions as a Function Type for Data Generator

  1. Use NLP to create a new step in the test case and include a placeholder for test data.
  2. Click on the test data placeholder. From the Test Data Types dropdown menu, select the ! Data Generator option.
  3. On the ! Data Generators overlay screen, select the Type to Default. This will enable you to use a collection of built-in test data generators.
  4. Select NumberFunctions from the Function Type dropdown list. select numberfunctions function type from data generators
NOTE:

This action will display a list of built-in functions associated with the NumberFunctions function type, enabling you to select the appropriate function based on your requirements.


Custom Calculation

  • Allows you to perform mathematical operations based on a given expression.
  • You can use various test data types to create dynamic calculations, such as plain text, parameters, runtime, and environment variables.
ℹ️Examples:
Inputs Outputs
Test data: 12+8 20
Test data: @|param1| * @|param2| (eg: @|param1| = 6 and @|param2| = 4) 24
Test data: $|runtimeValue|-15 (eg: runtimeValue = 40) 25
Test data: 35+15 50