Setting up test data for testcases

Download and share automation modules and examples.
vishni
Posts: 9
Joined: Wed May 26, 2021 11:51 pm

Setting up test data for testcases

Post by vishni » Sat Jun 05, 2021 12:22 pm

Hi,

I have an issue validating the test case result. My testcases has to provide data in below format
Testcase1 - takes input Employee name and the validation is
Age
Salary
Department..many more

Testcase2: takes input as employee name and validation is
Age
Salary .. just 2 items

I'm not sure how to set this kind of set up using data source.
If I use excel, I might end up running same test again as it reads each row.
As an alternate I was thinking of creating customized xml file
But reading these values and binding variable is been a challenge.

Can someone help me with this issue? I read app.config can be used. I'm not very sure how that can be used with ranorex.

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

Re: Setting up test data for testcases

Post by odklizec » Mon Jun 07, 2021 8:46 am

Hi,

I'm not quite sure I understand correctly what exactly is your problem? Anyway, how I understand it, you want to create one data connector file, but use different number of rows from it for Test Case 1 and Test Case 2? That's totally possible. All you have to do is to set a different data range for each test case (or smart folder).

See this user guide paragraph, about limiting data range:
https://www.ranorex.com/help/latest/ran ... tdatarange
Is that what you are looking for?
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

vishni
Posts: 9
Joined: Wed May 26, 2021 11:51 pm

Re: Setting up test data for testcases

Post by vishni » Tue Jun 08, 2021 5:10 am

Not really, with excel or dataConnector the columns are fixed. My test data would vary something like below

Column1, column2,column3, column4
Employee1, data1, data2,data3,data4
Employee2, data1, data2
Employee3, data1

is the above format possible ?

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

Re: Setting up test data for testcases

Post by odklizec » Tue Jun 08, 2021 6:56 am

Hi,

I may be missing something obvious, but what's the problem with leaving empty cells "empty" in given columns?

How I understand it, you will anyway have to use either multiple recordings, with different number of steps? Or single recording/code module, with conditional steps? So different number of columns should not be a problem? In one recording you simply assign more columns (variables) in another recording less columns (variables). Or one "conditional" recording/code module will be assigned with all columns and you will simply use those you need to use, for given state of test.

You see, it would be much easier to help you, if you share a structure of your test, with explanation where the data connector should be used and with what recordings and variables. Ideally, share a sample solution. Thanks.
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