I want to get the value of the "Accept" Header from a SoapUI request. Then I want to store it in a TestCase property.
That is what I'm trying to do from a Groovy script TestStep:
//Get Accept Header from request (if Accept Header does not exist default to empty string)
def acceptHeader = context.testCase.getTestStepAt(0).testRequest.requestHeaders.get("Accept", "")
//Set Accept Header Value to current TestCase properties
testRunner.testCase.setPropertyValue("acceptHeaderSet", acceptHeader)
The first TestStep of the TestCase is a REST Request and the second TestStep is the mentioned script.
Each time that I run the TestCase the default value is set (it seems that it does not find any header)
Any idea about what is happening? Is this a bug in the SoapUI tool?
Thanks in advance.