Page 1 of 1

How to run test suite automatically.

Posted: Thu Nov 05, 2015 11:32 am
by ejji09
Hi,

I want to run my test suite automatically for 10 times.

how to set test suite to run automatically ?

Thank you,

Re: How to run test suite automatically.

Posted: Thu Nov 05, 2015 11:52 am
by Martin
There are a few method for this:

1) Writing a batch file that starts the testSuite exe 10 times (waiting for each itteration to finish) - this will though create multiple reports as well (1 for each run). (Batch has to wait for the Ranorex opened command prompt related to the test run to be closed and only then continue with the next run)

2) Using dataConnector (http://www.ranorex.com/support/user-gui ... ctors.html) - If you only want to run itteration and don't need any more data from lets say an excel data connector, then you can write an Excel file consisting of 10 rows (let's say each has it's own value from 1 to 10). Connect it to the test case and the test case will then run for 10 itterations.

Re: How to run test suite automatically.

Posted: Thu Nov 05, 2015 12:04 pm
by ejji09
Hi martin,

can you please explain me how to write a batch file that starts a testSuite (.exe) for 10 times and wait for each itteration to finish.

I just know that how to create a batch file for just to open a application. :(

Thank you.

Re: How to run test suite automatically.

Posted: Thu Nov 05, 2015 12:20 pm
by Martin
ejji09 wrote:Hi martin,

can you please explain me how to write a batch file that starts a testSuite (.exe) for 10 times and wait for each itteration to finish.

I just know that how to create a batch file for just to open a application. :(

Thank you.
Yes, ofcourse!

The batch file should look like this

Code: Select all

CD C:\RanorexSolution\TestProject\Project\bin\Debug\
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
And save the file with a ".bat" extension.

Ofcourse you can replace the 10 lines with a 10-times-loop but I just did a quick example and to be honest everything matters only in the context of the specific test needs.

And the bat explained:
1) First line of code moves you to the correct directory where the testSolution.exe (or what ever name you have for it) exists. This is needed for the reports to be placed in the correct folder. (If you haven't built or added your own report solution).

2) START and /W will wait for the process to be finished before continueing to the next line.

And that's basically it. Quite simple and easy script.

Re: How to run test suite automatically.

Posted: Wed Nov 11, 2015 11:53 am
by ejji09
Hi Martin,

Thank you so much for your answer it worked perfect!

Is there's a way in the batch file script that some how i can trigger {ENTER} key when my test suite starts.. because am using trail license and when ever the test suite start, A dailouge will appear where i have to press enter or click on the continue evalutaion button to start my test execution for every time. which is annoying all the time. HOW TO SOLVE THIS ISSUE

Thank you.

Re: How to run test suite automatically.

Posted: Wed Nov 11, 2015 12:21 pm
by odklizec
Hi,

There is no workaround for automatic confirmation of "Enter' button in Trial dialog. The dialog is here simply because it's trial version, which is not supposed to be used in production environment. What you can try is to ask Ranorex support for a time limited full version.

Re: How to run test suite automatically.

Posted: Wed Nov 11, 2015 3:32 pm
by krstcs
It is supposed to be annoying, it's a TRIAL license.

If you want to use the software without restriction, then you need to pay for it.

And Pavel is correct, there is no way around the dialog without getting a different license (either a real one that you payed for, or an extended trial key from Ranorex Support).


In addition, while your intention may be to just by-pass the dialog, understand that the dialog is intended to keep the Ranorex software from being pirated, so unauthorized circumvention is illegal in most places and breaks the terms of use for the software. Please do not do that. Ranorex makes a great product and deserves to be paid for it if you are going to use it.

Re: How to run test suite automatically.

Posted: Wed Apr 25, 2018 8:56 am
by csolanki
Yes, ofcourse!

The batch file should look like this

Code: Select all

CD C:\RanorexSolution\TestProject\Project\bin\Debug\
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
START /W "" "testSolution.exe"
And save the file with a ".bat" extension.

Ofcourse you can replace the 10 lines with a 10-times-loop but I just did a quick example and to be honest everything matters only in the context of the specific test needs.

And the bat explained:
1) First line of code moves you to the correct directory where the testSolution.exe (or what ever name you have for it) exists. This is needed for the reports to be placed in the correct folder. (If you haven't built or added your own report solution).

2) START and /W will wait for the process to be finished before continueing to the next line.

And that's basically it. Quite simple and easy script.[/quote]

Hey,

Will I be able to see the logs for example : among all 10 , how many times it got pass/fail other than opening the log of each file individually ?

Thanks.

Re: How to run test suite automatically.

Posted: Wed Apr 25, 2018 9:22 am
by odklizec
csolanki wrote: Will I be able to see the logs for example : among all 10 , how many times it got pass/fail other than opening the log of each file individually ?

Thanks.
Of course, you can instruct test (via command line) to create report with test status embedded in report file name.
e.g. testSolution.exe /zr /zrf:c:\temp\Reports\reportname_%X.zip
Where %X is automatically replaced with test status (Success/Failed).

Re: How to run test suite automatically.

Posted: Wed Apr 25, 2018 11:41 am
by csolanki
odklizec wrote:
csolanki wrote: Will I be able to see the logs for example : among all 10 , how many times it got pass/fail other than opening the log of each file individually ?

Thanks.
Of course, you can instruct test (via command line) to create report with test status embedded in report file name.
e.g. testSolution.exe /zr /zrf:c:\temp\Reports\reportname_%X.zip
Where %X is automatically replaced with test status (Success/Failed).
Can I include it in bat file itself ?

Re: How to run test suite automatically.

Posted: Wed Apr 25, 2018 11:47 am
by odklizec
Sure, you can use this approach in bat file as well. I think you just need to double the percentage character, like this...
reportname_%%X.zip

Re: How to run test suite automatically.

Posted: Wed Apr 25, 2018 1:14 pm
by csolanki
Thanks a lot :)