Create and run a unit test

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

Warning:

This topic may change, as is in the process of being updated for the Early Access Program. If you find any issues while using the information contained within, please use the Feedback mechanism to let us know what problems you encounter.

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 group, select New Application and rename the new application.
  3. Right-click on the new configuration node and select Create test configuration.
    The Create Test window appears.
  4. Enter the information for the following fields:
    • Test name - Name your test configuration.
    • Module name - Enter the name of the module.
    • Working directory - Enter the directory for your test.
    • Command line arguments - Arguments provided to the tested module when generating the test.
  5. Select the new application to create the test configuration in this node.
  6. Click OK.
    The test configuration node is created.
  7. (Optional) Remove the default configuration node within the new application as it is not used.
  8. Right-click on the new application node and select Advanced Properties.
    The Advanced Properties window opens.
  9. From the Dependencies page, ensure the library node containing the program to be tested is checked and click Apply > OK.
  10. (Optional) To change the Test mode type, select the new configuration node, go to the Properties window and change the Test mode property to tcp when using the Genero Desktop Client (GDC) configuration, or ua when using the Genero Application Server (GAS) configuration.
  11. (Optional) To ignore time spent between action when replaying the test scenario, navigate to the Properties view, check the No Wait property.
  12. Right-click on the test configuration node and select Generate Test Scenario.
    The project compiles and executes the new application. Once completed, the GGCGEN tool is run to generate the test scenario from the recorded GUI logs. The generated GUILOG file is opened along with the generated test module, allowing both files to be saved.
  13. (Optional) To specify a directory other than the directory that contains the executables for the application being tested, select the test node and navigate to the Properties window. Select the Target directory property and update the value to the desired directory. When this action is performed prior to generating the test scenario, the action fails.
  14. Use the application to complete the steps to include in your test.

    The GAS may start prior to executing the test configuration node.

    Executing a test scenario also starts the ggcadmin tool. By default, the ggcadmin tool keeps running once started. This can be changed from the Genero Install configuration in the Configuration dialogs.

  15. When you are done, exit the application.
    Genero Studio creates the test scenario as a .4gl file.
  16. Use the File > Save as ... option to save the .4gl test scenario file as a child of the test configuration node.
  17. 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.