Making the solution multi-AUT compatible

Ask general questions here.
Thibaud
Posts: 4
Joined: Tue Nov 12, 2019 1:37 pm

Making the solution multi-AUT compatible

Post by Thibaud » Tue Nov 12, 2019 1:53 pm

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 !

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5360
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Making the solution multi-AUT compatible

Post by odklizec » Thu Nov 14, 2019 9:09 am

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Thibaud
Posts: 4
Joined: Tue Nov 12, 2019 1:37 pm

Re: Making the solution multi-AUT compatible

Post by Thibaud » Thu Nov 14, 2019 10:01 am

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
Wizard.JPG (134.47 KiB) Viewed 59 times
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 !
Attachments
2019.1Wizard.rxsnp
(92 KiB) Downloaded 2 times
2018.3Wizard.rxsnp
(17.53 KiB) Downloaded 2 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5360
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Making the solution multi-AUT compatible

Post by odklizec » Thu Nov 14, 2019 10:15 am

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Thibaud
Posts: 4
Joined: Tue Nov 12, 2019 1:37 pm

Re: Making the solution multi-AUT compatible

Post by Thibaud » Thu Nov 14, 2019 11:32 am

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 !

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5360
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Making the solution multi-AUT compatible

Post by odklizec » Thu Nov 14, 2019 11:49 am

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Thibaud
Posts: 4
Joined: Tue Nov 12, 2019 1:37 pm

Re: Making the solution multi-AUT compatible

Post by Thibaud » Thu Nov 14, 2019 1:30 pm

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 !

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5360
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Making the solution multi-AUT compatible

Post by odklizec » Thu Nov 14, 2019 2:56 pm

OK, good luck with finding the culprit of problem. I'm sure it's something minor ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration