SoapUI addAssertion brings Rename Assertion name dialog

293 Views Asked by At

I have a script in groovy and I am trying to run through a loop to add additional assertions based, but I get the follow prompt:

enter image description here

Here is the code:

for( counter1 in 0..addlAssertCount-1) // for loop read from AdditonalAssertion field in csv
{

    def containsAssertion = testRunner.testCase.testSteps["Verify_FI_Enrollment_All_Scenarios"].addAssertion("Contains")
    containsAssertion.setToken(addlAssert[counter1])    
    containsAssertion.setName("your_required_name_contains")
}               

I get "Rename Assertion" dialog and scripts halts there. How the dialog can be suppressed so script can execute without any manual intervention.

1

There are 1 best solutions below

0
On

This happens when the default name "Contains" is already taken by an existing assertion.