Best Practices for Build Server & different Ranorex versions

Best practices, code snippets for common functionality, examples, and guidelines.
User avatar
Aracknid
Posts: 388
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Best Practices for Build Server & different Ranorex versions

Post by Aracknid » Fri Jan 23, 2015 9:58 pm

Hi,

I created a machine to specifically build my Ranorex scripts, using CC.NET, VS2012, and TFS integration. It works great and I'm happy with the results I'm getting. But then I ran into a problem and wasn't sure of the best way to handle it.

When the build machine was created, we were working with Ranorex 4.0.6 and version X of my company's application. When version X of our product shipped, we upgrade to Ranorex 5.x, branched the code in TFS (branch X was created to match Application version X), and started working on the next version. When I need to build scripts on the build machine, I can either build branch X or branch current (main line). Either works, and I get my EXE files.

The problem is that the files compiled from branch X are now compiled using Ranorex 5.x, but all the older environments on which I need to run these still have Ranorex 4.0.6.

Is there a way to compile using different versions of Ranorex on the same machine?. So can I build branch X with Ranorex version 4.0.6, and branch X+1 with Ranorex 5.2.2, and (in the future) branch X+2 with Ranorex 6.x.

BTW, because people will want to know....

1) When a product ships, I like to keep everything as it is for all future testing. I don't upgrade for the sake of upgrading. Everything worked when it went out the door, so all future testing on this (for patches and what not) needs to stay constant. I'll only upgrade if I absolutely have to, like for example if we need to test support on a browser version that is newer and was not supported in older Ranorex version.

2) Ranorex is usually good with upgrading, so at the time I thought lets just upgrade all the VM's and run these branch X scripts compiled with the newer Ranorex... and there were too many showstopper issues with that version of Ranorex. I had to uninstall Ranorex 5.1.x off the build machine, re-install 4.0.6, re-build everything to get my branch X scripts.

3) You might be asking why am I compiling the scripts on a shipping version? Didn't they already work and pass? Yes, but every now and then we need to tweak them, or small changes in patches require a change in the script, so we still work on the scripts on this branch X.

Thanks,

Aracknid

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

Re: Best Practices for Build Server & different Ranorex versions

Post by krstcs » Mon Jan 26, 2015 4:13 pm

I don't believe there is a way to have multiple versions of Ranorex installed on the same system.

You could create another build system (a VM would work) and install the older version of Ranorex on it. Then just add it as a worker in CC.
Shortcuts usually aren't...

User avatar
Aracknid
Posts: 388
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: Best Practices for Build Server & different Ranorex versions

Post by Aracknid » Mon Jan 26, 2015 4:27 pm

Does Ranorex have to be installed in order for a build to actually work? I'm not running scripts on the build machine, just building which requires linking to the files for compile reasons. What if I just put the core files in some folder (different per version) and refer to these in my solution/project?

BTW: I'm actually already on a VM, and I did use snap shots to toggle between different Ranorex builds, but this is a hassle because I can only work in "one world" at a time. I had thought about doing a separate build machine for each Ranorex version I have scripts for (or will have scripts for) but that also seemed like a bit too much to handle. I was hoping for something a little more elegant.

Thanks,

Aracknid

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

Re: Best Practices for Build Server & different Ranorex versions

Post by krstcs » Mon Jan 26, 2015 4:45 pm

You might be able to put the Ranorex DLLs in the same folder as your project, but I'm not sure. Try it and see what happens, worst thing I could think of is that you have to delete the folder.

I don't think compiling requires a license server, but you might include the .lic file in there just in case.



FWIW, I keep all of my Ranorex installs up to the latest version as much as possible and have Jenkins scripts specifically created to install the latest version, so I don't worry about back-building. I know that may not be an option for you though.
Shortcuts usually aren't...

User avatar
Gh15ty
Posts: 10
Joined: Wed Oct 05, 2011 9:41 pm

Re: Best Practices for Build Server & different Ranorex versions

Post by Gh15ty » Thu Mar 05, 2015 10:29 am

For each branch I have an assemblies folder that I drop the Ranorex libraries into and then add a reference to that. Each branch uses the same location (in relation to the where the sln file lives), but because they are separate branches you put what ever version you want in there.

Currently my Trunk and Release branches are using different version of the Ranorex libraries, purely because I have been too lazy to merge the trunk updates into Release, but it's working fine for me.