Passing CSV data into a text field and iterate each run

Hi - I have a user creation test case that requires a unique username and password to complete.

I have created a CSV file that has a long list of unique usernames and password respectively.

I am trying to pull ONE set of data per each test execution and then iterate to the next line upon the next execution.

I assumed I could use the ‘Get value from a CSV file using specific row and column’ addon but I cannot get it functioning as expected.

Any advice on how to pull this information and only pull one dataset at a time instead of all lines in the CSV? As well as how to iterate to the next dataset line on the next execution?

Thanks to all in advance!

Hi @CassiereJ.

You can create a Data-Driven test to achieve that.

Take a look on this example:

  • I will create a parameter that will hold a string to type into the location search.
  • The parameter must be set as input so by that way it can be changeable according to the values I want to set from my data source.

Then, I set in my step the parameter and I will save & exit from the recorder mode.

After that, I will Download the data source template from my test:

  • Now I will set the relevant locations name in my template CSV

**** Please check that each parameter that was named as input parameter written exactly as you named it inside the test.**

**** We recommend not to create by yourself the CSV template and download the CSV template from your requested test.**

  • Then I will upload it to the Data Sources: Go To Data Source → Click on + New Data Source → Drop your update CSV → Click on Creat

Now you can run your data-driven from your test or with your job.

That’s it; the test is ready to be executed. Simply adapt the loop to your needs.:smiley:

1 Like