Skip to content

Performance testing an insurance quote engine before a campaign

B2Bnetwork team · · 6 min

IT in insurance

In brief

A performance test of a quote engine before a campaign checks whether the journey from vehicle details to payment can carry the media plan traffic, including the spike right after an ad airs. The load model is built from the previous campaign's logs and the airtime schedule, external dependencies (vehicle databases, insurance history, payments) are replaced by stubs with measured response times, and results are judged in percentiles. The test ends with a campaign day plan: what to switch off when the system slows down.

How campaign traffic differs from an ordinary day

On an ordinary day, quote traffic rises and falls gently. A TV or online campaign has a different shape: within minutes of a spot airing, a wave of customers enters a license plate number to see a price. The wave fades and returns with the next airing. On top of that comes steady traffic from price comparison sites, which the campaign also lifts.

For the test, this means three profiles instead of one:

ProfileWhat it reproducesWhat it answers
peak loadthe busiest campaign hour plus headroomcan the system carry the forecast within the response time target
spiketraffic rising several times within a minute after an airingcan autoscaling and connection pools keep up
soakseveral hours of continuous campaign trafficdo memory, connections and queues keep growing

The forecast comes from data, not intuition. Sources are the previous campaign's logs (quotes per minute at the peak), the media plan (airtimes, reach) and the quote-to-purchase ratio. The general method for preparing a test before a peak is described in Performance testing before a sales peak. Here we focus on what is specific to a premium quote engine.

The customer journey as a load model

A quote engine is not one request but a journey. Each step loads different systems, and customers drop off at successive stages. The load model reproduces these proportions.

StepTypical loadShare of customers (example)
vehicle details from the license plateexternal vehicle database, make and model reference data100%
driver details and insurance historyexternal history service, discount rules80%
quoting variants (motor third party liability, with own damage, assistance)rating service, several quotes per customer70%
changing parameters and quoting againrating service, cache40%
purchase: personal data, consents, documentspolicy administration system, document generator6%
paymentpayment gateway5%

The percentages show the layout; fill them in with data from your own logs. The key observation is that quotes outnumber purchases many times over. A campaign therefore loads mainly the rating service and the external dependencies, and the policy administration system only at purchase. A test that treats every visitor as a buyer overestimates the load on the policy system and misses the bottleneck in the vehicle database.

External dependencies and stubs

A motor insurance quote engine relies on services the insurer does not control: vehicle data, insurance history and payments. You cannot load test them, and on campaign day they may respond more slowly than usual. So the test does two things:

  1. It replaces dependencies with stubs (service virtualization) that respond with times measured in production logs, as a distribution rather than a fixed value. The approach is described in Service virtualization in testing.
  2. It checks behavior when a dependency is slow. A separate run uses a stub that answers several times slower or returns errors. The quote engine should then fall back, for example by asking the customer to pick the vehicle model manually, rather than wait until the thread pool is exhausted.

The second run often produces the most important findings. A missing timeout on an external call can stop the whole quote engine even though its own code is fast.

What to measure and how to judge the result

Criteria are set before the test, in percentiles, for each step separately. An average hides the customers who wait several seconds, and they are the ones who abandon the journey.

  • p95 and p99 response times for quoting, purchase and payment, for example p95 quote time under 2 s at the peak profile;
  • throughput: how many quotes per minute the system handles before times exceed the target, with headroom over the forecast;
  • error rate by step and cause;
  • resources: CPU, memory, database connection pools, queue lengths, cache hit rate;
  • recovery time after a spike: how quickly response times return to normal once the wave fades.

Write the thresholds into the tool as pass criteria so the outcome is unambiguous. Analyzing results and finding bottlenecks is covered in Analyzing performance test results.

The test environment is rarely a copy of production. Results from a smaller environment should be scaled with care and confirmed by a short production test outside sales hours, if the risk allows.

The campaign day plan

A performance test ends not only with a report but with an action plan for campaign day, agreed with marketing and the IT on-call team:

  1. The airtime schedule with the on-call engineers, with heightened attention windows after each spot.
  2. A dashboard with the metrics from the test, with alert thresholds set from the results.
  3. Degradation switches: turning off extra quote variants, extending cache validity, a queue at purchase instead of rejection.
  4. Cache warm-up for reference data and the most common vehicle models before the first airing.
  5. A change freeze on systems in the sales journey for the duration of the campaign.

Every switch must be exercised in the test, because an untested switch on campaign day is an extra risk. The case study Performance testing the quote engine and online sales before a motor insurance campaign shows such a project, and the scope of work is described under Performance testing. Testing the tariff itself before a campaign is covered in Premium calculators: testing tariffs and rules.

Questions and answers

How far ahead of a campaign should the performance test run?

Early enough to fix what the test reveals and run it again. That usually means a first run a few weeks before launch, once the sales journey is functionally complete, and a confirmation run after the fixes. A test in the final week gives you knowledge but rarely time to change the architecture.

Can we test in production?

A short night-time test with separated traffic and stubbed external services is often the best confirmation, because production has the real configuration. It needs approval from system owners, an abort plan and flagging of test policies so they do not reach billing and reports. The main test runs in a test environment.

What if the external vehicle database cannot handle the campaign?

The insurer cannot change the performance of someone else's service, but it can limit the number of calls and their impact: caching results per license plate, a timeout on the call and a fallback with manual vehicle selection. A test with a slow stub will show whether the quote engine still works when the service slows down.

What test data is needed?

Synthetic license plates, vehicles and drivers that cover the popular combinations from the logs, plus several thousand unique sets so the cache does not make the result look too optimistic. A performance test does not need customer data from production.

What it looks like in a project

Changing a policy or claims system? Talk to an engineer who knows insurance products.

Let's talk

Read more: IT in insurance

All in IT in insurance →