TestProject Forum

Running selected rows from CSV

How can i run selected test data rows from CSV?

I have generated 10 rows of test data in csv. During execution, I want the system to select only a few test rows as 1,3, 4 only out of 10 rows.
Is there a way to do this in TestProject?

I have created a parameter Selection (Y/N) for each row and added values for Selection as Y to 1, 3 and 4th rows and marked the Other rows as N. I have then added a condition to the test to add only rows with Selection marked as Y. Is there any other way to execute multiple test cases using csv.

Hello @sharpat8
The most recommended method of using a CSV file is as a data source (Data-Driven Testing)
Using data drive testing with multiple Parameters is a simple way to change values.

Once you create the test you can download the data source template and put all the values there:

then upload to the Data Sources:

You can use it both in the tests and in jobs as well.

You can see here video how to do that as well:

In your case, if you want to use only specific rows, this method will be less preferable since this method above will use all the rows in the CSV file.
You can use Get value from a CSV file using specific row and column action:

Update a value in the output parameter so you can use it in your condition or in any other field you choose.
Let me know if it helped you.

Thanks for the prompt reply and for sharing the video. I am using the same data-driven approach. I also tried to use the get value from CSV file and output parameters but it is not working as expected. Please share how to define and call output parameters.

Do we have to use this parameter at the project level or test level?
Here is how I used:
1- I have added column one as Flag and set value Y or N.
2- There are 10 rows in CSV file and Flag is set N for 9 but Y for the first row only.
3- My script is calling Login and create users script within the script.
4- I have created Get value from csv test step and added condition if Flag is Y execute the step. I set Col 1 and Row 2. I am assuming that it will automatically check all the row one by one.

Please let me know if this is not the correct way to do this as I still cant execute Flag Y rows only.