Defining TestCaseEnter and TestCaseExit Methods

This functionality is supported only if you are using the Classic Agent.

Add one TestCaseEnter and one TestCaseExit method at the top of your test frame to ensure that the Java application is not opened and closed unnecessarily. TestCaseEnter calls the Invoke method you defined earlier to launch the Java application only if it is not already running.

Note: DefaultTestCaseEnter and DefaultTestCaseExit are also called to retain the benefits of the recovery system in resetting the application to a base state.

Example

The following code sample shows how the TestCaseEnter and TestCaseExit methods are inserted at the top of a test frame:
TestCaseEnter()
DefaultTestCaseEnter()
if ( ! TestApp.Exists() )
  TestApp.Invoke()
TestApp.SetActive()
TestCaseExit(BOOLEAN bTRUE)
  Browser.SetActive()
DefaultTestCaseExit(bTRUE)

const wMainWindow = JavaAWTTestApplet
  window BrowserChild JavaAWTTestApplet
  window JavaMainWin TestApp
…