Contributions
IOException: Decompression of response failed when writing response of mockservice
Im using the soapuitestcaserunner to run some of my soapui tests. For that i use the following code: SoapUITestCaseRunner runner = new SoapUITestCaseRunner(); runner.setProjectFile("xml/" + arg1 + ".xml"); runner.getAssertionResults(); runner.setPrintReport(true); runner.run(); Now i also wanna test one of my mock requests that has the following assertion: def timestamp = System.currentTimeMillis() def directory = "SoapUi\\test" def requestFile = new File(directory, "request_${timestamp}.txt") requestFile.append( context.expand('${ConversionRate#Request}') ) def responseFile = new File(directory, "response_${timestamp}.txt") responseFile.append( context.expand('${ConversionRate#Response}') ) But when i try and run this test it generates the request file fine but the responseFile looks all weird and i get the following error in my logs: 16:35:32,683 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request 16:35:32,683 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /mockCurrencyConvertorSoap12 HTTP/1.1 16:35:32,693 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 200 OK 16:35:32,697 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely java.io.IOException: Decompression of response failed at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpMethodSupport.getResponseBody(HttpMethodSupport.java:264) at com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod.getResponseBody(ExtendedPostMethod.java:116) at com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpResponse.<init>(BaseHttpResponse.java:85) at com.eviware.soapui.impl.wsdl.submit.transports.http.SinglePartHttpResponse.<init>(SinglePartHttpResponse.java:44) at com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.WsdlSinglePartHttpResponse.<init>(WsdlSinglePartHttpResponse.java:37) at com.eviware.soapui.impl.wsdl.submit.filters.HttpPackagingResponseFilter.wsdlRequest(HttpPackagingResponseFilter.java:70) at com.eviware.soapui.impl.wsdl.submit.filters.HttpPackagingResponseFilter.afterAbstractHttpResponse(HttpPackagingResponseFilter.java:49) at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.afterRequest(AbstractRequestFilter.java:64) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:272) at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119) at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:79) at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:217) at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:364) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:211) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:138) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:46) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:128) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at org.apache.http.protocol.HttpCoreContext.getAttribute(HttpCoreContext.java:102) at org.apache.http.protocol.HttpCoreContext.getAttribute(HttpCoreContext.java:117) at org.apache.http.client.protocol.HttpClientContext.getRequestConfig(HttpClientContext.java:239) at org.apache.http.client.protocol.ResponseContentEncoding.process(ResponseContentEncoding.java:130) at com.eviware.soapui.impl.wsdl.support.CompressionSupport.decompress(CompressionSupport.java:86) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpMethodSupport.getResponseBody(HttpMethodSupport.java:262) When i run the mockservice from soapui itself it generates both files without issue with the correct content Can anyone help me figure out what the problem is?1.2KViews0likes2CommentsRe: SoapUITestCaseRunner NoClassDefFoundError soapui/config/SoapuiSettingsDocumentConfig$Factory
I'm still getting the same error when adding the SOAPUI_HOME/lib to my classpath. I asume you ment the home located at:C:\Program Files (x86)\SmartBear\SoapUI-5.3.0\lib It kind of looks like the Soapui-5.3.0.jar doesn't get picked up properly1.9KViews0likes0CommentsSoapUITestCaseRunner NoClassDefFoundError soapui/config/SoapuiSettingsDocumentConfig$Factory
I'm using the TestCaseRunner to test some imports i have made in SoapUI. This is done with java in an eclipse IDE. When i try and run the following code using mvn clean install I'm getting an error Code: SoapUITestCaseRunner runner = new SoapUITestCaseRunner(); runner.setProjectFile("myproject.xml"); runner.setPrintReport(true); runner.run(); Error: Starting ChromeDriver 2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41) on port 43077 Only local connections are allowed. log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. sep 06, 2017 9:35:50 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: OSS soapUI 4.0.1 TestCase Runner 09:35:51,311 WARN [SoapUI] Missing folder [C:\Programs\eclipse Neon\workspace\soapui-cucumber\.\ext] for external libraries @Soaptest Scenario Outline: Soap ui test costcenter # SoapTest.feature:18 Given run SoapUI project: "costcenter_import" # SoapDefinition.runSoapUIProject(String) java.lang.NoClassDefFoundError: com/eviware/soapui/config/SoapuiSettingsDocumentConfig$Factory at com.eviware.soapui.DefaultSoapUICore.initSettings(DefaultSoapUICore.java:211) at com.eviware.soapui.DefaultSoapUICore.init(DefaultSoapUICore.java:142) at com.eviware.soapui.DefaultSoapUICore.<init>(DefaultSoapUICore.java:132) at com.eviware.soapui.tools.AbstractSoapUIRunner.createSoapUICore(AbstractSoapUIRunner.java:178) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:146) at nl.esize.cucumber.stepdefinition.SoapDefinition.runSoapUIProject(SoapDefinition.java:75) at ?.Given run SoapUI project: "costcenter_import"(SoapTest.feature:5) Caused by: java.lang.ClassNotFoundException: com.eviware.soapui.config.SoapuiSettingsDocumentConfig$Factory at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at com.eviware.soapui.DefaultSoapUICore.initSettings(DefaultSoapUICore.java:211) at com.eviware.soapui.DefaultSoapUICore.init(DefaultSoapUICore.java:142) at com.eviware.soapui.DefaultSoapUICore.<init>(DefaultSoapUICore.java:132) at com.eviware.soapui.tools.AbstractSoapUIRunner.createSoapUICore(AbstractSoapUIRunner.java:178) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:146) at nl.esize.cucumber.stepdefinition.SoapDefinition.runSoapUIProject(SoapDefinition.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at cucumber.runtime.Utils$1.call(Utils.java:40) at cucumber.runtime.Timeout.timeout(Timeout.java:16) at cucumber.runtime.Utils.invoke(Utils.java:34) at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:38) at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37) at cucumber.runtime.Runtime.runStep(Runtime.java:300) at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44) at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39) at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44) at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.runtime.junit.ExamplesRunner.run(ExamplesRunner.java:59) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.runtime.junit.ScenarioOutlineRunner.run(ScenarioOutlineRunner.java:53) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.api.junit.Cucumber.run(Cucumber.java:100) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) I'm including the following jars: analytics-core-5.3.0.jar out-app-analytics-provider-5.3.0.jar soapui-5.3.0.jar The last one does seem to have the mentioned missing file but for some reason doesn't get picked up. I can also include my pom.xml if need be, hopefully someone can help me out.1.9KViews0likes3Comments