SoapUI Groovy Script that sets a test case property not reflected in LoadUI

I am using LoadUI 2.6.8 and SoapUI 5.0.

I was able to pass Property Transfers to Test Case properties that are successfully passed between SoapUI Runners in LoadUI as described here: http://www.loadui.org/soapui-integration/passing-along-testcase-properties.html

The problem I am running into is that one of the properties that I set via Groovy Script is like this:

def tc = testRunner.testCase.testSuite.getTestCaseByName("Auth and Start Up")
tc.setPropertyValue("Cookie","$jsesid")

      

is not updated in LoadUI (when Groovy Script runs) and therefore does not run as expected.

I need to use Groovy Script because the cookie comes in as part of the response header and the normal property passing step prevents me from doing the transfer.

Has anyone encountered this before? Any insight as to why this is happening? Thank!

UPDATE: I was able to work around this issue by updating the Authentication API response to include cookies as part of the response body (not just the header) and thus I was able to use the Transfer Ownership Step which seems to work. This is still a workaround.

+3


source to share


1 answer


Thanks for the SiKing link, I think I actually ran into this while trying to figure out the cookies I ended up able to get by manually setting the headers using a script. To check if there was a problem with the cookie, I used a different property. I added the following line to my groovy script:

tc.setPropertyValue("testprop","blah")

      



ran it in SoapUI and the property value is set ok. Then I changed the value of the "testprop" testprop property in the SoapUI test case to "a" manually and saved the project.

In LoadUI, I ran the SoapUI Runer and the output for this property appears as "a", although the groovy script works fine. The more I play with it, the more I think this is some kind of bug in LoadUI :(

0


source







All Articles