Skip to main content

TestControl

When you launch a test, the %UnitTest.TestProductionOpens in a new tab TestControl method executes. This method starts and stops the production being tested and also invokes a series of callback methods. These callback methods do most of the work of the test, including tasks like the following:

  • Preparing an environment for the production, for example, initializing directories and the production's configuration settings.

  • Sending input to the running production and its components, for example, placing input files in the appropriate directories and sending Ensemble messages to individual components.

  • Examining the output as well as any errors generated by the running production.

  • Examining the contents of the Ensemble Event Log and the database as well as verifying the contents of any files produced by the production.

Your test class will be a subclass of %UnitTest.TestProductionOpens in a new tab. The majority of the work in creating a test for a production will involve overriding the callback methods invoked by TestControl.

generated description: testprod callbacks

Note:

There are a variety of ways to launch a test. These are discussed later in the tutorial.

When you create Ensemble tests you do not implement any TestX methods. In this way creating Ensemble tests with %UnitTest.TestProductionOpens in a new tab differs significantly from creating Caché tests using %UnitTest.TestCaseOpens in a new tab.

FeedbackOpens in a new tab