I am testing API's for my application & each API has multiple parameters to be passed, ex. below:
https://abc.xyz.com/***.svc/restful/GetSummary?FromDate=2019/06/28&ToDate=2019/06/28&CompAreaId=15&RegId=4
Each parameter in the request has multiple values (within a defined set of values), so if I want to parameterize each parameter with all the values it could possibly have, how can I create a scenario that will help me achieve this?
I would appreciate any hints/views.
I have been passing parameters as shown in the code below, but unable to pull off the scenario above mentioned, it would be time-consuming & repetitive to pass parameters in a separate scenario each time.
Scenario: Verify if GetContext API returns data with params
Given path 'GetContext'
And param FromDate = '2019/06/27'
And param ToDate = '2019/06/27'
And param CompAreaId = 20
And param RegId = 4
When method get
Then status 200
* def res = response
* print 'response:', response