How to run Java tests

The Java tests that you have compiled, are run from the command line using the Launcher of the Genero Ghost Client Java program which starts a testing session for an application.

Before you begin:
  • It is assumed that your new test Java files are compiled in the directory path/to/myTests.
  • It is assumed your environment is configured to run Java and the GGC, see Install and configure for Genero Ghost Client.
  • If you are using the GAS:
    • Make sure your GAS version is at least version 2.50.34 or greater.
    • Make sure that the standalone dispatcher httpdispatch is started and that you can access the GAS demos welcome page, http://localhost:6394/demos.html, from your browser. See the Genero Application Server Administrator Guide for more information.
  1. To run the tests through the GAS using the application URL, type the command:

    java com.fourjs.ggc.Launcher -u http://localhost:6394/ua/r/myApplication -s path.to.myTests.mySessionManager

Or alternatively you can run the test in direct connection mode without using the GAS.

  1. To run the tests using a stand-alone DVM, type the command:

    cd path/to/myTests ;java com.fourjs.ggc.Launcher -s path.to.myTests.mySessionManager --command "fglrun myApplication"

    Note:
    • We first change to the directory where the application is located.
    • The DVM command to launch the application needs to be passed in double quotes (for example, " fglrun demo").