Resource file support.

Ask general questions here.
User avatar
FelixK98
Posts: 54
Joined: Fri Apr 08, 2016 6:28 am

Resource file support.

Post by FelixK98 » Mon Jul 25, 2016 7:22 am

Hi Everyone,

I am wondering if Ranorex 6.x supports binding variables with data from resource file.
Can I use resource file as "Data Source" within my tests?

Thanks,
Felix.

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

Re: Resource file support.

Post by odklizec » Mon Jul 25, 2016 7:39 am

Hi,

As far as I know, Ranorex currently supports CSV, Excel, SQL and simple data table (data table embedded in rxtst file). There is definitely no support for res. files? If you wish, you can make a feature request at [email protected]. But I won't put much hope into this ;) Could you please explain, why do you want to use res. files, instead of any of the available options?
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

User avatar
FelixK98
Posts: 54
Joined: Fri Apr 08, 2016 6:28 am

Re: Resource file support.

Post by FelixK98 » Mon Jul 25, 2016 8:58 am

Hi odklizec,

Thanks for replay.
Our app currently works with English but it will be localization for few over languages. So, we need to make sure that our automation solution can work with this languages in term to test many message strings. Moreover, I have to set tests the way which it can be data-driven for different groups of people within test data. I got pretty complex test data structure for end-2-end tests. I can have same pair of people in two different tests where person 1 is primary and person 2 is secondary for one test and vise versa for second test. And these test are going one after another for same end-2-end scenario.
So, we thought to use resource files for test data including languages cover.
All available options are providing solution when you need run few iterations with same variables which getting different values each time. I got situation when I have to set same variable to two different values during the same test.

Thanks,
Felix.

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

Re: Resource file support.

Post by krstcs » Mon Jul 25, 2016 2:45 pm

If you need dynamic data (which is what I believe you are saying) then you should probably use a SQL database to hold your data, and use SQL Data Connectors in your tests.

You can edit the data connectors' SQL query strings during the test to make them get different data sets based on what is going on in the test at runtime. This is exactly how I do it and it works well if you set it up right.

You will need to learn SQL, C#, and the Ranorex API pretty well.

Your other option is to use multiple data files (use CSV, not EXCEL!!) and at runtime you would chose which one to use based on the user input when the test is started, or the username, etc. But, again, this would mean reconfiguring the data connectors at runtime.


But, as Pavel said, Ranorex does not use resource files for data connectors.


NOTE: Ranorex has placed an item on their road-map that indicates that there will be some significant changes to how data connectors work in a near-future version (maybe 6.1 or 6.2) so there may be a new way to handle many of these types of things at that time.
Shortcuts usually aren't...