Ask a Question

[TechCorner Challenge #9] Generate a random number within a range

SOLVED
sonya_m
SmartBear Alumni (Retired)

[TechCorner Challenge #9] Generate a random number within a range

Hi Community!

 

Another awesome task is ready🙂

 

By completing the task, you will not only learn TestComplete features but also get into the TechCorner Leaderboard.

 

Participate in the challenge and earn new unique badges! Check out some of these awesome rewards:

TestComplete-TechCorner-Takeoff.pngTestComplete-TechCorner-Contributor.png

 

Let's imagine that you are testing an application that has gaming elements - a knight is using a legendary sword to slay a dragon! And, the sword will deliver damage in the following range - from 30 to 75. 

 

Instead of using the same number every time, you want to generate a random number on each run and enter it in the application. How would you do it in TestComplete?


Let's see if we can get an example for each scripting language (JavaScript, JScript, Python, VBScript)! 

Task: Generate a random number within the following range (30-75) in TestComplete using a scripting language of your choice. 

Difficulty:Star_Gold.pngStar_gray.pngStar_gray.png

 

Bonus: You will get an additional point for each script written in a different language.

 

Best of luck!


Sonya Mihaljova
Community and Education Specialist

10 REPLIES 10
sonya_m
SmartBear Alumni (Retired)

Thank you @mkambham !


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: