Running Ranorex Tests as part of build process?

Experiences, small talk, and other automation gossip.
Posts: 8
Joined: Mon Aug 30, 2010 4:59 pm

Running Ranorex Tests as part of build process?

Post by Thor222 » Thu Sep 23, 2010 6:31 pm

Hi - I'm looking for some best practices around running Ranorex based tests as part of a buid process. Our build process builds our product and exectutes our unit tests, but the build process is running as a service, and hence the Ranorex tests fail due to no UI (it would appear from a screenshot).

Wondering if anyone has some advice on how to best handle this? I could automate logging in to a remote machien and running the tests there, then copying back the results, but I'm looking for a cleaner / easier solution.

User avatar
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Running Ranorex Tests as part of build process?

Post by Ciege » Thu Sep 23, 2010 7:10 pm

You can set up virtual PCs that can be cleaned and launched from your build scripts. The virtuals would have Ranorex installed on them and told to download your new AUT, install it, run the tests and report back.

1) Build script completes
2) Makes a call to VM Server to clean VM Test Image 1
3) Starts VM Test Image 1
4) Waits for VM Test Image to complete loading
5) Uses PSExec to launch your Ranorex code on the VM Test Image
6) Waits until PSExec has returned (i.e. when Ranorex has completed)

I've set up similar using VMWare as well as MS Virtual PC. Not too terribly difficult just time consuming getting all of your assets configured the way you want them.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!


Posts: 1
Joined: Wed Jan 05, 2011 3:45 pm

Re: Running Ranorex Tests as part of build process?

Post by SDS_Eric » Wed Jan 05, 2011 4:22 pm

We use a similar outline to Ciege, with CruiseControl and Nant for C# projects:

1) CruiseControl triggered by SVN commit
2) CruiseControl runs Nant build
2.1) Nant build runs MSBuild, unit tests

** Multiple VM's running CruiseControl with Ranorex installed are waiting **

3) Ranorex VM's CruiseControl is triggered by build-server CruiseControl completion
4) Each VM CruiseControl runs automated test nant script
4.1) Nant script runs Ranorex tests as unit tests

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: Running Ranorex Tests as part of build process?

Post by Support Team » Fri Jan 07, 2011 11:48 am

We at Ranorex have a similar approach to run automated tests against our nightly Ranorex setups. We as well have a build server and several Virtual Machines (VM) running and waiting to be notified. All machines are running CruiseControl as a user program, not as a service, because we had problems with Visual Studio(!) compiling correctly if CruiseControl was running as a service.

Our work flow looks like the following:
  1. CruiseControl on build server is triggered at certain time in the night
  2. Unit tests are run and a new setup is created
  3. CruiseControl on listening VMs are triggered
  4. Each VM gets the new setup from the build server and installs it
  5. Ranorex test source code is compiled with newly installed setup
  6. Ranorex tests are invoked both by command line and via NUnit, results reported to CruiseControl
Ranorex Team

User avatar
Posts: 22
Joined: Tue May 19, 2009 2:01 pm
Location: York, UK

Re: Running Ranorex Tests as part of build process?

Post by daa » Fri Jan 07, 2011 5:51 pm

We're doing this using BuildBot and SVN. BuildBot has a master machine controlling several build slaves, at least one of which has a Ranorex runtime on it. The build scripts controlling the overnight build have a "run Ranorex tests" step in them, which catches the output and merges it into the general output stream, using the correct XML display for the .rxlog stuff. If you were to stay up until 2am and log into the slave box, you'd see all the tests busily beavering away.

Currently the test slave is a physical machine that permanently has a user logged into it so that Ranorex has a screen, but we're in the process of moving to virtual slaves. We don't expect this to make any difference apart from performance -- the current physical box is quite old.
David Allsopp,
Test Automation Engineer, Mitrefinch Ltd.