Forum Discussion

thesleepyvegan's avatar
thesleepyvegan
New Contributor
15 years ago

Inconsistency between soapUI and maven-soapui-plugin

Hi,

I am using soapUI 3.6 on my desktop, and the maven-soapui-plugin 3.5.1 in my build. In the desktop version, I have a script assertion that contains messageExchange.responseHeaders("someKey") that returns a java.util.ArrayList, typically containing one String. In my build, tests fail because messageExchange.responseHeaders("someKey") returns a string rather than a one-member List.

Just thought I'd report this. Below is the full script assertion I use, which passes in soapUI desktop and fails in the maven plugin

Thanks,

Ted

def corId = messageExchange.responseHeaders["CorrelationID"]
assert corId.equals(["some-redacted-guid-string"])
  • Hi Ted,

    sorry for this inconvenience; the messageExchange.responseHeaders["CorrelationID"] map now contains a StringList for each entry (instead of just a single string), so you will need to change your assertion to

    assert corId.contains(["some-redacted-guid-string"])

    Does that help!?

    regards!

    /Ole
    eviware.com