I have a scenario where api uploads a document, can simply create duplicate request but don’t want that like in the image
@bionel any leads pls
Want to execute the same request 4 times with different file types each.
How can execute it in Test suite with different file set
String ACCESS_TOKEN = WebUI.callTestCase(findTestCase('API_Testing/AccessTokenGeneration'), [:], FailureHandling.CONTINUE_ON_FAILURE)
def request = ((findTestObject('Object Repository/Upload Document')) as RequestObject)
'Create new ArrayList'
ArrayList<TestObjectProperty> HTTPHeader = new ArrayList<TestObjectProperty>()
HTTPHeader.add(new TestObjectProperty('Authorization', ConditionType.EQUALS, 'Bearer' + ACCESS_TOKEN))
request.setHttpHeaderProperties(HTTPHeader)
response = WS.sendRequest(findTestObject('Upload Document', [('RESOURCE_PREFIX') : GlobalVariable.RESOURCE_PREFIX
, ('ACCESS_TOKEN') : GlobalVariable.ACCESS_TOKEN, ('ID') : GlobalVariable.ID]))
WS.verifyResponseStatusCode(response, 200)