Quick Start: Regression testing

This quick start uses the OfficeStore demo to create a regression test for the Account application.

  1. Open the OfficeStore demo.
  2. Right-click on the Accounts application node and select Create test.
    The application launches, using the front-end specified by the Genero Studio configuration.
  3. Use the application to add a new account.
    1. Click New.
    2. Enter in the details for a new imaginary user. Do not worry about the validity of the field entries at this time.
    3. Click Accept.
    Genero Studio records the details of your application use.
  4. When you are done, select File > Exit to 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.
  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. With the Test node selected, update the Command line arguments property to include the minimum commands necessary to have a runnable test.
    At a mimimum, you must specify the working directory that holds the executables. For the OrderReport application, enter "tcp --working-directory ../bin".
    Tip: When you create a structured project, the Command line arguments property on the Test node is populated with the correct minimum arguments required for a runnable test. When you create a simple project, where no default test node is provided, you must populate any test node you create with the minimum command line arguments.
    You may enter other command line argument options as well. For example:
    • --forward-gui can open the client to display the actions of the test

    • --speed-ratio can speed up the execution of the test

    For example, to speed up the test and have the test display in the Genero Desktop Client, you could update the Command line property argument to the following:

    tcp --working-directory ../bin --forward-gui localhost:0 --speed-ratio 0.2

    Refer to the Genero Ghost Client User Guide for information regarding the various command line options.
  8. With the Test node selected, update the Target directory property to specify a directory other than the directory that contains the executables for the application being tested. For example, you can specify the Test node application place its compiled output in '$(ProjectDir)/testbin'.
  9. Use the File > Save as ... option to save the .4gl test scenario file as a child of the Test node.
    For this quick start, name the test myAccountTest.4gl and save it in the tests subdirectory of the OfficeStore project.
  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.