Class ExecStdTestSameJVMCmd

java.lang.Object
com.sun.javatest.Command
com.sun.javatest.lib.ExecStdTestSameJVMCmd

public class ExecStdTestSameJVMCmd extends Command
ExecStdTestSameJVMCmd executes a standard test (one that implements the Test interface) in the same Java Virtual Machine as the caller.

It can use either a private class loader or the system class loader. A private class loader will be created if the -loadDir option is given; otherwise the system class loader will be used. A private class loader minimises the interference between tests, but you may be restricted from using private class loaders if you are running the harness inside a web browser.

If the the -repeat option is provided, then the test will be run multiple times in the same JVM. Status.error() will be returned (and the remainder of the iterations will not be performed) if any repetition of the test returns an error, or if the status return type changes between iterations. The returned status after each iteration will be included in the log. If this option is not given, the test will be run once.

See Also:
  • Constructor Details

    • ExecStdTestSameJVMCmd

      public ExecStdTestSameJVMCmd()
  • Method Details

    • run

      public Status run(String[] args, PrintWriter log, PrintWriter ref)
      The method that that does the work of the command.
      Specified by:
      run in class Command
      Parameters:
      args - [-loadDir dir] [-saveProps] executeClass executeArgs
      log - A stream to which to report messages and errors
      ref - A stream to which to write reference output
      Returns:
      The result of the command