Jump to content
Sign in to follow this  
przemilke

Multiple scripts running - large testing

Recommended Posts

przemilke

Hi all, im a new one on this forum.

Im going to organise testing of large desktop application using autoIT. Ive a simple question about possibility of scripts run methods.

I will describe my idea:

Ive 100 scripts:

001_test.au3 (which launch desktop aplication)

002_test.au3 (function 1)

003_test.au3 (function 2)

...

100_test.au3 (function 99 and close application)

What is the best solution to run these scripts one after another (when one is finished, another starts)?

Maybe its possible to export names of files to external file *.au3 and control that kind of running from that file?

Maybe its possible to run one script from level previous one?

What u think about that?

Share this post


Link to post
Share on other sites
Fire

Hi.

If i understand correctly your question this can be for you solution:

For $i=1 To 10


FileWrite(@ScriptDir&"\msgbox"&$i&".au3","MsgBox(64,""SIMPLE MSGBOX"",""SIMPLE MSGBOX"",1)") ;1 second timeout for msgbox

RunWait(@AutoItExe & " /AutoIt3ExecuteScript" & " " & """" & @ScriptDir&"\msgbox"&$i&".au3" & """") ;<==Running generated Scripts
FileDelete(@ScriptDir&"\msgbox"&$i&".au3")
Next

MsgBox(64,"END OF EXECUTION","END OF EXECUTION",3)

Exit

[size="5"] [/size]

Share this post


Link to post
Share on other sites
storme

Hi all, im a new one on this forum.

Im going to organise testing of large desktop application using autoIT. Ive a simple question about possibility of scripts run methods.

I will describe my idea:

Ive 100 scripts:

001_test.au3 (which launch desktop aplication)

002_test.au3 (function 1)

003_test.au3 (function 2)

...

100_test.au3 (function 99 and close application)

What is the best solution to run these scripts one after another (when one is finished, another starts)?

Maybe its possible to export names of files to external file *.au3 and control that kind of running from that file?

Maybe its possible to run one script from level previous one?

What u think about that?

You've got a few options.

Add a

Run ( "program" [, "workingdir" [, show_flag[, opt_flag ]]] )

to the end of each of your programs to run the next. This would have the advantage that if one of the steps fails you can just run whatever step/script you want and the sequence will continue.

OR

Write a script with 100 RUNWAIT commands to run each of your scripts.

Runs an external program and pauses script execution until the program finishes.
RunWait ( "program" [, "workingdir" [, show_flag [, opt_flag ]]] )

Check out the help file for more details.

BTW why do you want 100 scripts? Why not put all the tests in one script?

Good Luck

John Morrison

aka

Storm-E

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.