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. Expand the src library, right-click on the Account_prg configuration node, and select Create test.
    The application launches, using the front-end specified by the Genero Studio configuration.
  3. Use the application to modify an existing user.
    1. Click Modify.
    2. Change the first name of the user presented.
    3. Click Accept.
    Genero Studio records the details of your application use.
  4. 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 RegressionTest.
  6. Use the File > Save as ... option to save the .4gl test scenario file as a child of the RegressionTest node.
    For this quick start, name the test myAccountTest.4gl and save it in the tests subdirectory of the OfficeStore project.
  7. Select the RegressionTest node and 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 RegressionTest node application place its compiled output in '$(ProjectDir)/gtestbin'.
  8. Expand the RegressionTest node.
    The Configuration node displays.
  9. Select the Configuration node. Set the BinaryName property to myAccountTest.
  10. With the Configuration node selected, update the Command line arguments property to include the minimum commands necessary to have a runnable test.
    At a minimum, you must specify the working directory that holds the executable of the application being tested. For example, enter tcp --working-directory ../bin.
    Important: 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"

    Tip: When you create a structured project, the Command line arguments property on the RegressionTest 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.
  11. Execute the Configuration configuration node.
  12. You may enter other command line argument options as well.
    For example, try running your test with these options:
    • --forward-gui can display the actions of the test to the Genero Desktop Client (GDC)
      Note:

      This options requires the Desktop configuration of Studio. The Web configuration can not be used as test interactions can not be displayed in the Genero Browser Client (GBC).

    • --speed-ratio can speed up the execution of the test.
    Refer to the Genero Ghost Client User Guide for information regarding the various command line options.
    1. Select the Desktop configuration from the combobox located in the lower right corner of Genero Studio.
    2. To speed up the test and have the test display in the Genero Desktop Client, you could update the Command line arguments
      For example, update the command line property to the following:

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

    3. Execute the Configuration configuration 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.