9 4 Test your Activity

LANSA Composer

9.4 Test your Activity

Typically, you will test your custom Activity by creating and running Processing Sequences containing it.  (If it makes sense for your activity, you can also run the Activity directly, without creating a Processing Sequence.)

Clearly you need to test that the custom processing performed by your Activity is performed correctly to your specifications in all cases. You also need to verify that your custom Activity is a good "Processing Sequence citizen". Some of the questions to ask include:

  • Does it correctly set the Activity return code for normal and abnormal completion cases?
  • Does it interact correctly with the variable pool? Does it clear any output variables and lists early in its processing to ensure that data from earlier invocations is not left if the current invocation ends prematurely?
  • Does it provide clear and sufficient log output for normal operational monitoring and for diagnostic purposes in the event of an exception?
  • If you have chosen to permit your activity to be restartable, does the implementation properly support the restart capability for all possible exceptions?
  • Does your Activity exhibit acceptable performance characteristics for the anticipated usage?  If you anticipate that the Activity will be invoked frequently in a single Processing Sequence, have you or could you take proper advantage of the Keep Active capability?

When testing your custom Activity, you may find some of the supplied Activities helpful.  For example, you can use the LOG_VARIABLE activity to record the values of variables in the variable pool before and after your custom Activity runs.