trying to set the name of a script assertion using groovy
I have some groovy code which sets the assertions on a soap test case step to run tests in our automation framework, but for some reason when I try and create a 'Script Assertion' it does not seem to be taking the name correctly. I am hoping I've made a simple mistake and someone can point me in the right direction.
Using SoapUI 5.2.1, - Build Date: 20151002-1138
I have this code running in Groovy for the Test Case.
This block of code runs correctly adding the assertion to the testcase (teststep) and running.
assertion = tStep.addAssertion("Contains") assertion.setName("hasBillingType") assertion.setToken("billingType")
This block of code does not work in the same way, as though the setName is not assigning the name to the Script Assertion, instead it opens the interaction window to add the assertion name. This is not helpful as I want to run this using Maven and Jenkins, once its developed.
assertion = tStep.addAssertion("Script Assertion") assertion.setName("testScriptAssertion") assertion.setScriptText("log.info 'we are running the script assertion'\n log.inf
Any help greatly appreciated.