Quick Start: Regression testing
This quick start uses the OfficeStore demo to create a regression test for the Account application.
- Open the OfficeStore demo.
-
Right-click on the Accounts application node and select Create test.
The application launches, using the front-end specified by the Genero Studio configuration.
-
Use the application to add a new account.
- Click New.
- Enter in the details for a new imaginary user. Do not worry about the validity of the field entries at this time.
- Click Accept.
Genero Studio records the details of your application use. -
When you are done, select File > Exit to exit the application.
Genero Studio creates the test scenario as a .4gl file.
- Add an application node to your project and name it Test.
-
Set a dependency between the Test node and the node of the application
being tested.
- Right-click on the Test node and select Advanced Properties.
- Select the Dependencies page.
- Select the application being tested and click Apply.
- Click OK to close the dialog.
-
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
tcp --working-directory ../bin --forward-gui localhost:0 --speed-ratio 0.2
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"
Refer to the Genero Ghost Client User Guide for information regarding the various command line options. -
- 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'.
-
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.
- 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.