How to run Java tests
You run tests from the command line using the ggcadmin tool which starts a testing session for an application.
Before you begin:
- It is assumed that your Java test files are compiled in the directory
path/to/myTests. The myTests directory is also the
package name. To ensure that classes in the package are easy to locate, the path to
myTests parent directory must be present in the
CLASSPATH
variable.When executing the scenario, thepackage-name.provider-class
is referenced using the ggcadmin tcp/ua command--scenario-provider
option. For example:ggcadmin tcp -w path/to/myapp -c "fglrun myapp" --scenario-provider myTests.myScenario
- If you are using the GAS:
- Make sure your GAS version is at least version 3.00 or greater.
- Make sure that the standalone dispatcher
httpdispatch
is started. - You must have deployed the app you are testing on the GAS. See Run the test scenario with the application running on the GAS.
In this task you use the ggcadmin
tcp command to run tests in direct mode, or ggcadmin ua
command to
run tests against an application running on the GAS.
Steps
Or alternatively you can run the test in direct connection mode
The GGC does not render a graphical user interface. If you use
forward-gui
option, the GGC still connects to the DVM, but also forwards the
Abstract User Interface (AUI) tree to the running Genero Desktop Client (GDC) so that you can see
your scenario being executed. For example, to run the test through the GAS to view it running on the
GDC on the localhost, run the following
command:ggcadmin ua --url http://localhost:6394/ua/r/myapp --scenario-provider myTests.myScenario -f localhost:0