TestProject Forum

Called test scripts read data from the first row

Hi all,

I am trying to read data from csv file and execute test scripts based on the conditions. Here are the steps:

  1. Created the main test script that calls several different scripts.
  2. Within the Main script before calling other tests, I evaluate the csv row number and returns a value (it displays the value from the csv first row as expected)
  3. Then I read data from csv first column and 1 row and save it to the output parameter.
  4. I called all the test cases if the condition is true based on the output parameter returned by csv file.
  5. The problem is even though it is returning data from 3rd row as expected but when executing the called test scripts it is starting from the first row only.

Is there a way I can tell the test script to execute only certain rows marked as Yes and skip other rows from csv.

I appreciate your help.


A much simpler solution would be to include these true/false values on your CSV file that you upload to TestProject as a data source, then by default, once you use this data-source to run your tests, you will have the data about which sub-tests the main test should execute, look at this for example:

This is my main test:


These are my parameters:


These are the conditions on the sub-tests:


And this is the second sub-test


and this is the data source Iā€™m using:


As you can see I can determine which subtest will run on each iteration. (all none, some)

Let me know if that helps you.

Thanks, Amit for your prompt reply. This is really helpful. So, basically, If you have 10 test data rows then your test will execute 10 times and will skip the steps. Is that correct?

Thanks for explaining!

Yes, correct,
each row under the parameters names row (1st) will result in an aditional iteration of the test.

1 Like