How to distribute solutions to the computers like 3 or more

Ranorex Spy, Recorder, and Studio.
will
Posts: 18
Joined: Tue Jan 26, 2010 11:29 am

How to distribute solutions to the computers like 3 or more

Post by will » Tue Jun 03, 2014 4:44 am

HI,

Is there any solutions to distribute solutions to computers like 3 or more in order to make the automation test run faster.

With more and more test cases added, there are a lot of solutions to be runned everyday and it takes more and more time. So I want to distribute them to several computers.

Here is a simple case i design:
1.three computers (A1,A2,A3)
2.ten solutions need to be runned (T1~T10)
3.A1 with three solutions (T1,T2,T3), A2 (T4~T6) A3(T7~T9) and T10 waiting


More details:
http://www.cnblogs.com/zhangfei/archive ... 69139.html

Regards.

Will

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

Re: How to distribute solutions to the computers like 3 or more

Post by krstcs » Tue Jun 03, 2014 1:43 pm

Ranorex has no scheduling mechanism.

I would suggest setting up a Jenkins (it's free) server and putting Jenkins slaves on each test system. You can then set up Jenkins to run each test on different systems, all at the same time. You can also have Jenkins build your tests and deploy them to a central location where each test system could retrieve them (copy them to the test system, do not run them from a share) and then report back to Jenkins.
Shortcuts usually aren't...

will
Posts: 18
Joined: Tue Jan 26, 2010 11:29 am

Re: How to distribute solutions to the computers like 3 or more

Post by will » Thu Jun 05, 2014 4:16 am

krstcs wrote:Ranorex has no scheduling mechanism.

I would suggest setting up a Jenkins (it's free) server and putting Jenkins slaves on each test system. You can then set up Jenkins to run each test on different systems, all at the same time. You can also have Jenkins build your tests and deploy them to a central location where each test system could retrieve them (copy them to the test system, do not run them from a share) and then report back to Jenkins.

Thank you for your reply. Do you know how to use STAF to do that? And which is better?

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

Re: How to distribute solutions to the computers like 3 or more

Post by odklizec » Thu Jun 05, 2014 6:57 am

Hi,

Agree with krstcs. Jenkins is probably the best choice for what you need. The only problem is that there is currently no built-in way to merge Ranorex reports from multiple sources (see this post). In other words, you will end up with multiple reports.

As for comparing STAF vs. Jenkins, in my opinion, there is no contest. Jenkins is industry standard (in free CI tools). It's updated on a weekly basis and there is big volume of 3rd party plugins enhancing its functionality. And it would be much easier to find answer/help in case of problems.

It may be possible to integrate Ranorex tests with STAF but at the moment, there are no step-by-step instructions provided by Ranorex support. A detailed instructions how to integrate Ranorex with Jenkins can be found here...
http://www.ranorex.com/blog/integrating ... on-process
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

will
Posts: 18
Joined: Tue Jan 26, 2010 11:29 am

Re: How to distribute solutions to the computers like 3 or more

Post by will » Thu Jun 05, 2014 7:09 am

odklizec wrote:Hi,

Agree with krstcs. Jenkins is probably the best choice for what you need. The only problem is that there is currently no built-in way to merge Ranorex reports from multiple sources (see this post). In other words, you will end up with multiple reports.

As for comparing STAF vs. Jenkins, in my opinion, there is no contest. Jenkins is industry standard (in free CI tools). It's updated on a weekly basis and there is big volume of 3rd party plugins enhancing its functionality. And it would be much easier to find answer/help in case of problems.

It may be possible to integrate Ranorex tests with STAF but at the moment, there are no step-by-step instructions provided by Ranorex support. A detailed instructions how to integrate Ranorex with Jenkins can be found here...
http://www.ranorex.com/blog/integrating ... on-process

Thank you. I will try Jenkins.

will
Posts: 18
Joined: Tue Jan 26, 2010 11:29 am

Re: How to distribute solutions to the computers like 3 or more

Post by will » Fri Jun 06, 2014 9:34 am

Hi,

I tried the Jenkins to distribute tests to several computers. But I had some problems:

1.All the image-based validation failed, becaue the validation images are black.

2.The ranorex seems not to be activated to run solutions(exe files) builded by Jenkins, but the reports were still generated correctly. So how does it work? If clicking the exe files directly, the ranorex will be activated to run solutions.

Regards.

Will.

will
Posts: 18
Joined: Tue Jan 26, 2010 11:29 am

Re: How to distribute solutions to the computers like 3 or more

Post by will » Fri Jun 06, 2014 10:20 am

will wrote:Hi,

I tried the Jenkins to distribute tests to several computers. But I had some problems:

1.All the image-based validation failed, becaue the validation images are black.

2.The ranorex seems not to be activated to run solutions(exe files) builded by Jenkins, but the reports were still generated correctly. So how does it work? If clicking the exe files directly, the ranorex will be activated to run solutions.

Regards.

Will.

I know how to fix it:

As Jenkins is normally started as a Windows service, it does not have sufficient rights to start UI-applications.

So, make sure that the Jenkins service is not started automatically as a service. To do so, open the “Services” tool (which is part of the “Administrative Tools” in the control panel), choose “Jenkins” service, stop the service, and set the “Startup type” to disabled

Regards.

Will

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

Re: How to distribute solutions to the computers like 3 or more

Post by krstcs » Fri Jun 06, 2014 1:53 pm

Also, the computer that you are running your tests on must have a desktop realized.

The screen on the system must be unlocked and available through RDP, a monitor, a VM management console, etc., and a user must be logged in. Ranorex must be run under a user account (which you have figured out :D ).

Jenkins should be run as a service ONLY on the server. The test systems should all be running Jenkins slaves from a logged-in user account (which, again, you figured out :D ).


I have my environment setup so that I use RDP to get to a special account on my QA server. That account then uses ANOTHER set of RDP sessions to get to each of my test machines. I can then lock (but not log-off of) the first account (on the server), and the RDP sessions for the test systems will still be active and available for Ranorex.

It is a bit complicated and delicate, but it is the only way I have found that will work reliably for VMs that aren't on my local host.
Shortcuts usually aren't...

will
Posts: 18
Joined: Tue Jan 26, 2010 11:29 am

Re: How to distribute solutions to the computers like 3 or more

Post by will » Tue Jul 01, 2014 9:42 am

Hi,

Now I have to install the software, waiting for being tested by Ranorex, on multiple computers simultaneously. Is there a solution to do that ? Or can jenkins solve this?

BTW, I have a very stupid idea that an installation job is built for each slave on jenkins, but it's hard to make sure that installation is successful before other jobs are triggered. So I need a better one!!

Many Thanks.

Will

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

Re: How to distribute solutions to the computers like 3 or more

Post by krstcs » Tue Jul 01, 2014 1:36 pm

To your first question, yes. You just need to create a new "Multi-Configuration" job in Jenkins and have each system you want to run the test on setup as a configuration.

To your second question, you can make an installation job in Jenkins, I use it to distribute new versions of Ranorex. The way to have this work is to make a third job ("MultiJob Project") that calls each of the tests you want to run in the order you want them, with the install first. You can then set the install job to fail the full job if it doesn't work.
Shortcuts usually aren't...

will
Posts: 18
Joined: Tue Jan 26, 2010 11:29 am

Re: How to distribute solutions to the computers like 3 or more

Post by will » Wed Jul 02, 2014 4:12 am

krstcs wrote:To your first question, yes. You just need to create a new "Multi-Configuration" job in Jenkins and have each system you want to run the test on setup as a configuration.

To your second question, you can make an installation job in Jenkins, I use it to distribute new versions of Ranorex. The way to have this work is to make a third job ("MultiJob Project") that calls each of the tests you want to run in the order you want them, with the install first. You can then set the install job to fail the full job if it doesn't work.
Hi krstcs,

Thanks for your reply. I'm sorry that I don't quite understand what you mean.
distribution.jpg
distribution.jpg (40.1 KiB) Viewed 1146 times
The picture above shows how I run tests. So I want to build an installation job first before running tests on A1、A2 and A3. Like if the installation job fails on A1, tests will not be runned on A1. (They will be runned on A2 and A3.) And all tests in the building queue are distributed to idle slaves automatically.

So can you give me more details about your idea? :)

Many Thanks.

Will

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to distribute solutions to the computers like 3 or more

Post by Support Team » Fri Jul 18, 2014 10:54 am

Hi will,

This is very specific question related to Jenkins. Maybe the Jenkins support or the Jenkins forum users can better help you solving your issue.

Regards,
Bernhard
.
Image