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 CLIPayments

Test cash on delivery checkout

Take an order through checkout on COD, including the handling fee and the order status that comes with it.

Published on:

Cash on delivery is the default payment method for a large share of Indian ecommerce orders and it behaves differently from card checkout at every stage: a handling fee, no payment capture, and an order status that means something other than paid.

This use case runs the COD path on the Flipkort checkout. Four steps, 179 seconds, all passed.

Failure modes in this flow

COD bugs are mostly status bugs. The order goes through, the warehouse picks it, and the record says something the finance system reads incorrectly.

  • The handling fee is missing or wrong - 25.00 is added for COD, and a total without it undercharges every order.
  • The total ignores the fee - the fee renders as a line but the payable amount does not move.
  • The status reads as paid - a COD order marked paid on creation misreports revenue until the courier reconciles.

The fourth step asserts the status string in full, "Confirmed, pay on delivery", rather than checking that a confirmation page appeared. That is the assertion that catches the third failure mode.

Note

Note: One test file per payment mode keeps each failure attributable, and Kane CLI runs them in parallel when you need the whole set checked at once. TestMu AI gives you free runs. Try free!

Writing the objective

The first step compresses search, product selection, size choice and add to cart into one instruction, because none of that is what this test is about. The COD-specific assertions get a step each.

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

# Flipkort 3.3: COD checkout

Catalog objective: complete a checkout choosing cash on delivery.
Key assertion: confirmation shows COD as the payment mode.

## Add an item to the cart
Type "running shoes" into the search box, click "Search", click "Trailburst Running Shoes", click size "8", then click "Add to cart" and verify the cart shows "Trailburst Running Shoes".

## Go to checkout
Click "Place order" and verify the checkout page shows a "Payment mode" section listing "Cash on Delivery".

## Choose cash on delivery
Click "Cash on Delivery" and verify the price details show a "COD handling fee" of "₹25.00" and a total payable of "₹2,564.00".

## Confirm the order
Click "Confirm COD order" and verify the page shows "Order confirmed" with a payment mode of "Cash on Delivery" and an order status of "Confirmed - pay on delivery".

That is a deliberate trade. Setup steps are cheap to compress, and the steps carrying the actual subject of the test stay separate so a failure points at the right thing. Run it with:

kane-cli testmd run tests/flipkart/cod-checkout_test.md

Running it locally

Four passes, evenly spread across 179 seconds with no single step dominating. Selecting cash on delivery was the slowest at 47.1 seconds, since it re-renders the price details before the assertion can run.

---
test: ../cod-checkout_test.md
status: passed
started: 2026-09-15T09:46:31.154Z
duration_s: 179
session_id: 89f38865-4867-4cbb-86d6-71f84554dd1c
---

# Flipkort 3.3: COD checkout - Result

## Add an item to the cart ✓ passed (51.4s)
md5: ed5285972cd8255b8687e19c26b2bd3f
Type "running shoes" into the search box, click "Search", click "Trailburst Running Shoes", click size "8", then click "Add to cart" and verify the cart shows "Trailburst Running Shoes".

## Go to checkout ✓ passed (36.5s)
md5: 5f6d47df5841d82aba28bb53e1bd2b50
Click "Place order" and verify the checkout page shows a "Payment mode" section listing "Cash on Delivery".

## Choose cash on delivery ✓ passed (47.1s)
md5: 379f2002dacafed22440b6cbffee7418
Click "Cash on Delivery" and verify the price details show a "COD handling fee" of "₹25.00" and a total payable of "₹2,564.00".

## Confirm the order ✓ passed (40.6s)
md5: 91b5ede54e61528b0b0f6c10a287bec1
Click "Confirm COD order" and verify the page shows "Order confirmed" with a payment mode of "Cash on Delivery" and an order status of "Confirmed - pay on delivery".
StepResultDuration
Add an item to the cartPassed51.4s
Go to checkoutPassed36.5s
Choose cash on deliveryPassed47.1s
Confirm the orderPassed40.6s
Next-generation test execution with TestMu AI

Putting it in CI

You get a payment mode test that checks the fee, the arithmetic and the resulting order state, which is the set of things a COD bug actually breaks. It runs in three minutes without anyone handling cash.

Run it alongside the card path rather than instead of it, since the two diverge after the payment selection. Running Kane CLI in CI covers executing several flows per build, and evidence based QA covers what to keep from each run.

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

COD Checkout 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