Data-driven test not stopping?

9 posts, 1 answers
  1. Dan
    Dan avatar
    10 posts
    Member since:
    Aug 2012

    Posted 14 Sep 2011 Link to this post

    Is there a setting I need to change to get my data-driven test to stop iterating after the last data element?
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 14 Sep 2011 Link to this post

    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
  3. John
    John avatar
    8 posts
    Member since:
    Jul 2012

    Posted 14 Sep 2011 Link to this post

    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
  4. Dan
    Dan avatar
    10 posts
    Member since:
    Aug 2012

    Posted 14 Sep 2011 Link to this post

    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
  5. Dan
    Dan avatar
    10 posts
    Member since:
    Aug 2012

    Posted 14 Sep 2011 Link to this post

    I have ~1,000,000 empty rows below my 10 data rows in the excel spreadsheet, what do you mean, John?

    Thanks
    Dan
  6. Answer
    Cody
    Admin
    Cody avatar
    3360 posts

    Posted 14 Sep 2011 Link to this post

    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
  7. Dan
    Dan avatar
    10 posts
    Member since:
    Aug 2012

    Posted 14 Sep 2011 Link to this post

    Deleting the rows fixed it.
    Thanks Cody!
    Dan
  8. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 14 Sep 2011 Link to this post

    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
  9. John
    John avatar
    8 posts
    Member since:
    Jul 2012

    Posted 15 Sep 2011 Link to this post

    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
Back to Top