Power Your Software Testing with AI Agents and Cloud
The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.
- TestMu AI (Formerly LambdaTest)
- /
- Use Cases
- /
- Test UPI intent validation with two rejection cases
Test UPI intent validation with two rejection cases
A malformed address and an unknown one fail for different reasons. The test checks both errors before the successful payment.
Published on:
UPI carries the majority of digital payment volume in India, and the entire flow depends on one text field holding an address that resolves to a real account.
This use case tests that field properly on the Razorpie clone: two different rejections with two different messages, then the path that works.
The flow under test
A malformed address and an unresolvable one are different failures, and collapsing them into one error message is itself the bug.
- Malformed - "priya" has no bank handle, which is a format problem the page can detect locally.
- Unknown - "nobody@okhdfb" is well formed but resolves to no account, which requires a lookup.
- Valid - "priya@ybl" verifies and produces a confirmation naming the address.
The two errors are asserted by their exact text because they tell the customer different things to do. A format error means fix the typing; an unknown address means check with the recipient. One generic message for both leaves the customer guessing.
Note: Testing each rejection with its own expected message is how you prove validation is specific rather than merely present. Try it on TestMu AI. Start for free
The test file
The field is cleared and replaced between attempts rather than appended to, which is what a customer correcting a mistake actually does and what a stale-state bug depends on.
---
mode: testing
url: https://my-testing-repo-main.vercel.app/razorpay-clone-app?reset=true
max_steps: 45
tags: [razorpay, payments, upi]
---
# Razorpie 11.2: UPI intent
Catalog objective: choose UPI and verify the intent screen with VPA entry works.
Key assertion: VPA validation and the success state both render.
## Open the UPI intent screen
Click "Pay now" on "Cotton kurta set", make sure "UPI" is selected, and verify a "UPI ID" field with a "Verify UPI ID" button is shown.
## Verify a malformed VPA is rejected
Type "priya" into "UPI ID", click "Verify UPI ID", and verify an inline error reads "Enter a valid UPI ID, for example name@bank."
## Verify an unknown VPA is rejected
Replace the UPI ID with "nobody@okhdfb", click "Verify UPI ID", and verify an inline error reads "No account found for that UPI ID."
## Verify a good VPA succeeds
Replace the UPI ID with "priya@ybl", click "Verify UPI ID", verify a badge reads "UPI ID verified - request will be sent to priya@ybl", then click "Pay ₹1,899.00" and verify a green banner titled "Payment successful" appears.The final step chains verification and payment together, since by that point the flow is known to be working and the remaining question is whether a verified address completes.
Step by step coverage
Three of the four steps are negative or boundary cases, which is the right balance for a test about a validation rule.
| Step | What it proves |
|---|---|
| Open the UPI intent screen | The address field and its verify action are present |
| Verify a malformed VPA is rejected | A format error is detected and reported specifically |
| Verify an unknown VPA is rejected | A well formed address with no account is reported differently |
| Verify a good VPA succeeds | A valid address verifies and the payment completes |
Replacing the value between attempts also tests something the file does not state explicitly: that a previous error clears when the input changes.
Running it
kane-cli testmd run tests/razorpay/upi-intent_test.mdWhat you end up with is a validation test that distinguishes between failures instead of treating them as one red state.
Validation rules are the most mechanical thing to generate a suite for, and the most tedious to write by hand. Generating validation cases covers that, and exact string assertions covers pinning each message.
Author
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.
UPI Validation 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




