remoteTester.runner.server.ejbbean
Class TestRunnerBean

java.lang.Object
  extended byremoteTester.runner.server.ejbbean.TestRunnerBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

public class TestRunnerBean
extends java.lang.Object
implements javax.ejb.SessionBean

This Session Bean allows to execute a JUnit TestCase on server side WARNING : It must not be deployed in a production environnement as it allows access to Local Interfaces

See Also:
Serialized Form

Constructor Summary
TestRunnerBean()
           
 
Method Summary
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 TestResultRemote run(byte[] classAsByte, java.lang.String className)
          play a TestCase using a junit.textui.TestRunner
 TestResultRemote run(byte[] classAsBytes, java.lang.String className, byte[][] helperClassesAsBytes, java.lang.String[] helperClassNames)
          play a TestCase using a junit.textui.TestRunner with HelperClasses supports
 TestResultRemote run(java.lang.Class testCaseClass)
          play a TestCase using a junit.textui.TestRunner
 TestResultRemote run(java.lang.String className)
          play a TestCase using a junit.textui.TestRunner
 TestResultSerializable runWithResult(byte[] testClassAsBytes, java.lang.String testClassName, byte[][] helperClassesAsBytes, java.lang.String[] helperClassNames, java.lang.String testMethodName)
          play a test method from a RemoteTestCase using a junit.textui.TestRunner with HelperClasses supports
 void setSessionContext(javax.ejb.SessionContext sessionContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestRunnerBean

public TestRunnerBean()
Method Detail

runWithResult

public TestResultSerializable runWithResult(byte[] testClassAsBytes,
                                            java.lang.String testClassName,
                                            byte[][] helperClassesAsBytes,
                                            java.lang.String[] helperClassNames,
                                            java.lang.String testMethodName)
                                     throws java.lang.ClassNotFoundException
play a test method from a RemoteTestCase using a junit.textui.TestRunner with HelperClasses supports

Parameters:
testClassAsBytes - a JUnit TestCase class provided as a byte array
testClassName - the class name of a JUnit TestCase class
helperClassesAsBytes -
helperClassNames -
testMethodName - name of the test method to execute
Returns:
a TestResultSerializable for this test
Throws:
java.lang.ClassNotFoundException

run

public TestResultRemote run(byte[] classAsByte,
                            java.lang.String className)
                     throws java.lang.ClassNotFoundException
play a TestCase using a junit.textui.TestRunner

Parameters:
classAsByte - a JUnit TestCase class provided as a byte array
className - the class name of a JUnit TestCase class
Throws:
java.lang.ClassNotFoundException

run

public TestResultRemote run(byte[] classAsBytes,
                            java.lang.String className,
                            byte[][] helperClassesAsBytes,
                            java.lang.String[] helperClassNames)
                     throws java.lang.ClassNotFoundException
play a TestCase using a junit.textui.TestRunner with HelperClasses supports

Parameters:
classAsBytes - a JUnit TestCase class provided as a byte array
className - the class name of a JUnit TestCase class
Throws:
java.lang.ClassNotFoundException

run

public TestResultRemote run(java.lang.String className)
                     throws java.lang.ClassNotFoundException
play a TestCase using a junit.textui.TestRunner

Parameters:
className - the class name of a JUnit TestCase class.
The test class must be available on serverside, so it can be located by server ClassLoader, otherwise you should use playTestCase(byte[] classAsByte, String className)
Throws:
java.lang.ClassNotFoundException

run

public TestResultRemote run(java.lang.Class testCaseClass)
play a TestCase using a junit.textui.TestRunner

Parameters:
testCaseClass - the TestCase Class to be runTC

ejbCreate

public void ejbCreate()

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sessionContext)
                       throws javax.ejb.EJBException,
                              java.rmi.RemoteException
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException,
                      java.rmi.RemoteException
Specified by:
ejbRemove in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException,
                        java.rmi.RemoteException
Specified by:
ejbActivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException,
                         java.rmi.RemoteException
Specified by:
ejbPassivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException


Copyright © 2003-2004 Nicolas FRANK. All Rights Reserved.