Using variables in row of recordings

Ask general questions here.
BlindJones
Posts: 47
Joined: Fri May 17, 2019 7:10 am

Using variables in row of recordings

Post by BlindJones » Sun Nov 15, 2020 9:54 am

Good morning all,

I have a question about using global parameters / data-binding / variables.
I read the Ranorex help articles a couple of time now, but I am still not sure how to achieve my mission...

We have a solution that must open very often a specific catalogue, after that open a specific model and again after that a specific article.
(Please see screenshot "Recordings-Row") .

The current situation right now is, that I have hundreds of recording modules named like "Open_catalogue_customer_A.xrec", "Open_catalogue_customer_B.xrec", "Open_model_Customer_A_model_A.xrec" etc. and the ranorex solution seems to be a bit slow to all this recordings in it.
Within the recording the name of the catalogue is set without any variable.

So I wondered whether I can use variables / global parameters to only have one recording for opening a catalogue and pass the catalogue name to one variable in the recording when needed. I could set up a list of all needed catalogues before.

I must admit that I am confused by the global parameters / variables in repository / variables in the recording itself...

So, can someone give me an explanation how to achieve just using 3 recordings (Open_catalogue / Open_model / Open_article) instead of hundreds of recordings? It would be nice step by step so I can understand what is happening then. :wink:

Thank you very much!
Attachments
Recordings-row.png
Recordings-row.png (23.44 KiB) Viewed 165 times

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

Re: Using variables in row of recordings

Post by odklizec » Mon Nov 16, 2020 8:05 am

Hi,

This is exactly the kind of job for data-driven approach. I would recommend you to watch this webinar...
https://www.ranorex.com/automated-testi ... n-testing/
And then read the user guide about data-driven testing...
https://www.ranorex.com/help/latest/ran ... roduction/

Basically, you should create a data connector, in which you define variable (data connector column header), which will be connected to variable in recording of your choice. And in the data connector variable, you should specify the items you want to post to recording, where each data connector row is one iteration. If you don't want to repeat recordings in smart folder/test case with attached data connector, or you want to repeat it only with limited number of rows, you can define data connector range per each smart folder/test case. So basically, you can use the same data connector in multiple smart folders/test cases, but each with different range. Hope this helps?
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

BlindJones
Posts: 47
Joined: Fri May 17, 2019 7:10 am

Re: Using variables in row of recordings

Post by BlindJones » Mon Nov 16, 2020 11:04 am

Hi Pavel,

thank you, I think I understand now how this mapping of variables work...
I will give it a try.

Thank you for your time and fast answers. :)

Kind regards
Sebastian