Page 2 of 2

Re: Loop problem

Posted: Tue Feb 13, 2018 2:31 pm
by odklizec
I believe you need to instantiate repo like this:

Code: Select all

public static WM.WMRepository repo = WM.WMRepository.Instance;

Re: Loop problem

Posted: Tue Feb 13, 2018 3:09 pm
by yaro2o
k now looks like it works thx :)

Another question:

is it possible to add this code globally? so that I do not add it every time in my all testcase? I must put this code in Program.cs ? and then he will look for these popup in all Solution and when they appear they will perform the desired actions?

Re: Loop problem

Posted: Tue Feb 13, 2018 3:26 pm
by odklizec
Yep. If you put the popupwatchers in program.cs, then they should catch all watched popups. Another (possibly cleaner) solution is to create a code module with all popupwatchers and place it in the TestSuite [Start] section.

Re: Loop problem

Posted: Tue Feb 13, 2018 3:32 pm
by yaro2o
So I understand that if I do as in the picture, the code from the setup will only be done when some window pops up in one of the recordings

Re: Loop problem

Posted: Tue Feb 13, 2018 3:42 pm
by odklizec
Yes and no ;) Popupwatchers started in TestCase1 will catch popups in other test cases too. If you don't want the popupwatcher to act in other test cases, then you need to stop it in Teardown section of TestCase1. If you want a global popupwatcher (for all tests cases, regardless the first test case is started or not), then I would suggest to add the code module to Setup section of Test Suite.

Re: Loop problem

Posted: Tue Feb 13, 2018 3:56 pm
by yaro2o
Another question is the possibility to do all the projects in a specific order? We have 1000 prints in 8 programs, which are generated from individual dialogs when selecting individual options, how to choose a soundboard best? Can be set so that the tests will start automatically at a given time?

Re: Loop problem

Posted: Wed Feb 14, 2018 8:25 am
by odklizec
Hi,

I'm not sure I understand your last question? To run tests in a specific order, you should simply order them in a test suite. Or you can use command line parameters to run individual tests in a specific order.

In case you want to start tests at specific time, you can either use a windows scheduler, which is rather primitive solution, but easy to setup. Or you can use something called Continuous Integration (Jenkins, Bamboo, etc...), which is somewhat more complicated to setup, but which offers much more advanced tools and and wide range of settings for build and test process. I'm personally using Jenkins and it works very nice. I'm using one master server and 4 "slave" virtual machines, where my tests are running either at specific time or after someone builds a new version of AUT. Jenkins is then informed about new build and automatically starts the test. You can read more about Ranorex and Jenkins integration here:
https://www.ranorex.com/blog/integratin ... n-process/
Hope this helps?