Forum Discussion
15 years ago
It worked for me, too. But I want to make sure I understand how this is working. I had to change the string "Properties" to be the string name of the request in which I wanted to set the property. So are the first two parameters to the setPropertyValue() method actually requestName, then propertyName?
Also, what is "LTPA"? It works, but I don't know why. I was trying to set the Cookie HTTP Request Header parameter, and it worked, but I don't understand how I was supposed to know "LTPA" would do that.
Actually, I had expected that by checking the box for "Maintain HTTP Session" that none of this would be necessary. But checking that box did not cause the first response's 'Set-Cookie' value to be used in the second request's 'Cookie' attribute in the HTTP request header. Is that an incorrect assumption? if so, what does that checkbox do?
(I'm using an evaluation verions of SOAPUI Pro 3.5 Build dist-88-2010-03-02)
Thanks.
def cookie_vals = testRunner.testCase.getTestStepByName("Request1").httpRequest.response.responseHeaders["Set-Cookie"]
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
groovyUtils.setPropertyValue("Request2", "LTPA", cookie_vals.toString())
Also, what is "LTPA"? It works, but I don't know why. I was trying to set the Cookie HTTP Request Header parameter, and it worked, but I don't understand how I was supposed to know "LTPA" would do that.
Actually, I had expected that by checking the box for "Maintain HTTP Session" that none of this would be necessary. But checking that box did not cause the first response's 'Set-Cookie' value to be used in the second request's 'Cookie' attribute in the HTTP request header. Is that an incorrect assumption? if so, what does that checkbox do?
(I'm using an evaluation verions of SOAPUI Pro 3.5 Build dist-88-2010-03-02)
Thanks.
def cookie_vals = testRunner.testCase.getTestStepByName("Request1").httpRequest.response.responseHeaders["Set-Cookie"]
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
groovyUtils.setPropertyValue("Request2", "LTPA", cookie_vals.toString())
Related Content
- 10 months ago
- 5 years ago
Recent Discussions
- 15 years ago