Different data for re-used recording in test case

Ranorex Studio, Spy, Recorder, and Driver.
jamesslater
Posts: 10
Joined: Mon Feb 20, 2012 3:07 pm

Different data for re-used recording in test case

Post by jamesslater » Mon Mar 05, 2012 1:58 pm

Hi There,

What I have tried to do is build up a collection of module recordings which I can then drop into various different test cases. For example I have a startup and shutdown recording, and recordings for adding various bits of data.

I have a test case which is built up of several recordings, and there is one recording which I want to repeat several times but with different data during the same test case. I have a variable setup in the recording, but in the test case it will only allow me to bind one row of data to this variable, IE if the recording is repeated several times, then the same data will be entered very time.

Is there away to resolve this, or is my approach not recommended?

Thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Different data for re-used recording in test case

Post by Support Team » Mon Mar 05, 2012 3:02 pm

Hi,
jamesslater wrote:Is there away to resolve this, or is my approach not recommended?
Did you read these documentation about Data Driven Testing with Ranorex?
http://www.ranorex.com/support/user-gui ... sting.html

I think this is exactly what you need to do your actions.

Regards,
Peter
Ranorex Team

jamesslater
Posts: 10
Joined: Mon Feb 20, 2012 3:07 pm

Re: Different data for re-used recording in test case

Post by jamesslater » Mon Mar 05, 2012 4:46 pm

Hi Peter

Thank you for your reply, I did read this section of the documentation, but what I’m doing is slightly different, let me explain a bit more:

In a test case, say I have two recordings, the first records has variables name, address, email for example, but the second recording has a single variable which is say favourite foods.

In the test case, I want only run the first recording once, to enter the customers details into the system, but then in the same test case I want to run the ‘add favourite food’ recording several times but with different data.

Because it is the whole test case which binds to a data source, rather than an individual recording, I need a way to assigning multiply values for favourite food per single row of users details. For example

Name, address, email, food1, food2, food3
Mr Test, 10 Downing Streen, [email protected], Cake, Pie, Fish

So the single variable ‘food’ in the add food recording, I need to assign food1 , food2, and food3 for the different iterations.

Is the best way to achieve this to just have nested test cases where the different recordings are split into sub test cases with different data bindings?

Thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Different data for re-used recording in test case

Post by Support Team » Tue Mar 06, 2012 2:51 pm

Hi,
Is the best way to achieve this to just have nested test cases where the different recordings are split into sub test cases with different data bindings?
Yes, at the moment this is the best solution.

Regards,
Markus
Ranorex Support Team

jamesslater
Posts: 10
Joined: Mon Feb 20, 2012 3:07 pm

Re: Different data for re-used recording in test case

Post by jamesslater » Tue Mar 06, 2012 5:45 pm

Great, that works well.

Thanks