Page 1 of 1

Making the solution multi-AUT compatible

Posted: Tue Nov 12, 2019 1:53 pm
by Thibaud
Hello !

I'm using Ranorex 9.2 for less than a week and I am struggling to do this :
As I am trying to prepare testing scenarios to test our builded application, i'm trying to make the tests available on all versions possible.

But so far, everytime I changed the AUT i needed to change every action/item manually.

Is there any way to add the path of the AUT as a variable maybe ?

Any intel on the way to achieve this would be greatly appreciated !

Thank you !

Re: Making the solution multi-AUT compatible

Posted: Thu Nov 14, 2019 9:09 am
by odklizec
Hi,

Could you please share a Ranorex snapshot of your AUT, ideally, multiple snapshots, where we can see typical differences? Plus post the full xpath of element (or two), as you have it in repository and which you want to make compatible with multiple AUT versions.

Of course, there is a possibility to make the parts of xpath variabilized. Plus you can use 'and' and 'or' conditional operators. So please post the snapshot(s) and xptah(s) as requested, so anyone here can review them and suggest the best approach.

Re: Making the solution multi-AUT compatible

Posted: Thu Nov 14, 2019 10:01 am
by Thibaud
Hi odklizec, thank you for your quick answer,

I hope the two snapshot will help you understand my problem.

I also took a screenshot to show you :
Wizard.JPG
As you can see the only difference is the path, but as I do the tracking of each element i can't figure out how to make it a variable.
I would like to only have to change the path of the .exe to be able to test any version of my AUT.

Tell me if you need anything else !

Re: Making the solution multi-AUT compatible

Posted: Thu Nov 14, 2019 10:15 am
by odklizec
Hi,

As long as the difference is just in the AUT title, the fix should be quite simple.
You can, for example, completely eliminate version number from the title:
/form[@title~'PiXYZStudio']
Or you can define AUT title via variable (filled via binded Global/TestCase/SmartFolder parameter or TC/SF data connector):
/form[@title=$titleString] <- use this, if you want to use entire title string, including version number
/form[@title~$titleString] <- use this, if you want to use partial title string
Another possibility is to use process name, instead of AUT title:
/form[@processname='PiXYZStudio']
And yet another possibility, is to use conditional operators in the xpath:
/form[@title>'PiXYZStudio 2019.1 Update' or @title>'PiXYZStudio 2018.3 Update']
or like this (using regex):
/form[@title~'PiXYZStudio (2019.1|2018.3) Update']
As you can see, there are multiple ways to make the xpath version independent. The easiest solution is to using regex operator '~' and simply eliminating version string from the xpath.

Re: Making the solution multi-AUT compatible

Posted: Thu Nov 14, 2019 11:32 am
by Thibaud
Thanks a lot !

Using processname seems like a very good option since the name won't change before a long time :lol:

The only strange thing is that I need to track again all my items for them to work again ... :|

But it's not a big deal, starting a new project and switching to processname from start is ok for me.

Again , thank you very much for your time odklizec !

Re: Making the solution multi-AUT compatible

Posted: Thu Nov 14, 2019 11:49 am
by odklizec
Hi,

It should not be required to record/track all repo items again? All items under form (with correct process name), should work as before? Simply move all items under this form and all should be OK.

Re: Making the solution multi-AUT compatible

Posted: Thu Nov 14, 2019 1:30 pm
by Thibaud
That is what I thought too.

The issue must be somewhere else, i'm gonna try to find out where.

Probably in one of my userscript, but it will be for a new topic !

Re: Making the solution multi-AUT compatible

Posted: Thu Nov 14, 2019 2:56 pm
by odklizec
OK, good luck with finding the culprit of problem. I'm sure it's something minor ;)