Forum Discussion
zen_paul
8 years agoOccasional Contributor
Whilst this is not an answer to the question, it is an alternative approach to using script assertions.
You might be able to create the Invalid Http Code assertion programatically with groovy
This is how we are creating some assertions, adding them to the test step before the test step executes and letting SoapUI do the clever assertion stuff.
def tStep = testRunner.getTestCase().getTestStepByName(stepName) def assertion // add assertions to the test step assertion = tStep.addAssertion("Contains") assertion.setName("hasCustomerAccountNumber") assertion.setToken("customerAccountNumber")
You would have to get hold of the setters for creating the Invalid Http Code assertion, but I found this easier than writing scripts assertions or another test step groovy script to manipulate the response.
Related Content
- 3 years ago
- 4 years ago
Recent Discussions
- 16 hours ago