How to make a choice

Best practices, code snippets for common functionality, examples, and guidelines.
IvanT
Posts: 25
Joined: Wed Feb 06, 2019 8:00 pm

How to make a choice

Post by IvanT » Wed Apr 24, 2019 5:31 pm

Hello everyone. I have a problem. i am testing two versions of the program (x32 and x64). Exe files are located in Program files and program files x86. I am testing these versions using a single testsuite.
How do i make a choice in Ranorex which version to test at the exact moment(may be using properties or may be ranorex have something else)???

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

Re: How to make a choice

Post by Stub » Thu Apr 25, 2019 7:40 am

I put the path to my AUT in the Global Parameters for my Test Suite. The code in the Test Suite uses that Global Parameter to determine which platform build of our AUT to start when it commences testing. I also interrogate that parameter to determine if it's a Win32 or Win64 build, in case that happens to make any difference e.g. to which Registry values I may need to update during the test run.

Putting the path to the AUT in the Global Parameters also lets me specify it via the command-line from our MSBuild-based build system. If I'm testing manually from within Ranorex Studio then I just adjust the single Global Parameter to the new path.