Introduction

The CORBA project's testing requirements have been met by a custom framework oringinally written by IBM. This was enhanced to include the capability to run tests that require multiple separate processes by the addition of the corba.framework.CORBATest class, originally written by Everett Anderson. I have enhanced the framework in some ways as well, in particular by making it easy to debug tests. In addition a number of more recent tests have been written using JUnit, which provides a very effective unit test framework.

While this framework has worked well for some time, recent developments suggest the need for further evolution. In no particular order, here are some recent considerations:

  1. It would be useful to change the port numbers used in the tests so that more than one developer can share a single fast server machine.
  2. We should be able to run tests against both the compiled class files (for quick turnaround) and against the as-delivered jar files (for final verification).
  3. A number of recent features are configurable in ways that have global effects on all tests. This includes JSG, Dynamic RMI-IIOP, and nio select.

This suggests that we need to enhance both the description of our tests, and the description of the environment used to run the tests. The standard way to do this nowadays is XML, but I'll probably consider something scheme based instead, or perhaps Harold's lxml syntax.

Test Environment

There are a large number of parameters that are configured for tests:

  1. Current working directory is assumed to be <ws>/test/make (ws may be renamed)
  2. System properties:
    1. javax.rmi.CORBA.UtilClass = com.sun.corba.se.impl.javax.rmi.CORBA.Util
    2. javax.rmi.CORBA.StubClass = com.sun.corba.se.impl.javax.rmi.CORBA.StubDelegateImpl
    3. javax.rmi.CORBA.PortableRemoteObjectClass = com.sun.corba.se.impl.javax.rmi.PortableRemoteObject
    4. http.server.port = 9090
    5. java.rmi.server.codebase = http://localhost:9090/
    6. http.server.root.directory = ../../values/build/$(ARCH)/classes
    7. java.security.policy = ../src/share/classes/test.policy
    8. java.security.debug = debug
    9. org.omg.CORBA.ORBClass = com.sun.corba.se.impl.orb.ORBImpl
    10. org.omg.CORBA.ORBSingletonClass = com.sun.corba.se.impl.orb.ORBSingleton
    11. com.sun.CORBA.POA.ORBServerId = 1
    12. com.sun.COBRA.ORBBase = $(BASEDIR)
    13. com.sun.CORBA.ORBArch = $(ARCH)
    14. com.sun.CORBA.test.sourcepath = $(TESTSOURCEPATH) (this contains the normal source, the generated source, and the test source, but does not seem to be used)
    15. com.sun.CORBA.ORBUseDynamicStubClass = true or not set
    16. com.sun.CORBA.ORBUseBCELReflectiveCopyObject = true or not set
    17. com.sun.CORBA.encoding.ORBEnableJavaSerialization = true or not set
    18. We really should just treat this as any property is allowed, but we need to have some that are easy to set up, and some that are just defaults.
  3. JVM version
  4. JVM type (server or client)

Test Description

Tests have a number of different characteristics that we can control:

  1. Arguments that can be specified in the test command:
  2. The list of valid controllers for the test. Anything started by a controller can be debugged in several ways.