Forum Discussion

amarnath1234's avatar
amarnath1234
Contributor
7 years ago
Solved

HTML report issue.

I want to capture test information of Test cases,for that i designed script and able to print all test steps information for the corrosponding Test Case.now when tried to extend the script for method,statuscode and EndpointURL ,Igot 1 error which I am unable to fix.Please help.

attached error detail for references.

script detail:-

def testStepName
def method
def statusCode
def endpointURL

testCase.testStepList.each{
testStepName = it.name
method = it.getHttpRequest().getResponse().getMethod()
statusCode = it.testRequest.response.responseHeaders["#status#"][0]
endpointURL = it.getHttpRequest().getResponse().getURL()

log.info testStepName
log.info method
log.info statusCode
log.info endpointURL
}