Page 1 of 1

Setting up test data for testcases

Posted: Sat Jun 05, 2021 12:22 pm
by vishni
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.

Re: Setting up test data for testcases

Posted: Mon Jun 07, 2021 8:46 am
by odklizec
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?

Re: Setting up test data for testcases

Posted: Tue Jun 08, 2021 5:10 am
by vishni
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 ?

Re: Setting up test data for testcases

Posted: Tue Jun 08, 2021 6:56 am
by odklizec
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.