naveen8944
9 years agoContributor
Need help in creating dynamic assertion
HI All I'm in the process of creating dynamic assertions using groovy in SoapUI(Not PRO). I 'm able to add the assertion using the following successfully def teststep = testRunner.testCase...
- 9 years ago
Found the solution after going through the API
def teststep = testRunner.testCase.getTestStepByName("TestStep_Name");
def xpathassertion = teststep.addAssertion("XPath Match") // Adds the assertion
xpathassertion.name = "xpath assertion" // This is name of the assertion
xpathassertion.setPath("path") // This is the Xpath Expression
xpathassertion.setExpectedContent("expected value") // As the title says..expected valueHappy Coding !!