Testing

For a complex product created in a development environment, you should create unit tests for individual parts of your product's eligibility/entitlement rules, using CER's support for rules testing.

You might consider creating end-to-end unit tests that test full scenarios involving the creation and activation of evidence, and the creation and activation of product delivery cases, to test that the overall eligibility and entitlement results are calculated as expected.

You might also perform manual testing of the online system to check that your eligibility/entitlement scenarios are handled as expected.

The Engine will be unable to calculate eligibility/entitlement results for a period in the case's lifetime if there is no product period covering part of the case's lifetime - to fix this you must change the product periods configured for your product so that all cases created have their entire lifetimes covered by exactly one product period. In particular, if your product allows open-ended cases, then typically the last product period for your product should be open-ended too (unless you intend your product to reach its end-of-life soon).

If the Engine detects a missing product period for a particular period in the case's lifetime, then:

If there is a runtime error in the calculation of a CER attribute value for eligibility/entitlement, such as a reference not found (analogous to a NullPointerException in Java), or a division by zero, or any other calculation problem, then the Engine will throw an exception. The application logs will contain details of this exception including its stack trace. For CER calculation errors, the stack trace can include important information regarding the location within a CER rule set where the error occurred. To fix this, you will need to debug and retest your rules.