Run and read tests

How to run a version's test suite in Ptally, read the results, open a test to see its inputs and expected result, and add tests to a draft.

Every version in Ptally carries its own tests. A test is a complete set of inputs with the result you expect. Running the tests after every change shows straight away whether prices have moved.

Run all tests

Open a version and find the Tests section. Click Run all tests. Each test is priced against that version's model and the table fills in:

  • Result, the price the model returned;
  • Valid, whether the quote was valid or declined;
  • Errors, a count of any warnings from the engine, such as a lookup that found no matching row;
  • View, to open the test.

The counts at the top show how many tests returned valid and not valid quotes. Clear resets the results.

Test results after running the suite on version 1

In this example, the two decline tests return Not valid, which is what they are designed to do. The cat with a dog breed also shows one warning, because its breed lookup found no row.

Check results against expectations

Open a test with View to see its name, key, input JSON, Expected result and Expected valid value. Compare the expected values with the Result and Valid columns.

A test opened to show its inputs and expected result

If you connect an AI client over MCP, the run_version_tests tool runs every test and reports which ones match their expected result and which do not.

Add and download tests

In a draft version you can also:

  • Add test, to add a single test with its inputs and expected result;
  • Add batch tests, to add several tests at once.

Download tests saves the test suite as a file, which is useful for reviews and records.

Good tests to keep

  • The worked examples from your rating guide or filing.
  • Values either side of every band boundary.
  • At least one case for each decline and referral rule.
  • Every pricing bug you have fixed, so it cannot return.

For more on building a test suite, read Every rate change needs a test suite.

Keep reading

All articles

See your product as a live model

Send us your rating guide. We'll come back with a working, tested model. There is no implementation fee.