JUnitExecuteTest Function

Action

Starts a JUnit test execution.

Include file

Java.bdh

Syntax

JUnitExecuteTest( in hTestClass  : number;
                  in sMethodName : string;
                  in sTimerName  : string optional ): number;

Return value

  • true if successful
  • false otherwise
Parameter Description
hTestClass The handle of the runtime class.
sMethodName The name of the test you want to execute. If omitted, the whole class is executed.
sTimerName The name of the timer for the JUnitExecuteTest function.

Example

var
  hTestClass : number;

dcltrans
  transaction TInit
  begin
      // Load and start the JVM.
      JavaCreateJavaVM();

      // instantiate the java class
      hTestClass := JUnitLoadClass("com/microfocus/Test");
  end TInit;

  transaction THello
  begin
    JUnitExecuteTest(hTestClass, "doHello", "doHello_timer");
    JUnitExecuteTest(hTestClass, "", "Test_timer");
  end THello;

  transaction TEnd
  begin
    JavaFreeObject(hTestClass);
  end TEnd;