Forum Discussion
KarelHusa
9 years agoSuper Contributor
The way to create Valid HTTP Status Codes assertion is similar to other types. You create a WsdlTestRequestStep as usual.
Then you add the assertion:
ValidHttpStatusCodesAssertion vhsa = step.addAssertion('Valid HTTP Status Codes')
Finally you need to configure the list of valid codes, and here it comes a bit tricky:
vhsa.setConfiguration(org.apache.xmlbeans.XmlObject.Factory.parse('<codes>200,202</codes>'))
I have not found a nicer way, but it works.