The testing framework

There are five steps in creating and executing a test.

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.

  1. Verify the environment.

    The Testing Utilities environment allows you to set GGC-related environment variables. This includes the GGCDIR variable, which specifies the location of the GGC. For more information, go to Configure the GGC.

  2. Create the test.

    For more information on the steps to create a test for your application, go to Create and run a unit test .

  3. Add the test to a project.

    Add the .4gl test file to the new application node. Right-click on the application test node and select Advanced Properties. Set a dependency with the application being tested.

    Your project can contain only the single test, or you can create a project to serve as a test suite inclusive of multiple tests. If you create a test suite, you must also create an application to call the generated tests.

  4. Edit the test and add assertion checks.

    Assertion checking is where you verify that the application works as it did previously, repeatedly.

    When the test is generated, every possible step and test is added to the .4gl file. The generated code usually contains far more checks than what you expect; but this is intended as it is easier to remove things than to write new checks and tests by hand. Update the .4gl file to remove parts of the test that are no longer needed or to add new checks and tests.

    You may need to update initialization and finalization tasks to ensure the data is correct for the test.

  5. Run the test.

    Before running the test, ensure that the test application node has a dependency set on the application being tested.

    The app is run as a child process. The test runs the app and plays the role of a GUI client (using GGC) and runs the checks set in the .4gl file.

For specific instructions on completing these tasks, go to Create and run a unit test.