Forum Discussion

pdenize's avatar
pdenize
New Contributor
15 years ago

Writing the "Contains" assertion as a Groovy Script

The soap request can have a number of assumptions. One is "Contains" where it checks the response contains some string value.

In order to manage this a little more I needed to write the equivilent in Groovy script I could execute after the call. However, I found it difficult to obtain the xml (unmodified in some way). And then converted into a string that I could check for the substring (regular expressions just seemed to dangerous as the substring often contained special regex characters).

Has anyone written a simple set of instructions that matches the "Contains" assumption?
No RepliesBe the first to reply