cancel
Showing results for 
Search instead for 
Did you mean: 

DataSource loop over Request and Response Excel

Highlighted
Occasional Contributor

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

1 REPLY 1
Highlighted
Moderator

Re: DataSource loop over Request and Response Excel

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?


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to change request body before sending it to the server for the TechCorner tag!


Scripts created in June:
- A script to generate a request body based on data from Datasource
- A script to go through all response nodes and check the value of the required field
- A Dispatching script to get responses based on the values in Request Body
- A script to add a new tag and assign it to all TestCases in a TestSuite