How to run test suite automatically.

Ask general questions here.
ejji09
Posts: 54
Joined: Thu Sep 10, 2015 2:48 pm

How to run test suite automatically.

Post by ejji09 » Thu Nov 05, 2015 11:32 am

Hi,

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

how to set test suite to run automatically ?

Thank you,

Martin
Posts: 152
Joined: Fri Aug 15, 2014 12:24 pm

Re: How to run test suite automatically.

Post by Martin » Thu Nov 05, 2015 11:52 am

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.

ejji09
Posts: 54
Joined: Thu Sep 10, 2015 2:48 pm

Re: How to run test suite automatically.

Post by ejji09 » Thu Nov 05, 2015 12:04 pm

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.

Martin
Posts: 152
Joined: Fri Aug 15, 2014 12:24 pm

Re: How to run test suite automatically.

Post by Martin » Thu Nov 05, 2015 12:20 pm

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.

ejji09
Posts: 54
Joined: Thu Sep 10, 2015 2:48 pm

Re: How to run test suite automatically.

Post by ejji09 » Wed Nov 11, 2015 11:53 am

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7469
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to run test suite automatically.

Post by odklizec » Wed Nov 11, 2015 12:21 pm

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How to run test suite automatically.

Post by krstcs » Wed Nov 11, 2015 3:32 pm

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.
Shortcuts usually aren't...

csolanki
Posts: 120
Joined: Thu Mar 22, 2018 8:51 am

Re: How to run test suite automatically.

Post by csolanki » Wed Apr 25, 2018 8:56 am

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.
Regards,
Charu Solanki
Ranorex User

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7469
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to run test suite automatically.

Post by odklizec » Wed Apr 25, 2018 9:22 am

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).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

csolanki
Posts: 120
Joined: Thu Mar 22, 2018 8:51 am

Re: How to run test suite automatically.

Post by csolanki » Wed Apr 25, 2018 11:41 am

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 ?
Regards,
Charu Solanki
Ranorex User

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7469
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to run test suite automatically.

Post by odklizec » Wed Apr 25, 2018 11:47 am

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
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

csolanki
Posts: 120
Joined: Thu Mar 22, 2018 8:51 am

Re: How to run test suite automatically.

Post by csolanki » Wed Apr 25, 2018 1:14 pm

Thanks a lot :)
Regards,
Charu Solanki
Ranorex User