Contributions
Re: Running out of memory
1. 1.4MB 2. Max internal threads: 1000, Max internal thread queue size: 10 000, SoapUI Runner -> Max concur. req: 1000, Max queue size: 1000 3. Fixed rate 200 / Sec, Time limit: 300 seconds 4. No delay 5. Windows Server 2008 R211 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews0likes0CommentsRunning out of memory
Hi, I have a very simple upload file test, but the problem is that when I run it through LoadUI for about 100 req/sec JVM heap and perm size increase very quickly and LoadUI soon runs out of memory. I have increased max heap size and the maxpermsize to few GB but the problem is still there and this seems like a way too much memory consumption for such a simple test and a script. I was thinking of opening this topic inside the LoadUI section put I suspect that the problem is with the upload script which maybe causes some memory leaks: testFile = new File(testRunner.testCase.testSuite.project.getPath()) resourceDir = new File(testFile.getParentFile(), "testdata") myFile = new File(resourceDir,"avi_test_file.avi") // get request def request = testRunner.testCase.getTestStepByName("UPLOAD - Chunk Upload").testRequest // clear existing attachments for( a in request.attachments ) { request.removeAttachment( a ) } testRunner.testCase.testSteps["UPLOAD - Chunk Upload"].getHttpRequest().attachFile(myFile, true) Am I doing something wrong here? Should I explicitly dispose file objects at the end of the script, would that help? File attachment is not big, approx. 1MB. Thank you all for your answers. Kind regards11 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.6KViews0likes7Comments- 1KViews0likes0Comments
Attaching part of the file
Hi, If someone could help me or has some kind of advice I would very appreciate it. I need to create test request for REST service that uploads a file. File size can be large and in that case file is split into few chunks and upload REST service needs to be called few consecutive times. After splitting file, file chunks are represented as an byte arrays. Is there a way to attach byte array into REST test request? I know that it is possible to attach file with "attachFile()" method that takes file an an argument. So currently my Groovy script looks like this: def outputFile = null def request = testRunner.testCase.getTestStepByName("Upload test request").testRequest def tmpOutputFile = new File(outputFilePath).withOutputStream { it.write bytes // bytes is an byte array that contains file chunk } outputFile = new File (outputFilePath); def attachment = request.attachFile(outputFile, true) Is there a simpler way of doing this that does not include creation of the temporary file out of the byte array? Thank you in advance for your answers.1.6KViews0likes3CommentsRe: How to assign a value to a variable in the Request JSON body
Never mind. I found a solution. It could be a potential SoapUI bug that it was not showing the request JSON body from the correct request. It was always picking the GET request although I had explicitly selected the POST request from the drop-down. After I deleted the GET request, it started showing the JSON body when added to a TestCase. Then, I could simply use the Groovy Script to generate the unique email address every time.12 years agoPlace ReadyAPI QuestionsReadyAPI Questions903Views0likes0CommentsHow to assign a value to a variable in the Request JSON body
I have come to a situation where I need to assign a unique value to an email 'field' REST Request JSON body. I am supposing I will need to write a script to do so but how? Here's how my json body looks like: { "first_name": "testLoadFirstName", "last_name": "testLoadLastName", "username": "testloaduser6@merc.com", "email": "testloaduser6@merc.com", "password": "WnBaUEFlVk82VktnU2k2QG1lcmN1cnliZXRhLmNvbQ==", "tos_agree": "true", "device_id": "loadDeviceId1", "device_user_agent": "loadTestUserAgent1", "device_name": "loadTestDeviceName" } The value for the email can be something like this: java.util.UUID.randomUUID() + '@merc.com' Any help will be highly appreciated. Please let me know if you need any further info. Thanks in advance!12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews0likes2Comments