Forum Discussion

KarelHusa's avatar
KarelHusa
Champion Level 2
8 years ago

Releasing memory during intensive tests

I am running intensive tests of web services:

- consuming 100 services

- each service is tested by 100 XML requests.

 

There is a test suite for each service and a test case inside the testsuite. Inside the test case the requests are loaded from the file system and sent to the target service in a loop. The tearDown script of the test case writes down the results into a file, so I do not need to keep the results afterwards.

 

During the tests memory usage of SoapUI goes higher and higher, usually SoapUI gets stuck around 2.5 GB. The Xmx JVM parameter is set to 4GB. There are still 7 GB available in the system. The utilization of CPUs is low.

 

I have appended the following code to the tearDown script of the test cases:

 

 

testRunner.results.each {
        it.discard()
}

 

 

When I check the test steps in the log, they are discarded, so apparently the code does the job. However, I cannot see much impact on memory usage.

 

Do you have any advice what else to do to prevent SaopUI from choking? I have SoapUI 5.2.1 64bit, running on Windows 10 box.

 

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3

    Couple of questions for clarity:

     

    • Is it one wsdl with 100 services? Or Multiple wsdl files?
    • How many test cases in the project? And test suite count?
    • Project file size on the disc?
    • Are the tests running Sequential or Parallell? May be CPU intensive if Parallell, and shouldn't be much memory intensive. Just curious.

     

    If I am in the same situation, look for the following:

     

    • Split the project into multiple projects to reduce the size if possible. Of course, keep the related the related services together so that it allows to cover the functionality / feature / data flow across multiple services (integration / system tests).
    • Try to run garbage collection explicitly and see if that helps.
    • Use command-line utility, i.e., SOAPUI_HOME/bin/testrunner.bat(.sh),  to execute the tests instead of running thru UI.
    • KarelHusa's avatar
      KarelHusa
      Champion Level 2

      Rao, to your questions:

      • Each WSDL has a single operation in most cases, i.e. my test project has 100 WSDLs.
      • There are 300 test cases within project, 3 for each service.
      • Project file size is 12 MB.
      • The tests are now running sequentially (will execute them in paralell later on).

       

      I like executing the tests from UI, but maybe I will use command line for these bulk tests.

       

      • nmrao's avatar
        nmrao
        Champion Level 3
        Thank you KarelHusa for the details.

        And another thing while using UI is to keep close ununsed projects.

        UI can be used as any other IDE to develop design the tests and make sure they are working. Once it is done, command-line execution is the best way, helps to achieve automation / CI.

        Looking at your reply, it is possible to split into multiple sub projects.

        When a test suite is invoked in parallell mode, should be little cautious. Because, by default, soapui starts all the test cases at the same time, and that takes lot of system resources.