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 CLILoyalty

Test that a loyalty points balance renders correctly

Three read-only assertions that prove the balance is a real number backed by a ledger, not an error state dressed as a zero.

Published on:

A rewards balance failing open is worse than a rewards page failing closed. A zero renders like a number, the shopper assumes their points are gone, and the support ticket arrives long before anyone notices the service behind it is down.

This use case is the shortest in the set: three read-only assertions on the Flipkort rewards page, 117 seconds, all passed.

The checks that matter

A read-only page needs a different kind of test. There is nothing to submit, so the assertions have to establish that the number on screen is backed by something rather than merely present.

  • The balance and its state - 1240 available, alongside a badge reading "Balance available" rather than an error or empty state.
  • The ledger behind it - named transactions with signed amounts, an earn of +48 against an order and a redemption of -200.
  • The lifetime totals - separate aggregate values that come from a different query than the balance.

Checking the badge alongside the number is what distinguishes this from a presence check. A page that renders 0 with an error badge and a page that renders 0 with an available badge are different situations, and only one of them is a bug.

Note

Note: Short read-only checks like this cost under two minutes and are the cheapest thing to add to a release gate. Start running them on TestMu AI. Start for free

The same flow as a test file

The step ceiling is 35 here rather than the 45 used for the checkout flows, since there is nothing to submit. Front matter is the right place to keep that guard tight on a short test.

---
mode: testing
url: https://my-testing-repo-main.vercel.app/flipkart-clone-app/rewards?reset=true
max_steps: 35
tags: [flipkart, rewards]
---

# Flipkort 3.4: SuperCoins balance

Catalog objective: open the rewards section and verify the SuperCoins balance renders.
Key assertion: the balance is a number, not an error state.

## Confirm the balance renders as a number
Verify the SuperCoins page shows an available balance of "1240" and a badge reading "Balance available".

## Confirm the ledger backs the balance
Verify the coin history lists an entry "Order OD1180 - earned" with "+48" and an entry "Redeemed on Nexa case" with "-200".

## Confirm lifetime totals are present
Verify the page shows "Lifetime earned" with the value "140" and "Lifetime redeemed" with the value "200".

Run it with:

kane-cli testmd run tests/flipkart/supercoins-balance_test.md

Run output

Three passes in 117 seconds. The last step is the slowest at 52.6 seconds despite being a pure read, because it asserts two separate labelled values on the page.

---
test: ../supercoins-balance_test.md
status: passed
started: 2026-09-15T09:49:46.747Z
duration_s: 117
session_id: 73c7b9df-c7be-4fa9-bf1f-f3b90f535040
---

# Flipkort 3.4: SuperCoins balance - Result

## Confirm the balance renders as a number ✓ passed (32.1s)
md5: 4090e3d6bfa8213ff457c1024485510a
Verify the SuperCoins page shows an available balance of "1240" and a badge reading "Balance available".

## Confirm the ledger backs the balance ✓ passed (28.1s)
md5: 1ae01c583a108f6973525ee5c06fea38
Verify the coin history lists an entry "Order OD1180 - earned" with "+48" and an entry "Redeemed on Nexa case" with "-200".

## Confirm lifetime totals are present ✓ passed (52.6s)
md5: 3366136371deaa64fff91284c6bff641
Verify the page shows "Lifetime earned" with the value "140" and "Lifetime redeemed" with the value "200".
StepResultDuration
Confirm the balance renders as a numberPassed32.1s
Confirm the ledger backs the balancePassed28.1s
Confirm lifetime totals are presentPassed52.6s

The test asserts the values the page displays. It does not reconcile them against each other, which is a deliberate limit: reconciliation belongs in a service level check against the loyalty API, not in a browser test.

Next-generation test execution with TestMu AI

Taking it further

The result is a two-minute guard on a page that usually gets none, written so anyone can see what it claims. Add one per account state you care about, such as a zero balance or a new account, by copying the file and changing the expected values.

For the reconciliation this test deliberately leaves out, drive the loyalty service directly in the same run. API calls from Kane CLI covers chaining a request alongside the UI steps, and the Kane CLI introduction is the starting point if you are setting this up for the first time.

Author

...

Bhawana

Blogs: 77

  • 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

Loyalty Balance Testing 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