Explore the scenario provider

Explore the Genero Ghost Client simple scenario provider demo.

About this task:

The SimpleScenarioProvider demonstrates how an application starting a child application requires multiple scenarios and how the scenario provider provides a scenario instance when requested.

This demo provides you with a simple template to use as a reference when you start creating your own test scenarios that need multiple scenarios. In this example, only one scenario (SimpleScenario) is registered and provided to the scenario provider.

  1. Compile the test scenarios in the demo package.
    From the GGCDIR/src/samples directory, run the java command to compile the SimpleScenarioProvider and the SimpleScenario, which is used as the scenario for the test:
    javac demo/*.java
  2. Execute the test scenario (direct mode):
    Important:

    The option used is --scenario-provider, to specify that a scenario provider class (SimpleScenarioProvider in the example) is being used to run the test.

    • UNIX® like OS:
      ggcadmin tcp -w "$GGCDIR/src/quick-start" -c "fglrun price" --scenario-provider demo.SimpleScenarioProvider
    • Windows®:
      ggcadmin tcp -w "%GGCDIR%/src/quick-start" -c "fglrun price" --scenario-provider demo.SimpleScenarioProvider
  3. Execute the test scenario (using the Genero Application Server).
    Make sure that the GAS standalone dispatcher httpdispatch is started and that you can access http://localhost:6394/ua/r/price from your browser. Then run the command to test it.
    ggcadmin ua --url http://localhost:6394/ua/r/price --scenario-provider demo.SimpleScenarioProvider
  4. To execute the test scenario using the Genero Application Server for Java, create an empty war file pointing to the test scenario.
    Refer to the Genero Application Server for Java User Guide for details on creating the war file.