Contributions
Re: Decompression of response failed
Hi Rao, When I run it within SoapUI it works perfectly. The error only shows up when running it programmatically. I narrow down the error to this: When calling it programmatically, instead of returning a string in JSON format it is returning a string with weird characters like this "�_o۶�� ��l@�XIܴ�;i�ũ{���D[D%R#�d�E��%�?". It looks like SoapUI is encrypting the response? Thank you, Andres Prato3.7KViews0likes1CommentDecompression of response failed
Hi I am getting this error when I try to run my suite programmatically. I did what I saw in another response, eliminating the httpcomponents dependency, but this didn't work for me. 017-06-02 11:47:54,545 [TestNGInvoker-setUpTestCase()] INFO com.eviware.soapui.impl.wsdl.WsdlProject - Loaded project from [file:/Users/andres.prato/Documents/Bitbucket/genesis-auto-tests/src/test/soapUIProjects/QRT-soapui-project.xml] 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.ExtendedGetMethod.getResponseBody(ExtendedGetMethod.java:154) 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.filters.HttpPackagingResponseFilter.httpRequest(HttpPackagingResponseFilter.java:81) at com.eviware.soapui.impl.wsdl.submit.filters.HttpPackagingResponseFilter.afterAbstractHttpResponse(HttpPackagingResponseFilter.java:52) 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:265) 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.rest.RestRequest.submit(RestRequest.java:192) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:794) 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:129) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:77) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:595) at virginpulse.restcontracts.representations.rewards.RewardCase.executeGetActivities(RewardCase.java:177) at virginpulse.restcontracts.representations.rewards.RewardCase.checkActivitiesListReturnRewardCount(RewardCase.java:186) at virginpulse.functionalTest.reward.engage.SelfEnteredValidatedMeasurementRewardsTest.setUpTestCase(SelfEnteredValidatedMeasurementRewardsTest.java:66) 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 org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86) at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:54) at org.testng.internal.InvokeMethodRunnable.run(InvokeMethodRunnable.java:44) 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:241) at org.apache.http.client.protocol.ResponseContentEncoding.process(ResponseContentEncoding.java:129) 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) ... 33 more Any Ideas?Solved3.7KViews0likes3CommentsRe: Load Test from java with WsdlLoadTest Class
Hi nmrao, I added a snippet of my class LoadTest. So, the issue is that when I create a loadTest with my class and then make it run, I have to make it run 3 times so that the REST endpoint uses unique ID's. As you can see I add a Groovy script as a TestStep to the TestCase, which is supposed to run before the REST endpoint so that the ID's are all unique. I managed to go around this and make it work, but I have to make the loadTest run two more times than it should. You can see in this if, I basically say if the limitType is Runs per Threads (which is what I need) add 2 to the testLimit. So, if i want to make it run one time, I have to actually run it 3 times to make the ID's unique. if (limitType == 3){ testLimit = testLimit + 2; } Thank you, and let me know if need any more information or to clear things up more! -Andres1.4KViews0likes0CommentsLoad Test from java with WsdlLoadTest Class
Hi, In my SoapUI I have my TestSuite with its TestCase. The TestCase has a REST endpoint as TestStep. The REST endpoint gets its unique values from the TestCase properties, as such, ${#TestCase#memberId}. In my java code, I create a LoadTest inside the TestCase. And then I create a Groovy script as a second TestStep, that when I run the LoadTest is supposed to run before the REST endpoint. This Groovy script gets memberId's from the Database and assigns the value to the TestCase property "memberId" so that when the REST endpoint is called it will get the memberId from there. So, when I run my LoadTest with limit type of runs per thread the Groovy script is notran but until the 3rd run. Since the script is not being run, the property "memberId" of the TestCase is not being changed and the REST endpoint is being called with an empty memberId, therefore returning a 404. In the 3rd run, the script does run and the REST endpoint is called with different "memberId's" for each thread or virtual user. Is there anyway I can force the LoadTest to run the Groovy script every time? I don't know why SoapUI is doing this, but there has to be a way to solve this. Thank you in advance!1.5KViews0likes2CommentsGet statistics graphs after LoadTest finishes in Java.
Hi, I am running a loadTest with Java and the Wsdl classes, is there a way I can get the statistics graphs exported after the test finishes running? Maybe in the tearDown script there is a way to do that? Thank you!8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes4CommentsRe: Creating Load Test using Wsdl classes in java project. Having each thread to be different
Hi Rao, Thank you so much for your help! Is this script a setUp script for the LoadTest or a script for the TestStep? Thank you again! Andres8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.8KViews0likes1CommentRe: Creating Load Test using Wsdl classes in java project. Having each thread to be different
Thanks for your response Rao. The thing is I have an array lets say with 100 memberIDs, those are the memberIDs I need to use, they can't just be random numbers. Inside my JSON I also have a groupID which is the group that memberID is part of. I also have another array with the groupIDs I need to use. Is there anyway to get every thread, and change the properties of the TestCase just before a thread ("user") is created for the Load Test? Thanks!8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.8KViews0likes3CommentsCreating Load Test using Wsdl classes in java project. Having each thread to be different
Hi, I am creating a Load Test using the com.eviware.soapui.impl.wsdl.loadtest.WsdlLoadTest class in my Java project. When I run the loadTest it works, and the endpoint does what it is supposed to do to a member. The thing is I need each thread to be a different member. Here I go into my TestSuite, and then into my testCase. I set the propertyValue of the testCase. WsdlTestSuite testSuite = testProject.getTestSuiteByName("Reward"); WsdlTestCase testCase = testSuite.getTestCaseByName("TriggerActivityReward"); testCase.setPropertyValue("memberId", "182996"); The testStep gets the data of the memberId from the testCase property "memberId". As such: "${#TestCase#memberId}" In the JSON of the POST rest endpoint. Then I setUp my loadTest. loadTest = testCase.addNewLoadTest("firstLoadTest"); loadTest.setThreadCount(5); loadTest.setLimitType(Enum.forInt(1)); loadTest.setTestLimit(1); I need each thread to have a different memberId every run. How could I achieve this? I have gone through the documentation of thecom.eviware.soapui.impl.wsdl.loadtest.WsdlLoadTest class, and I haven't found much. I also so something like context.ThreadIndex by adding a setUp groovy script to the loadTest. I tried that but didn't work. Any thoughts? Ideas? Thanks!Solved8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.8KViews0likes5Comments