Move Data source Row in Runtime

Ranorex Spy, Recorder, and Studio.
NewLearner
Posts: 29
Joined: Wed Jan 15, 2014 3:32 pm

Move Data source Row in Runtime

Post by NewLearner » Wed May 07, 2014 1:54 pm

Hi,
Please let me know is there any way to move the Excel data source row in runtime?

Which means I have a Excel data source file for my testcase, I have 10 rows data in that Excel, I don't want 10 iteration of testcase execution, I want one single execution for my test case, in the test case line 5 need data from Excel Row 1, test case line 7 need data from Excel Row 2, test line 8 need data from Excel Row3..etc... In this scenario how to move the Excel row pointer in runtime.

Thank you,
Madhavan

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

Re: Move Data source Row in Runtime

Post by krstcs » Wed May 07, 2014 2:30 pm

Ranorex is designed to pass every row in the data source into the test case it is bound to. You can filter that data, but you cannot (and in my opinion, should not) manipulate the data, in the way you describe, during the test run.

Given what you describe, I would suggest that you try to separate your test cases and the data sets so they are independent and can be bound the way you want them.


When you use the term "test case" are you referring to the Recording Module, or the Test Case in the Ranorex Test Suite?

Can you post your test project (or a demonstration project) so we can see what you are trying to do?
Shortcuts usually aren't...

NewLearner
Posts: 29
Joined: Wed Jan 15, 2014 3:32 pm

Re: Move Data source Row in Runtime

Post by NewLearner » Wed May 07, 2014 4:40 pm

Yes here test case means only a single recording module...

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

Re: Move Data source Row in Runtime

Post by krstcs » Wed May 07, 2014 5:06 pm

Since we are in the Ranorex forum, please try to refer to Ranorex items by the name Ranorex uses, that would help all of us not get confused. :D

A "Recording Module" (.rxrec file) holds the actions that will be taken on the System Under Test.
A "Test Case" holds Recording Modules or Recording Module Groups, and is inside a "Test Suite" (.rxtst file). The Test Case is also where data source is connected to the module variables.


There is no way to specify that specific actions in a recording module use a separate row of data from the test case's data source. That is not how Ranorex is designed. We have to work within the design of Ranorex. If you need a specific action to use a different data set, you will need to put that action in it's own recording module, and that module in it's own test case.

It would be really helpful if you would post a snapshot of your SUT, and the Ranorex Solution you are using. We might be able to help you with it.

While I haven't seen your project, from what you have stated here I would highly recommend that you split up your recording into small units (Click_OKButton, Enter_UserName, etc). You can then mix and match them as needed, putting each module inside it's own test case in the suite and binding the data source to each test case, using the filter on the data source to limit the rows available to that test case.
Shortcuts usually aren't...