Create and run a unit test

Genero Studio provides a graphical user interface to create tests. It works with Genero Ghost Client.

From Genero Studio, you can:
  • Generate a test scenario as a Genero application.
  • Edit the scenario to modify the test.
  • Add the scenario to a project.
  • Run the scenario.
  1. Open your Genero project.
  2. Right-click on a configuration node and select Create test.
    The application launches, using the front-end specified by the Genero Studio configuration.
  3. Use the application to complete the steps to include in your test.
    Genero Studio records the details of your application use. While creating the test, the path to the generated GUILOG file is displayed in the Output view.

    The GUILOG is an intermediate file, and will not be saved for later use. To save the GUILOG, copy the GUILOG file and save it to another location.

  4. When you are done, exit the application.
    Genero Studio creates the test scenario as a .4gl file.
  5. Add an application node to your project and name it Test.
    You can use any name for this node; for this procedure we use the name Test.

    If you already have a Test node, you can skip ahead to 7. By default, each new project you create has a Test node as part of its project structure.

  6. Create a configuration node for the Test application, and update its Command line arguments property to include the path to the working directory.

    Regardless of whether the operating system accepts single or double quotes on the command line, use double quotes when entering command line syntax in the Command line arguments property. For example, to specify the option for --command-line, you would enter:

    tcp --working-directory ../bin --command-line "fglrun Account_prg"

  7. Save the .4gl test scenario file as a child of the Test node.
  8. If you made changes to your data during the recording of the test scenario, return the data to its initial state.
  9. Execute the Test application node.

The test executes according to the instructions in the test scenario file. The results appear in the Output view. See Viewing test results in the Output view for more information.

Edit the test scenario to add or remove steps from the test. See the Genero Ghost Client User Guide for more information.