I am trying to verify assertion for success case but I got stuck when using scenario outline for one user with the same address but a different type. each url update with be different address id to update so I have to use address id
I have code like this
Scenario Outline: Driver address is updated successfully with <testcase>
And api request from file "/sharedConfigs/oauth2Token.json" is performed
When api request from file "${apiConfigFolder}/requests/updateDriverAddress.json" is performed
Then item "lastRun.status" is equal to 200
And set "addressQuery" to file "${apiConfigFolder}/inputData/addressQuery.txt"
And set "expectedAddressInfo" to file "${apiConfigFolder}/inputData/addressUpdate.json"
And set "directory" to "${directory}/sharedConfigs/"
And mysql query from string "${addressQuery}" is run
# Run failed from this line, because lastRun[0] is only correct with addressId_0 not for 1 and 2 how can I verify for 1, 2 addressId
And "${lastRun[0]}" is equal to "${expectedAddressInfo}"
Examples:
| userId | addressId | city | country | county | houseNameOrNumber | line1 | line2 | postcode | state | subPostcode | type | testcase |
| ${userId} | ${addressId_1} | "${cityUpdate}" | "${countryUpdate}" | "${countyUpdate}" | "${houseNameOrNumberUpdate}" | "${line1Update}" | "${line2Update}" | "${postcodeUpdate}" | "${stateUpdate}" | "${subPostcodeUpdate}" | ${typeHome} | type is DRIVER_HOME |
| ${userId} | ${addressId_2} | "${cityUpdate}" | "${countryUpdate}" | "${countyUpdate}" | "${houseNameOrNumberUpdate}" | "${line1Update}" | "${line2Update}" | "${postcodeUpdate}" | "${stateUpdate}" | "${subPostcodeUpdate}" | ${typeOther} | type is DRIVER_OTHER |
| ${userId} | ${addressId_3} | "${cityUpdate}" | "${countryUpdate}" | "${countyUpdate}" | "${houseNameOrNumberUpdate}" | "${line1Update}" | "${line2Update}" | "${postcodeUpdate}" | "${stateUpdate}" | "${subPostcodeUpdate}" | ${typeWork} | type is DRIVER_WORK |
As you can see above in this line I have verified assertion for each row And "${lastRun[0]}" is equal to "${expectedAddressInfo}"
But with that in the scenario from lines 2 and 3 will be run failed. How can I verify for all rows that, all information is already updated as I expected? Please help me with this problem
Thank you so much