Forum Discussion

nmrao's avatar
Champion Level 3
9 years ago

Property, which is passed using -P to testrunner, is not available in afterLoadScript

Noticing the following behaviour while testing the options of testrunner (both SoapUI  NG / Open Source Edition).


Running a project using testrunner with -P<PropertyNamve>=<Value> option and reading this property in afterLoadScript of the project. It says property value is null which is not possibly expected (In My Opinion), could be a (latent) defect? Can it be confirmed if this understanding is correct? If it is a defect, then it can be addressed.


My understanding is that, the property passed to testrunner should be set during the loading of the project and the property made available in afterLoadScript


This is all the project is which contians just an assertion in afterLoadScript


<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project activeEnvironment="Default" name="testParams" soapui-version="4.5.1" xmlns:con=""><con:settings/><con:properties/><con:afterLoadScript>assert project.getPropertyValue('STABILITY_RBD_DATE'), "STABILITY_RBD_DATE Value is empty or null"</con:afterLoadScript><con:wssContainer/><con:sensitiveInformation/></con:soapui-project>


09:04:04,416 ERROR [SoapUITestCaseRunner] java.lang.AssertionError: STABILITY_RBD_DATE Value is empty or null. Expression: project.getPropertyValue(STABILITY_RBD_DATE)
09:04:04,416 ERROR [SoapUI] An error occured [STABILITY_RBD_DATE Value is empty or null. Expression: project.getPropertyValue(STABILITY_RBD_DATE)], see error log for detail
java.lang.AssertionError: STABILITY_RBD_DATE Value is empty or null. Expression: project.getPropertyValue(STABILITY_RBD_DATE)
        at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(
        at com.eviware.soapui.impl.wsdl.WsdlProject.runAfterLoadScript(
        at com.eviware.soapui.impl.wsdl.WsdlProject.afterLoad(
        at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(
        at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(
        at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(
        at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(

6 Replies

  • TanyaYatskovska's avatar
    SmartBear Alumni (Retired)

    Hi Rao,


    Thanks for reporting this.

    I've passed this behavior to our R&D Team. Could you please confirm that you see the same issue in Ready! API 1.6?

    • nmrao's avatar
      Champion Level 3

      Thank you Tanya for taking it to R&D team.

      Not checked on 1.6. However, as mentioned earlier, it appears that it is a latent defect(if this is accepted as defect by R&D), since it is not working SoapUI OS 4.x and Ready API 1.5, so I would expect that very few chances that it could work in 1.6 too.

      • JKambli's avatar

        Yes you are right the bug SOAP-3704 is not resolved as yet, but good news is team is working on this issue and should be fixed in upcoming release.