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:
- 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.
- 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).
- 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:
- Current working directory is assumed to be <ws>/test/make (ws
may be renamed)
- System properties:
- javax.rmi.CORBA.UtilClass =
com.sun.corba.se.impl.javax.rmi.CORBA.Util
- javax.rmi.CORBA.StubClass =
com.sun.corba.se.impl.javax.rmi.CORBA.StubDelegateImpl
- javax.rmi.CORBA.PortableRemoteObjectClass =
com.sun.corba.se.impl.javax.rmi.PortableRemoteObject
- http.server.port = 9090
- java.rmi.server.codebase = http://localhost:9090/
- http.server.root.directory =
../../values/build/$(ARCH)/classes
- java.security.policy = ../src/share/classes/test.policy
- java.security.debug = debug
- org.omg.CORBA.ORBClass = com.sun.corba.se.impl.orb.ORBImpl
- org.omg.CORBA.ORBSingletonClass =
com.sun.corba.se.impl.orb.ORBSingleton
- com.sun.CORBA.POA.ORBServerId = 1
- com.sun.COBRA.ORBBase = $(BASEDIR)
- com.sun.CORBA.ORBArch = $(ARCH)
- 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)
- com.sun.CORBA.ORBUseDynamicStubClass = true or not set
- com.sun.CORBA.ORBUseBCELReflectiveCopyObject = true or not
set
- com.sun.CORBA.encoding.ORBEnableJavaSerialization = true or not
set
- 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.
- JVM version
- JVM type (server or client)
Test Description
Tests have a number of different characteristics that we can
control:
- Arguments that can be specified in the test command:
- The list of valid controllers for the test. Anything started by a
controller can be debugged in several ways.