Forum Discussion

Shivani1's avatar
Shivani1
Occasional Contributor
7 years ago

DataSource loop over Request and Response Excel

Hi,

 

I tried the below mentioned solution for testing my REST web services with Request and Response Excel sheets placed in same Workbook

Data Source 1
Test Request
Data Source Loop 1 (Datasource: Data Source 1, Target: Test Request)
Data Source 2
Test Request Copy
Data Source Loop 2 (Datasource: Data Source 2, Target: Test Request Copy)

 

DataSource 1 which is Request data imported from Excel sheet 1 gets loop over and hit consecutively.

But, when we reach at DataSource 2 and try to loop over with Response data ,we found that we are only having last run of the test request data .Hence, I am not able to verify all my actual responses against Expected responses(which is in DataSource 2 and looped over).

 

I tried achieving from my test case as –

  1. Fetch data from Request Data put it in the  RESTRequest one row per run ,hit that
  2. Verify the response of each run against expected data saved in ResponseData using Groovy.

 

 

Kindly help with the problem.

 

Regards

Shivani

  • Nastya_Khovrina's avatar
    Nastya_Khovrina
    SmartBear Alumni (Retired)

    Hi Shivani, 

     

    I don't see any error in the configuration based on the screenshot. But, I cannot tell for sure without your project.

     

    Do you see any errors in the logs? 

    Is the "Abort test if an error occurs" option enabled for your testcase? 

    How many items do you get in the ReaponseData Datasource, only one?