Page 1 of 2

Test cases not iterating based on rows in the Excelsheet

Posted: Wed Jun 25, 2014 3:24 pm
by Rajaniboyapati
I have a parent testcase which will login-->nagivate->add items->close I have created seperate test case for each test case for add items test case there are child test cases as well where each has it's own data connector,they are accessing the same excel sheet but different sheets, now I want the middle item to iterate 3 times and there is data in excel sheet for 3 days, but when I kick off the whole test suite, end to end it is running only once.

i want to login->navigate and then run the add items test case 3 times. I have attached the screenshot of my test cases flow.

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Wed Jun 25, 2014 3:33 pm
by krstcs
The problem is that you have your "Close" test case inside the looping test case, which won't work the way you want. You need to move it so that it is under the top-level test case, so it is on the same level as the startup test case.

You need to make sure that all test cases are under the correct parent case.

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Wed Jun 25, 2014 3:50 pm
by Rajaniboyapati
close will not close the application, it is used only to close the popup that I am working on adding the items and will go back to the actual page.so I can't move close to outer loop as the popup has to be closed to move on to the next iteration and start from create again.

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Wed Jun 25, 2014 4:33 pm
by krstcs
Sorry for misunderstanding.

I assume from the screenshot that you are wanting to loop on the Summary test case. Have you made sure that there are no filters on the SummaryScorecardData data connector? Sometimes Ranorex doesn't display the filter until the data connector is opened, especially on startup.

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Wed Jun 25, 2014 6:22 pm
by Rajaniboyapati
filters at what level ? can you guide me where to look for filters ? I am attaching the screenshot of the data connector.

Also I am maintaining 1 excel sheet and each test case has it's own worksheet with it's data and each test case has it's own data connector (related work sheet).

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Wed Jun 25, 2014 6:33 pm
by krstcs
That last picture is the exact spot I was talking about, the filter is at the bottom. :D

Each data connector can be filtered using the radio buttons and Range field.

You should look through each data connector and make sure that the filter at the bottom of the page is set to "All Rows", but it looks like you don't have a filter set here, so it should be running all rows.

Excel as a source shouldn't be a problem either. Are you using formulas in Excel (shouldn't be a problem either, but...)?

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Wed Jun 25, 2014 7:26 pm
by Rajaniboyapati
Yes I did use concatenate formula in my excel but that shouldn't be the problem(I am hoping), I have attached the run log file.

If checked the filters of all the data connectors and all of them show as All rows.

My parent test case is summary whose data connectors has 3 rows and the child/sub-test cases are all others which has only 1 row in the data connector,is this effecting the iterations ?

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Wed Jun 25, 2014 7:30 pm
by Rajaniboyapati
apparently I am not able to upload any type of files except image. It tried to upload the rxlog/html file format and both of them are rejected.

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Wed Jun 25, 2014 7:45 pm
by krstcs
Rajaniboyapati wrote:Yes I did use concatenate formula in my excel but that shouldn't be the problem(I am hoping), I have attached the run log file.

If checked the filters of all the data connectors and all of them show as All rows.

My parent test case is summary whose data connectors has 3 rows and the child/sub-test cases are all others which has only 1 row in the data connector,is this effecting the iterations ?
I don't think the Excel formula should make a difference either, but it might give the Ranorex team something to check out.

Filters look good, and your test case structure is fine (I do that kind of thing a lot).


I'm stumped.


As far us uploading files, did you try zipping them first?

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Wed Jun 25, 2014 7:53 pm
by Rajaniboyapati
I attached the screenshot of the run log which shows where it ran iteration1 and iteration2,iteration3 are blank.

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Fri Jun 27, 2014 1:14 pm
by Support Team
Hi Rajaniboyapati,

In order to execute all iterations, you have to set the error behavior of your “Summary” Test Case to “Continue with iteration”.

Please perform the following steps to change the error behavior:
  • Right click on the Test Case
  • Select “Error Behavior”
  • Select the desired method
The default error behavior is set to “continue with sibling”. This means if there is a failure in one of your recordings, the current Test Case is executed to its end, but then the next sibling is started.

Regards,
Markus (S)

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Mon Aug 11, 2014 7:33 pm
by Rajaniboyapati
Hi, I tried accordingly changing the error behavior of “Summary” Test Case to “Continue with iteration”, now it is going to the next iteration but I think the pointer is still getting set at the first row it is selecting data from the first row but not the second row.

I tried also setting the data range filter as 2-3 (there are totally 3 records), when kicked off to run it is still picking data from first row, it is not pointing to second row, any solution ?

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Tue Aug 12, 2014 3:36 pm
by Rajaniboyapati
Hi, can you please provide any possible solution for this issue, a test case is iteration based on data in excel sheeet which has 3 rows, first row runs fine, but when it comes to second iteration it is still picking the first value/default value set to that variable.

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Wed Aug 13, 2014 3:10 pm
by Support Team
Hi Rajaniboyapati,

Unfortunately we are not aware of such an issue.
May I ask you, if it is possible for you, to send us your solution or a sample with the same behavior?
If you don’t want to post your solution in this public forum you can send it to [email protected]
Additionally: please let us know which version of Ranorex you are currently using.

Thank you in advance.

Markus (S)

Re: Test cases not iterating based on rows in the Excelsheet

Posted: Thu Aug 14, 2014 9:30 pm
by Rajaniboyapati
Hi,I am using new version 5.0.3, or let me put it in this way, script is running only based on the default value that is given for the variable, all the other variable values are being picked up from the excel sheet,