Apama 10.15.0 | Developing Apama Applications | Developing Apama Applications in EPL | Testing and Tuning EPL Monitors | Structure of a basic test framework
 
Structure of a basic test framework
Apama lends itself to automated testing because
*You can define test cases in event files that you feed into the correlator.
*Apama includes a comprehensive set of command line utilities, all of which are scriptable using standard scripting languages on different platforms.
*The correlator is deterministic when there is only the main context. When there is more than one context, each context is deterministic but the correlator as a whole is not.
If the advocated event interface pattern is employed for encapsulation, then modules can be tested in isolation (unit testing) as well as in more comprehensive integration-level tests.
A basic test case includes the following:
*EPL files (.mon) to deploy (or references to them).
*Input event files (.evt) to send to the correlator.
*Reference event files (.evt) to compare to actual output.
*Script to orchestrate execution of the test-case.
You should assemble all of these files in an Apama project in Software AG Designer and then use Software AG Designer to launch the test case.
Each test-case can reside in its own project with all relevant files local to it. The basic test process is to launch the application, send in some events, capture outputs, then compare to expected output, printing the results of the test to the console or log file at the minimum.