Class ServiceEETest

java.lang.Object
com.sun.ts.lib.harness.EETest
com.sun.ts.lib.harness.ServiceEETest
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
VehicleClient

public abstract class ServiceEETest extends EETest
This abstract class must be extended by all clients of tests of J2EE service apis; for example, JDBC, RMI-IIOP, JavaMail, JMS, etc. When a service test is encountered by the JavaTest Client, the instance is passed to a J2EE server component and run from that remote location. Using this model to develop tests allows the same test to be run from different locations within the scope of the J2EE Application Programming Model.
Author:
Kyle Grucci
See Also:
  • Constructor Details

    • ServiceEETest

      public ServiceEETest()
  • Method Details

    • getVehicleSpecificClientProps

      public Properties getVehicleSpecificClientProps(Properties p)
      Returns any additional properties that may need to be set by a subclass of ServiceEETest for use by a specific vehicle. This method was created due to a need for clients of the JBIVehicle to set the name of the object to lookup in the rmiregistry. By rule, this value should match the id name for the component specified in the JBI installation descriptor. This impl returns an empty properties object by default.
      Parameters:
      p - user configured properties used by the test
      Returns:
      Properties Additional properties that may need to be set by a subclass of ServiceEETest for use by a specific vehicle.
    • run

      public Status run(String[] argv, Properties p)
      When called within the harness VM, this method passes an instance of itself to the appropriate J2EE server component. When called from within that server component, EETest's run method is called and the test is run.
      Overrides:
      run in class EETest
      Parameters:
      argv - an array of arguments that a test may use
      p - user configured properties used by this test
      Returns:
      a Javatest Status object (passed or failed)
    • getTestPropsFromArgs

      protected Properties getTestPropsFromArgs(String[] argv)
      Overrides:
      getTestPropsFromArgs in class EETest
    • run

      public Status run(String[] argv, PrintWriter log, PrintWriter err)
      Description copied from class: EETest
      This method is only called when tests are run outside of JavaTest or if the test is being run in the same VM as the harness. If a testcase name is passed within argv, then that testcase is run. Otherwise, all testcases within this implementation of EETest are run.
      Overrides:
      run in class EETest
      Parameters:
      argv - an array of arguments that a test may use
      log - Writer passed to TestUtil for standard loggin
      err - Writer passed to TestUtil for error logging
      Returns:
      a Javatest Status object (passed or failed)
    • runAllTestCases

      protected Status runAllTestCases(String[] argv, Properties p, PrintStream log, PrintStream err)
    • setSharedObject

      public void setSharedObject(Object o)
    • getSharedObject

      public Object getSharedObject()