How to include Ranorex in build process?

Best practices, code snippets for common functionality, examples, and guidelines.
sheafox
Posts: 23
Joined: Mon Jul 09, 2018 3:54 am

How to include Ranorex in build process?

Post by sheafox » Thu Aug 09, 2018 12:48 am

My company is new to Ranorex so test automation is new for us. What is the best method for including Ranorex in your build process? How should this be done ?

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: How to include Ranorex in build process?

Post by Stub » Thu Aug 09, 2018 1:59 pm

Our solution here is over 10y old and very customised, but it's built around MSBuild. I basically pull the Ranorex source code for our AUT from source control (this includes the Ranorex generated repository source code), build the Ranorex solution with MSBuild, then run the Ranorex tests.exe that a successful build produces. I use the Ranorex command-line arguments to save the report to a .rxzlog compressed format and email that to interested parties, as well as notifying Slack of the test results.

There are likely tons of solutions out there. This just fit neatly into our own build system that has developed over the years.

sheafox
Posts: 23
Joined: Mon Jul 09, 2018 3:54 am

Re: How to include Ranorex in build process?

Post by sheafox » Fri Aug 10, 2018 3:16 am

Once again I appreciate the assistance.

User avatar
jarrettmk
Posts: 9
Joined: Wed Sep 19, 2018 6:10 pm

Re: How to include Ranorex in build process?

Post by jarrettmk » Fri Sep 21, 2018 1:16 am

I just implemented Ranorex in our CI/CD pipeline. I didn't have any problems with our Bamboo build server building the solution as long as Ranorex Studio was installed on the build server.

We didn't want to use one of our Studio licenses for just the build server so we decided to check-in our Bin folder (with Copy Runtime to Output enabled) to source control (BitBucket). The Bamboo server just fetches the Bin folder and creates artifacts with the necessary files and passes those on to a Bamboo Agent running the Ranorex Remote Agent. The agent doesn't need anything installed other than the Remote Agent software and the Ranorex browser extensions. The only caveat we found is that we had to jump through a few hoops to get the Bamboo Agent running as console rather than it's default of running as a service. We also have the user that runs both the Bamboo and Ranorex agent auto-login if the server ever reboots so it's always available.

Once my Bamboo plan runs the tests on the remote agent I have Ranorex generate a compressed rxzlog and a junit report. The rxzlog gets stored as an artifact in an AWS S3 bucket and the junit report gets parsed by Bamboo to mark the run as passed or failed in Bamboo's UI. If it fails for any reason we have triggers to notify us in HipChat (soon to be Slack) and it also sends an email to me.
Jarrett Karyshyn
Quality Assurance & Automation Engineer
USA - EST (UTC−05:00)/EDT (UTC−04:00)
Image

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: How to include Ranorex in build process?

Post by Stub » Fri Sep 21, 2018 8:54 am

I do a similar thing with our build process and auto-logging in. Since our desktops are normally locked, our build process unlocks the desktop before commencing a Ranorex test-run. It then re-locks the desktop once the test run has been completed. That has worked really well! I got this suggestion from krstcs here. It also lets me reboot the machine or have it restart anomalously without needing any manual intervention.

At the moment we only have one automated Ranorex test machine, but we've put a node-locked Ranorex license onto it so we have a full Studio environment installed there too. Now that we're up and running with Ranorex this probably isn't so important. But this was before I integrated Ranorex testing directly into our automated build process. Perhaps in future we'll move over to looking at Ranorex Remote Agents, but I haven't got there yet.