I have a situation where i need to execute a script to enter dummy data into the database. So i probably need to execute script 100k times. I know that there is following way to do it from console:–> robot --suite tests.testSuite . . . (As many dots we add up, script will be executed those number of times) but in my case or in general probably it’s not an efficient way. Is there any better way to do it ?
Usually, create a script at Operating System level.
Using a bash
script with for
or a Windows .cmd with FOR
.
@HelioGuilherme66 Thanks for your quick response. Would it be able to pass multiple robot files using windows script file ? Any example would be greatly appreciated.
Here is an example for Windows (file: loop.cmd
):
SET REPETITIONS=2
SET ROBOT_OPTIONS="--dryrun"
FOR %%i IN (%*) DO FOR /L %%N IN (1, 1, %REPETITIONS%) DO robot %ROBOT_OPTIONS% %%i
1 Like