UTILITY OBJECTS – R A N D O M N U M B E R


‘###################################################################################
‘UTILITY OBJECTS – R A N D O M  N U M B E R
‘################################################################################### 

‘===================================================================================
UTILITY OBJECT            :           RANDOM NUMBER
‘===================================================================================

Description:

Let’s assume, we have 10 sets of data to execute. But for executing all these 10 sets of data, Night Execution will take 12 hours. But we don’t have enough time to execute our Automation Regression Suite. At that moment, we may pick up 1 set of data from 10 sets and can execute. This kind of situations, RandomNumber function will be pretty userful.

Syntax:

RandomNumber (RangeStartNumber, RangeEndNumber)

Example:

intSetToExecute = RandomNumber (1, 10)

‘===================================================================================

‘===================================================================================
UTILITY OBJECT            :           RND
‘===================================================================================

Description:

Let’s assume, we have 10 sets of data to execute. But for executing all these 10 sets of data, Night Execution will take 12 hours. But we don’t have enough time to execute our Automation Regression Suite. At that moment, we may pick up 1 set of data from 10 sets and can execute. This kind of situations, RandomNumber function will be pretty userful.

Syntax:

Int ( ( UpperBoundLowerBound + 1) * RND + LowerBound)

Example:

intSetToExecute = Int ( ( 101 + 1) * RND + 1)

‘===================================================================================

‘###################################################################################

No comments:

Post a Comment