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 an application 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.
    Tip: 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.
    Tip: If you already have a Test node, you can skip ahead to 8. By default, each new project you create has a Test node as part of its project structure.
  6. Set a dependency between the Test node and the node of the application being tested.
    1. Right-click on the Test node and select Advanced Properties.
    2. Select the Dependencies page.
    3. Select the application being tested and click Apply.
    4. Click OK to close the dialog.
  7. Update the Command line arguments property of the Test application node to include the path to the working directory.
    Important: Regardless of whether the operating system accepts single or double quotes on the command line, use double quotes when entering comand 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 myAccountTest"

  8. Save the .4gl test scenario file as a child of the Test node.
  9. If you made changes to your data during the recording of the test scenario, return the data to its initial state.
  10. 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.