This is a migrated thread and some comments may be shown as answers.

Data-driven test not stopping?

8 Answers 82 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 14 Sep 2011, 04:59 PM
Is there a setting I need to change to get my data-driven test to stop iterating after the last data element?

8 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 14 Sep 2011, 08:20 PM
Hi Dan,

I must admit I am slightly confused by this request. Your data source will have N number of rows in it (e.g. an Excel spreadsheet with 50 rows) and Test Studio will automatically run the test once for each row contained in the datasource and then stop.  So 50 rows of data means the test will run 50 times. Are you seeing different behavior or unexpected behavior, or are you saying you'd like the test to stop prior to iterating through all 50 rows?

If what you really want is to only have the test use a subset of the available rows (e.g. only rows 4-7) you can set a Filter on which rows to use at the time you bind your test to a data source (it's discussed near the bottom of that page).

All the best,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
John
Top achievements
Rank 2
answered on 14 Sep 2011, 08:22 PM
I think I ran into this where I had blank ROWS, my DUH!  please check and see if you do not have any blank rows.

thanks,
John
0
Dan
Top achievements
Rank 1
answered on 14 Sep 2011, 08:28 PM
Let me see if I can explain better.

Data source is Excel spreadsheet, one column of data, ten entries in that column (11 if you include the label/heading.)

I run my test and it iterates through all 10 <Great! exactly what I want it to do!>...

then continues with number 11 where it doesn't populate the text box with anything...and consequently causes the test case to fail

I thought it would stop after that data column went empty?

If I'm still being unclear, let me know and I'll ship you my project/data files.

Thanks a bunch!
Dan
0
Dan
Top achievements
Rank 1
answered on 14 Sep 2011, 08:30 PM
I have ~1,000,000 empty rows below my 10 data rows in the excel spreadsheet, what do you mean, John?

Thanks
Dan
0
Accepted
Cody
Telerik team
answered on 14 Sep 2011, 09:21 PM
Hello Dan,

I think I can clarify that. When you go to the "Bind test to data source" dialog how many rows do you see in the Preview Data list? Are there extra empty rows displayed? this can happen if you accidentally created rows with spaces in the cells. Ideally there should only be 10 rows displayed... nothing more. If you find there are more than 10, try opening the Excel file (remember the one the test uses is located in the Data folder of the Project folder) then deleting a bunch of rows after your 10. When finished close the file and check what you see in the "Bind test to data source" dialog.

@John, thank you for assisting with this. I've added Telerik Points to your account as compensation.

All the best,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Dan
Top achievements
Rank 1
answered on 14 Sep 2011, 10:07 PM
Deleting the rows fixed it.
Thanks Cody!
Dan
0
Cody
Telerik team
answered on 14 Sep 2011, 10:45 PM
Hi Dan,

That's excellent news! Thank you for the update.

Regards,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
John
Top achievements
Rank 2
answered on 15 Sep 2011, 01:10 PM
Thats Great, what Cody told is what I was thinking.  I did the same thing a few weeks back.  I was WTF!  lol  then I looked at the table and thought I should try removing the rows and it worked. 

have fun,
John
Tags
General Discussions
Asked by
Dan
Top achievements
Rank 1
Answers by
Cody
Telerik team
John
Top achievements
Rank 2
Dan
Top achievements
Rank 1
Share this question
or