Test Data: Template Formula Examples

This article will provide some examples of formulas you can use within test data templates

Example 1

Scenario: You want to randomly select a random number between a range of consecutive numbers. Usually for a random age between 18-65, for example. 

Generic Formula: Here is a formula you can use to randomly select a number between X & Y in a test data template. 
FLOOR ( RANDOM * ( max - min + 1 ) + min )

Specific Example: So if you wanted it to be and age between 18-65, it would look like this:
FLOOR ( RANDOM * ( 65 - 18 + 1 ) + 18 )

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.