Forum Discussion

srahul101082's avatar
srahul101082
Occasional Contributor
11 years ago

An error occurred [No such property: RGS for class: Script1]

Hello,

I am having a test suite which basically performs validation on Restfull webservices, for request parameters I have to use java classes , which I have bundled as jar file and placed at “C:\Program Files\SmartBear\soapUI-Pro-4.6.0\bin\ext”. Now when I run my test from command line or from soapUI directly it works good.
However on running the same as maven install, I see following error


[INFO] --- soapui-pro-maven-plugin:4.6.1:test (soap-webservice-test) @ NCube_Regression_TestSuite ---
SoapUI Pro 4.6.1 Maven2 TestCase Runner
12:24:24,331 WARN [SoapUI] Missing folder [C:\res_test_maven\NCube_Regression_TestSuite\.\ext] for external libraries
12:24:24,508 INFO [DefaultSoapUICore] initialized soapui-settings from [C:\Users\singhrah\soapui-settings.xml]
12:24:24,662 INFO [SoapUIProGroovyScriptEngineFactory] Setting Script Library to [C:\Program Files\SmartBear\soapUI-Pro-4.6.0\bin\scripts]
12:24:25,130 INFO [WsdlProject] Loaded project from [file:/C:/res_test_maven/NCube_Regression_TestSuite/NCube-AccountService-Regression-soapui-project.xml]
12:24:25,224 INFO [SoapUIProGroovyScriptEngineFactory] Setting Script Library to [C:\Program Files\SmartBear\soapUI-Pro-4.6.0\bin\scripts]
12:24:25,537 INFO [SoapUIProTestCaseRunner] Running SoapUI tests in project [NCube_AccountService_Regression]
12:24:25,539 INFO [SoapUIProTestCaseRunner] Running Project [NCube_AccountService_Regression], runType = SEQUENTIAL
12:24:25,548 INFO [SoapUIProTestCaseRunner] Running SoapUI testcase [CreateBet TestCase]
12:24:25,554 INFO [SoapUIProTestCaseRunner] running step [Groovy Script]
12:24:25,957 INFO [WsdlProject] Loaded project from [file:/C:/Users/singhrah/Desktop/NCube-AccountService-Regression-soapui-project.xml]
12:24:25,961 INFO [SoapUIProGroovyScriptEngineFactory] Setting Script Library to [C:\Program Files\SmartBear\soapUI-Pro-4.6.0\bin\scripts]
12:24:25,987 ERROR [SoapUI] An error occurred [No such property: RGS_WebSession for class: Script1], see error log for details
groovy.lang.MissingPropertyException: No such property: RGS_WebSession for class: Script1
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
at Script1.run(Script1.groovy:18)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96)
at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:89)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:149)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:148)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:43)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
12:24:25,993 ERROR [SoapUIProTestCaseRunner] Groovy Script failed, exporting to [C:\res_test_maven\NCube_Regression_TestSuite\NCube_AccountService_regression_TestSuite-CreateBet_TestCase-Groovy_Script-0-FAILED.txt]
12:24:25,994 INFO [SoapUIProTestCaseRunner] Finished running SoapUI testcase [CreateBet TestCase], time taken: 433ms, status: FAILED
12:24:25,995 INFO [SoapUIProTestCaseRunner] Project [NCube_AccountService_Regression] finished with status [FAILED] in 454ms
[ERROR] java.lang.Exception: TestCase [CreateBet TestCase] failed without assertions

2 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Based off the log file you have shown, maven plugin maybe looking for the libraries in C:\res_test_maven\NCube_Regression_TestSuite\.\ext.

    Can you check if that exists and try copying your jar file in there?




    Regards,
    Marcus
    SmartBear Support
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Hi,
    srahul101082 you can also configure the maven plugin to use the ext directory from your soapui installation

      <soapuiProperties>
    <property>
    <name>soapui.ext.libraries</name>
    <value><soapui_installation_directory>/bin/ext</value>
    </property>
    </soapuiProperties>


    Alternatively, if your jar is available as a maven artifact you can add it as a dependency of the plugin.
    See the plugin documentation http://www.soapui.org/Test-Automation/m ... ll-example. The example shows how to add the mysql jdbc driver