Announcement Announcement Module
Collapse
No announcement yet.
Load/Performance test and Spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Load/Performance test and Spring

    I'm sure many of you might have used some kind of load/performance tools in your project.

    Our team is evaluating these tools for our Spring/Hibernate based application which is NOT A WEB APPLICATION.

    We have short listed jMeter, Grinder and jUnitPerf. Each has it's own pros and cons.

    Could someone please share your experience? Which tool(s) did you use? I've the following requirements:

    1. command line interface so that i can automate these test as part of my nightly builds.

    2. Graphical output report

    3. JUnit support (Nice to have)

    4. Good statistics in the output report.

    5. To be able to simulate concurrent users.

    6. Stress test my application


    I would greatly appreciate any input on this.

    Thanks in advance!

  • #2
    I would probably go for Grinder. It's quite sophisticated, although can be a bit of a pain to set up. We used it successfully on a recent project.

    Comment


    • #3
      JMeter should meet any of your requirements except point 3 where I am not sure about.

      JMeter is widely used and well understood. But I am not into the topic to give you any advise. I am not the guy for performing the load testing here :-). Check out http://javaboutique.internet.com/tut...r/index-3.html maybe this helps you finding out.

      Comment


      • #4
        Grinder 3 can do JUnit, but it takes a little coding in Jython... I can post the required code if you like.

        Comment


        • #5
          Thanks Ben.

          If you could post the code, that would be great!

          Comment


          • #6
            Originally posted by spring04
            Thanks Ben.

            If you could post the code, that would be great!
            Code:
            #
            # Delegates to jWebUnit integration test
            # 
            #
            
            import string
            import random
            from net.grinder.script.Grinder import grinder
            from net.grinder.script import Test
            from net.grinder.statistics import TestStatistics
            from net.grinder.common import GrinderException
            from some.company.web.tests import SomeJWebUnitIntegrationTests
            from junit.framework import TestResult
            
            log = grinder.logger.output
            out = grinder.logger.TERMINAL
            
            class TestRunner:
                def __call__(self):
                    grinder.statistics.delayReports = 1
                    myTest = Test(1, "jWebUnit Integration Tests")
                    jWebUnitTests = myTest.wrap(SomeJWebUnitIntegrationTests("test"))
                    
                    jWebUnitTests.setUp()
                    jWebUnitTests.testServiceUserSession()
                    jWebUnitTests.tearDown()

            Comment


            • #7
              Thanks Ben.

              Comment


              • #8
                Calling JUnit Test Cases from Grinder 3

                Hi,

                you also may find the following Jython code helpful for calling JUnit Test Cases from Grinder 3:

                Code:
                from net.grinder.script.Grinder import grinder
                from net.grinder.script import Test
                from junit.framework import TestSuite
                from junit.framework import TestResult
                
                from mypackage.test import MyJUnitTestCase
                
                class TestRunner:
                    def __call__(self):
                        # Turn off automatic reporting for the current worker thread. 
                        # Having done this, the script can modify or set the statistics 
                        # before they are sent to the log and the console. 
                        grinder.statistics.delayReports = 1    
                    
                        # Creates a Test Suite.
                        suite = TestSuite(MyJUnitTestCase().getClass());
                
                        # Returns the tests as an enumeration.
                        tests = suite.tests();
                        
                        # Iterate over the tests.
                        testNumber = 0
                        for test in tests:
                            testNumber += 1
                            testCase = Test(testNumber, test.getName()).wrap(suite)
                            
                            testResult = TestResult()
                            testCase.runTest(test, testResult)
                            
                            if testResult.errorCount() > 0:
                                grinder.statistics.success = 0
                            elif testResult.failureCount() > 0:
                                grinder.statistics.success = 0
                It automatically "registers" all testXXX methods within a TestCase as Tests and displays it in the Grinder console. If the testXXX method fails or an error occurs, this is also reported to the Grinder statistics.

                Wolfgang

                Comment

                Working...
                X