ReadyAPI 4.1.0 issues with groovy "assert" statements
I have already opened a support ticket, but I wanted to see if anyone else is running into this issue. With ReadyAPI, a vast majority of our tests use groovy scripts to validate the data returned by a service matches the query made.
Inside of these scripts, we usually have a simple assertion statement to verify that each individual object return matches the query. Something like a simple:
assert variableName = "Expected Value", "Data does not match. Investigate"
That statement has always worked for us from when I started using of SoapUI NG Pro over a decade ago, up and through at least ReadyAPI 3.66.
My team is trying to migrate to ReadyAPI 4.X, and I'm trialing the new versions to prepare my team. I just installed ReadyAPI 4.1.0 during some brief downtime, and found a problem. The statement above? It works if the assertion is actually true.
If the assertion fails? Instead of a clean failure with the message indicated, we now get an actual error and a stack-trace because ReadyAPI can no longer handle this.
Error is as seen below.
Fri Aug 14 12:32:03 UTC 2026: ERROR: An error occurred in the script of the Groovy Script test step [test]:
Fri Aug 14 12:32:03 UTC 2026: ERROR: java.lang.ClassCastException: class java.lang.AssertionError cannot be cast to class java.lang.Exception (java.lang.AssertionError and java.lang.Exception are in module java.base of loader 'bootstrap')
java.lang.ClassCastException: class java.lang.AssertionError cannot be cast to class java.lang.Exception (java.lang.AssertionError and java.lang.Exception are in module java.base of loader 'bootstrap')
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.runAndGetResult(SoapUIGroovyScriptEngine.java:137)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:110)
at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:99)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:156)
at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction.lambda$0(GroovyScriptStepDesktopPanel.java:364)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
The problem is now hundreds, if not thousands, of tests are effectively broken. If anyone has seen something like this, or has ideas, I am all ears. I'm hoping Support can help too.