org.apache.directory.server.core.unit
Class AbstractPerformanceTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.directory.server.core.unit.AbstractTestCase
              extended by org.apache.directory.server.core.unit.AbstractPerformanceTest
All Implemented Interfaces:
junit.framework.Test

public class AbstractPerformanceTest
extends AbstractTestCase

A base testcase is used to create test harnesses for running performance metrics on ApacheDS and other servers. It provides a framework for running tests and capturing the results of individual operations against the directory.
This test case does a few things out of the box to make life easier for those that want to run performance tests against an LDAP server. These are listed below:

Version:
$Rev$
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.server.core.unit.AbstractTestCase
configuration, doDelete, LDIF, password, sysRoot, testEntries, username
 
Constructor Summary
protected AbstractPerformanceTest(java.lang.Class subclass)
          Initializes the statistics log PrintWriter.
 
Method Summary
protected  boolean applyEntry(org.apache.directory.shared.ldap.ldif.Entry entry)
          Only supports add operations at this point.
protected  void setUp()
          Get's the initial context factory for the provider's ou=system context root.
protected  void tearDown()
          Sets the system context root to null.
 
Methods inherited from class org.apache.directory.server.core.unit.AbstractTestCase
doDelete, getOverriddenEnvironment, overrideEnvironment, setLdifPath, setLdifPath, setLoadClass, setSysRoot, setSysRoot
 
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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractPerformanceTest

protected AbstractPerformanceTest(java.lang.Class subclass)
                           throws java.io.IOException
Initializes the statistics log PrintWriter.

Parameters:
subclass -
Throws:
java.io.IOException
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Description copied from class: AbstractTestCase
Get's the initial context factory for the provider's ou=system context root.

Overrides:
setUp in class AbstractTestCase
Throws:
java.lang.Exception
See Also:
TestCase.setUp()

tearDown

protected void tearDown()
                 throws java.lang.Exception
Description copied from class: AbstractTestCase
Sets the system context root to null.

Overrides:
tearDown in class AbstractTestCase
Throws:
java.lang.Exception
See Also:
TestCase.tearDown()

applyEntry

protected boolean applyEntry(org.apache.directory.shared.ldap.ldif.Entry entry)
                      throws java.lang.Exception
Only supports add operations at this point.

Parameters:
entry - the LDIF entry being applied
Throws:
java.lang.Exception


Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.