Ranorex test .rxtst requires .exe file

Ask general questions here.
justletmesignup
Posts: 8
Joined: Fri Jul 03, 2015 8:13 pm

Ranorex test .rxtst requires .exe file

Post by justletmesignup » Wed Aug 31, 2016 6:41 pm

Hello all,

I have a quick question about building tests via Ranorex. I have test suites that I'd like to run; these are the .rxtst files. These .rxtst files are stored in a root folder. The .exe files that the .rxtst requires when it's run is stored in the root/bin/debut folder. I need to manually copy and paste the .exe file into the root folder everytime changes/updates are being made to my test suites.

--

Sometimes our developers will do re-factors or name changes and as a result, some paths will have changed names. For example, a path for one of my saved actions is originally:

Code: Select all

.../container[@name='view']//container[@name='problemDefTitledPane']//link[@name='importLink']
and via the name changes, it now becomes:

Code: Select all

.../container[@name='view']//container[@name='problemDefTitledPane']//link[@name='importConfigLink']
(notice the importLink gets changed to importConfigLink). As a result of this name change, the test won't work anymore because it'll get stuck at that action.

What's the easiest way for a developer making these changes to re-compile the .exe file that the .rxtst uses? Also, how do we have the .exe file automatically generated and put into the root folder instead of the root/bin/debug folder?

Ranorex version: 6.0.1
Windows 10

Thanks,
Brian

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

Re: Ranorex test .rxtst requires .exe file

Post by krstcs » Thu Sep 01, 2016 1:38 pm

First, each test suite project should have one and only one rxtst file associated with it. That means each EXE file for each test should have only one rxtst file with it. (Edit: This is a Ranorex design limitation, which they are looking into, but it may not change anytime soon.)

Second, when Ranorex builds the tests it automatically copies each project's rxtst file into the output folder (<root>\bin\debug in your case) along with the exe, report files, and dlls needed. There should be no need to copy anything anywhere in order for it to work from that output directory.

Third, IF you need to copy the output files (exe, rxtst, dlls, etc.), then you should just copy everything that is in the project's bin\debug folder to the place you want. You can do this with a post-build event if needed (this can be configured by right-clicking the project and selecting "Properties", then going to the Build tab and putting the batch command you want in the Post-Build input box).

Finally, changes to the rxpath of an element will require a rebuild of the project. If you want this to be done automatically, I would suggest looking into a Continuous Integration solution like Jenkins (it's free!) and using a version control system like Git or SVN (one of which you should already be using anyway). Then, you can have Jenkins kick off a build of your test project any time a new piece of code is pushed to your code repository. This is the best, most effective, and most convenient way to handle building any software project.
Shortcuts usually aren't...