Forum Discussion

Tonya's avatar
Tonya
New Contributor
8 years ago

How to read more than one value from the DataSource?

Hi,

 

I need to retrieve 2 values from excel DataSource for each test run.

 

I created excel document with 2 spreadsheets and want to use two DataSource properties (each should be getting data from different spread sheets). However when I change Configuration->Worksheet name (or the File Name) for one property it automatically sets the same name for the other property. So it sets same data for both properties while I need it to be different, from different Excel tabs.

How can I read more than one value from the DataSource?

 

Thanks,

Tonya

2 Replies

  • SmartBearAmber's avatar
    SmartBearAmber
    SmartBear Alumni (Retired)

    Hello Tonya,

     

    To read from two separate sheets, you'll need to create two separate DataSource Test Steps.

    • Tonya's avatar
      Tonya
      New Contributor

      Actually I need to use both values in one test step. Found simple solution - put second set of values in a column next to the first, in the same sheet. Then it picked it up automatically. Problem solved.

       

      When I tried to put second set of values in a separate document or another worksheet and used two DataSource Test Steps, I could not get a pair of values for one test step. Whenever I put DataSource Loop the test would not go further.

       

      Thanks,

      Tonya