Ask a Question

Ability to generate random values at runtime and pass it in as a parameter

Ability to generate random values at runtime and pass it in as a parameter

Should have an ability to generate random unique values at runtime or append a random value to a variable like "TestUser_<random number / timestamp>", for scenarios such  as username in signup functionality. 

2 Comments
Marsha_R
Community Hero

Hi @pranoti 

 

There are many data generators described here. Will the name one help?  You can also use multiple ones and assign the data to different variables, then combine the variables for the value you may need.

 

https://support.smartbear.com/testcomplete/docs/testing-with/data-driven/generators/types/index.html

kevinbenson
Occasional Contributor

function MyRandomNumber(min,max)
{
Math.random()
MagicNumber = Math.round(Math.random()*(max-min)+min)
return MagicNumber;

};

 

This is what I use for random num

Announcements
Welcome to the TestComplete Feature Requests board!

Here you can review submitted feature requests and vote up the ones you like! If you can't find the feature you want - go ahead and suggest your own idea. Ideas with the highest rating can be implemented in the product.

Check out the Create a Feature Request guide for more information.
New Here?
Welcome to the Community
Sign Up Here