Callback Methods
The following table describes several TestProduction callback methods. Implement your tests by overriding these methods. The class documentation for %UnitTest.TestProductionOpens in a new tab describes all of the supported callback methods in detail.
| Method | Description | 
|---|---|
| OnBeforeProductionStart | 
 Peform tasks immediately before the production starts, for example: 
  | 
| OnAfterProductionStart | 
 Peform tasks immediately after the production starts. For example, from this method you can use SendRequest to send request messages to production components.  | 
| CheckResults | 
 Verify the results of running the production. For example, from this method you can examine the contents of the Event Log or query the database.  | 
| CheckErrors | 
 Examine errors generated by the production. This method is invoked only if IGNOREPRODUCTIONERRORS = 1. Set the value of this parameter in your test class.  | 
| OnBeforeProductionStop | 
 Perform tasks immediately before the production stops.  | 
| OnAfterProductionStop | 
 Perform tasks immediately after the production stops.  | 
You can also place initialization and clean-up code in OnBeforeOneTest and OnAfterOneTest as in the case of unit tests for InterSystems IRIS® code.