Forum Discussion

emwillia's avatar
emwillia
Occasional Contributor
12 years ago

SoapUI Runner Question

How does this work? It appears that load UI has encapsulated the functionality of SoapUI within it in order to execute the test steps. However, there is clearly a disconnect between those two systems as I am able to execute a Selenium groovy script in SoapUI and not in LoadUI.

I have done the following steps:

1) Ensured that all external dependencies are included in the extension folder of LoadUI
2) Executed the script in SoapUI and verified the behavior.
3) Imported the same script into LoadUI using the SoapUI runner.
This step failed due to a class not found exception on org.apache.commons.httpclient.protocol.ProtocolSocketFactory. This class is included in the external dependency library and I have looked through the bin to ensure that there isn't a duplicate class.
4) Executed the groovy script using the script runner.
This step failed miserably, every execution of any script I've ever done gives me a "cannot bind on null object" exception.
5) Executed the SoapUI Script using IEDriver/FirefoxDriver implementations of webdriver
These worked, however I need it to be HtmlUnit so I can do it without GUI soaking up CPU/RAM usage.

There is clearly something with the classpath where the jar is not being loaded into the same classpath that the soapUI runner is using. Has anybody worked with HtmlUnit in LoadUI? Figured out classpathing issues similar to this? Any help would be greatly appreciated!

1 Reply

  • emwillia's avatar
    emwillia
    Occasional Contributor
    Update:

    I added an import statement for the missing class and expected it to throw an error on the import statement. One would imagine that if it is not in the class path that it would not find it and error out here, yes?

    Yet the error occurs in the same location that it did prior to the import. Something is fishy here and I can't figure it out! The following is the error stack trace. As you can see it appears to be an felix classpath problem, which I am clueless on


    java.lang.NoClassDefFoundError: org/apache/commons/httpclient/protocol/ProtocolSocketFactory
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.newWebClient(HtmlUnitDriver.java:285)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.createWebClient(HtmlUnitDriver.java:259)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.<init>(HtmlUnitDriver.java:130)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.<init>(HtmlUnitDriver.java:186)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
    at Script1.run(Script1.groovy:14)
    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:238)
    at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48)
    at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:147)
    at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:42)
    at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
    at com.eviware.loadui.components.soapui.SoapUISamplerComponent$SoapUITestCaseRunner.run(SoapUISamplerComponent.java:717)
    at com.eviware.loadui.components.soapui.SoapUISamplerComponent.sample(SoapUISamplerComponent.java:559)
    at com.eviware.loadui.impl.component.categories.RunnerBase.doSample(RunnerBase.java:507)
    at com.eviware.loadui.impl.component.categories.RunnerBase.access$700(RunnerBase.java:68)
    at com.eviware.loadui.impl.component.categories.RunnerBase$Worker.run(RunnerBase.java:774)
    at com.eviware.loadui.util.dispatch.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:197)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.protocol.ProtocolSocketFactory not found by com.eviware.loadui.soapui-plugin [27]
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 29 more