Forum Discussion

lhuffstetler's avatar
lhuffstetler
Occasional Contributor
7 years ago

Trying to load multiple rows into datasource but it is only reading 1

I have an excel file with 76k rows, 1 column and am trying to load it into a data source but the datasource is only looking at the first row. 

 

I am running a GET call via the API and in my string it is only pulling in the first number from the datasource instead of reading through all of them as it would if i was using the random data generator. 

 

Can can I get the DataSource to read through all of the numbers in the excel file I am loading?

 

Thanks.

4 Replies

  • You need to use the DataSource Loop test step after your GET request to pull more data from the datasource.

    Here is a tutorial for using Excel files as data source.

    • lhuffstetler's avatar
      lhuffstetler
      Occasional Contributor

      Thank you for the quick reply.  I currently have a Datasource Loop set up pointed to the DataSouce.  It does loop through but pulls only the first row.  I'm not sure if i have configured the settings in the Datasource correctly.  I have attached some screenshots of the current setup.  

       

      Thank you

       

      • IgorG's avatar
        IgorG
        Staff

        The data source setup seems ok, so i am not sure what causes the issue. Here are some things i could think of:

        • There might be an empty line that causes to skip the loop (try disabling Skip Loop on Empty option)
        • The request might fail and stop the test run (go to test case options and disable Abort on Error option)
        • The data source loop might point to an incorrect test step (make sure the Target Step is set to REST Request 2)

        Finally, if all else fails, you can contact our support team and have them look at the project. There is usually some simple issue which is easy enough to fix.