TestProject Forum

Can Get value from a CSV file automatically proceed to the next row if execution completed?

Hi all,

Can Get value from a CSV file automatically proceed to the next row in CSV during execution after the first row completed?

Thanks,

you can do it in several ways, here is one example

  1. create project parameter row_number with default value 0
  2. create a external test with desired steps until the CSV loop should start
  3. create internal test with 3 steps as bellow steps
    • Evaluate Mathematical Expression
    • Read CSV row
    • Type text (do something with the value, in this case type in textbox)
  4. call the internal test from external test
  5. in advanced settings on the test step, go to repeat option and adjust according to the number of rows
  6. add addtional step for row_number parameter reset

Internal test
image

External test (parent test)

image

let me know if it helps

Thanks, Mark! This is really helpful. I got the concept but I still need some help in understanding the meaning of the third step. Do we need to check if the row is increasing or changing? if we omit the third step then also will it work. Please elaborate more on the process of increasing rows.

Thanks

if you will omit the third step (set 0 to Row_number parameter) , this test will only run once.
the reason that the Row_number parameter will get value of 6 on the next run rather then starting from 0.
in short step number 3 preforming a clean-up reverting back the Row_number value to be 0 for the next run.

let me know if it helps

1 Like

Thanks, Mark! It worked!

Hi, can you please give me the detail screenshot of the STEP-3 of the External test (parent test)?

Also Step-1, Step- 2, Step-3 screenshot of Internal test