Hero Background

Power Your Software Testing with AI Agents and Cloud

The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.

Kane CLIInsurance

Test a premium calculator that recalculates live

Three inputs changed one at a time, each expected to move the premium with no calculate button pressed.

Published on:

A calculator that updates as you type is a nice interaction and a difficult thing to test, because the absence of a submit button means there is no single moment to assert against.

This use case changes three inputs on the Policybaazar calculator and checks the premium after each.

The contract this flow keeps

Each input is changed on its own, which is what makes the effect of each attributable.

  • The baseline - age 30, ten million cover, 6,100.00 a year and 508.00 a month.
  • Age alone - raising it to 45 takes the premium to 11,500.00.
  • Cover alone - halving the cover takes it to 5,750.00.
  • Tobacco alone - the loading takes it to 8,913.00 with a badge explaining why.

Changing one input at a time is the discipline that makes this useful. Changing two and asserting once tells you the calculator responded, not which input it responded to.

Note

Note: Asserting that a value changed without any button being pressed is how you test a reactive form rather than a submitted one. Try it on TestMu AI. Start for free

The objective in plain English

The second step states explicitly that no calculate button is pressed, which is the behaviour under test rather than an incidental detail.

---
mode: testing
url: https://my-testing-repo-main.vercel.app/policybazaar-clone-app/calculator?reset=true
max_steps: 40
tags: [policybazaar, insurance, calculator]
---

# Policybaazar 27.4: Premium calculator

Catalog objective: adjust the age and cover in the calculator and verify the premium updates.
Key assertion: the premium recalculates on each change.

## Verify the starting premium
Verify "Age used" reads 30, "Cover" reads "₹10,000,000.00", "Insurer" reads "Meridian Life", "Annual premium" reads "₹6,100.00" and "Monthly equivalent" reads "₹508.00".

## Change the age
Set "Age (exact)" to "45" and verify "Annual premium" immediately recalculates to "₹11,500.00" with no Calculate button pressed.

## Change the cover
Select "₹5,000,000.00" in "Life cover" and verify "Annual premium" recalculates to "₹5,750.00".

## Apply the tobacco loading
Tick "Tobacco user" and verify "Annual premium" recalculates to "₹8,913.00" with a badge reading "Tobacco loading applied".

The tobacco step asserts the badge as well as the figure, so a loading applied without explanation is distinguishable from one applied correctly.

Assertion by assertion

A baseline and three isolated changes.

StepWhat it proves
Verify the starting premiumAge, cover, insurer, annual and monthly all render
Change the ageThe premium recalculates with no submit action
Change the coverA second input independently moves the premium
Apply the tobacco loadingA third input applies a loading and explains it

Asserting the monthly equivalent alongside the annual premium in the baseline covers a conversion that is easy to get wrong and easy to overlook.

Next-generation test execution with TestMu AI

Putting it in CI

kane-cli testmd run tests/policybazaar/premium-calculator_test.md

Add a change that should not move the premium, since a calculator that recalculates on every input including irrelevant ones is its own kind of bug.

Reactive forms are where a plain English step is most convenient, because there is no submit to wait on. How assertions resolve on a live page explains why that works, and browser agents is useful background.

Author

...

Bhawana

Blogs: 75

  • Twitter
  • Linkedin

Bhawana is a Community Evangelist at TestMu AI with over 3 years of experience creating technically accurate, strategy-driven content in software testing. She has authored 50+ blogs on test automation, cross-browser testing, mobile testing, and real device testing. She also serves as Product Marketing Manager for Kane CLI, the command-line tool that runs browser automation from the terminal using natural-language flows in a real Chrome browser. Bhawana is certified in KaneAI, Selenium, Appium, Playwright, and Cypress, reflecting her hands-on knowledge of modern automation practices. On LinkedIn, she is followed by 6000+ QA engineers, testers, AI automation testers, and tech leaders.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Premium Calculator FAQs

Did you find this page helpful?

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests