Skip to main content
Use independent rating examples to check premium correctness. Compiler checks and packaged expectations provide separate evidence about the implementation.

Load the example rater

To test a rater that you are writing, compile it from its source with Rater.build("dwelling/rater.rsl"). Rater.build takes the .rsl file or its folder, and Rater.load takes a packaged bundle. The example program is synthetic. The following expected annual premiums come from its rate tables and a hand calculation. Expand Example policy inputs and copy the inputs before running the checks.
Copy these inputs for a driver with 24 years licensed and one vehicle:

Compare independent premiums

Every other factor is 1. The annual premium is 504, or 454 with the multi-policy discount.
The assertion checks both premiums against the independent expectations.

Check boundaries and business rules

Add cases at both sides of rating bands, such as annual mileage 12,500 and 12,501. Test each business rule with a request that breaks it, then compare the returned code:
Use rater.explain(policy) to inspect inputs, factors, and rounding when a result differs from its expectation.

Check packaged expectations

Packaged expectations detect changes to previously recorded results. Independent cases establish whether selected premiums follow the intended rating rules.

Next step

Validate a program before comparing real quotes or full books. Record the rating inputs, effective dates, coverage terms, fees, and any unresolved differences.