de.fzj.unicore.wsrflite.xfire
Class AbstractLoadTester

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by de.fzj.unicore.wsrflite.xfire.LocalTestCase
              extended by de.fzj.unicore.wsrflite.xfire.JettyTestCase
                  extended by de.fzj.unicore.wsrflite.xfire.AbstractLoadTester
All Implemented Interfaces:
junit.framework.Test

public abstract class AbstractLoadTester
extends JettyTestCase

does simple load testing, storing client-side response times and turnaround times you can subclass this and override the getTask() method

Author:
schuller

Field Summary
static int calls_per_task
           
static boolean haveInit
           
static int max_num_client_threads
           
static int requests_per_client
           
protected static int running
           
protected static Writer statsWriter
           
 
Fields inherited from class de.fzj.unicore.wsrflite.xfire.JettyTestCase
factory, server
 
Fields inherited from class de.fzj.unicore.wsrflite.xfire.LocalTestCase
xfire
 
Constructor Summary
AbstractLoadTester()
           
 
Method Summary
protected abstract  Runnable getTask()
          a single task to be run.
protected  Writer makeOutputWriter()
           
protected  Object makeProxy(Class iFaceclass, String serviceName)
           
protected static void printStats(String s)
           
protected  Runnable runOneClient()
          This will be run by many client threads
protected  void runTimed(String msg, Runnable r)
           
protected  void setUp()
           
protected  void tearDown()
           
 void test()
           
 
Methods inherited from class de.fzj.unicore.wsrflite.xfire.JettyTestCase
createServer, getBaseurl, getClientSideSecurityProperties, getPort, getServerSideSecurityProperties, makeSoapEnvelope
 
Methods inherited from class de.fzj.unicore.wsrflite.xfire.LocalTestCase
addServices, makeProxy, makeSoapEnvFromReply, makeXmlObject
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

max_num_client_threads

public static int max_num_client_threads

requests_per_client

public static int requests_per_client

calls_per_task

public static int calls_per_task

statsWriter

protected static Writer statsWriter

haveInit

public static boolean haveInit

running

protected static int running
Constructor Detail

AbstractLoadTester

public AbstractLoadTester()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class JettyTestCase
Throws:
Exception

makeOutputWriter

protected Writer makeOutputWriter()
                           throws IOException
Throws:
IOException

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class JettyTestCase
Throws:
Exception

getTask

protected abstract Runnable getTask()
a single task to be run. This will be run many times by many client threads

Returns:

runOneClient

protected Runnable runOneClient()
This will be run by many client threads

Returns:

runTimed

protected void runTimed(String msg,
                        Runnable r)
                 throws Exception
Throws:
Exception

printStats

protected static void printStats(String s)
                          throws Exception
Throws:
Exception

makeProxy

protected Object makeProxy(Class iFaceclass,
                           String serviceName)
                    throws Exception
Throws:
Exception

test

public void test()
          throws Exception
Throws:
Exception


Copyright © 2010. All Rights Reserved.