Forum Discussion

cykociv's avatar
cykociv
New Contributor
11 years ago

Data Driven Testing Over A Period of Time

 I would like to only burn one line in my spreadsheet each time the suite is run. Is that possible? I'm having a problem locating how to do this.

4 Replies

  • vincent_goude's avatar
    vincent_goude
    Occasional Contributor
    You can do this either by using DataDrivenLoop with If...Then structure and Go To Label or by scripting.

    First solution:

     1-Do as usual your DataDrivenLoop

     2-use a If...Then Structure to check if a line is not burned.

     3-If so run your treatment, change a column in you Spreadsheet to mark the line as burned

    4-Then Go To Label out of the loop once you've done one treatment.

    Second solution:

    Instead use variable and DataTable function like <DBTables>.Values(aRowaColumn) to get to a specified line, do your treatment and burn/mark the line as used.

  • karkadil's avatar
    karkadil
    Valued Contributor
    No, it is not possible. You have to open the file each time and read the content in a loop until you reach the necessary row.
  • Stu's avatar
    Stu
    New Contributor
    You could run a short script just to loop around the spreadsheet, select the necessary row, and pass that row as a parameter into your main script.



    Stu