1Business context
TradeX is a simulated stock-trading platform. Prices change live; orders must respect buying power, holdings and limit-price bands, and every trade must reconcile cash and holdings including brokerage.
A watchlist with prices that tick every second, market and limit orders with buying-power, holdings and price-band checks, a confirm step, and a portfolio with live P&L. Simulated — no real money.
2Users & roles
- 👤 Retail investor (TX1001 / Trade@123, PIN 2468) — watches symbols, buys, sells and reviews the portfolio (starts with ₹5,00,000)
3Modules & screens
| Screen | Route | What it does |
|---|---|---|
| Sign-in gate | /apps/trading | Client ID TX1001 / Trade@123, then trading PIN 2468; any page opened while signed out shows the login and returns there afterwards |
| Watchlist | /apps/trading | Live prices, symbol search, add/remove |
| Trade ticket | /apps/trading/trade/[sym] | Buy/sell, market/limit, quantity, review and confirm |
| Portfolio | /apps/trading/portfolio | Holdings, cash and open orders |
4Main end-to-end journey
Buy then partly sell
- Sign in with TX1001 / Trade@123 and PIN 2468
- Add TATAMOTORS to the watchlist
- Trade INFY: buy 10 at market and confirm
- Check the portfolio
- Sell 4 INFY
- Check the portfolio again
Expected: Order filled; holding 10 then 6; cash reconciles including ₹20 brokerage per order
5Business rules & validations
- Login + trading PINBeginner
Client ID + password (tx-login-id, tx-password, tx-login), then a 4-digit PIN (tx-code, tx-verify). Wrong details show attempts left in tx-login-error; 3 failures lock the form (tx-unlock).
- Asserting live dataIntermediate
price-* changes every second — assert format (₹ + 2 decimals) or that it changed, never an exact value.
- Search & watchlistBeginner
symbol-search → add-<SYM> adds a watch-row; remove-<SYM> deletes it.
- Quantity validationBeginner
0, decimals or text in order-qty show error-order-qty.
- Buying powerIntermediate
Order more than cash allows; the error tells you the affordable quantity.
- Limit bandIntermediate
A limit price more than 10% away from LTP is rejected in error-limit-price.
- Buy then sellAdvanced
Buy at market, then sell part of the holding; holding-qty-<SYM> and cash reconcile (with ₹20 brokerage).
- Open limit ordersAdvanced
Place a limit order near LTP; it may fill on its own — poll order-status or cancel-<id> it.
- Sell more than heldBeginner
side-sell with a quantity above your holding shows “You only hold N share(s)”.
6Test data & credentials
- URL
- /apps/trading
- Login
- TX1001 / Trade@123
- Trading PIN
- 2468
- Starting cash
- ₹5,00,000
- Brokerage
- ₹20 / order
- Limit band
- ±10% of LTP
7Glossary
- LTP
- Last traded price
- Limit band
- Limit prices must be within ±10% of LTP
- Brokerage
- ₹20 charged per order
8Watch-outs for automation
- ⚠️Sign in first (or reuse a saved session) — every page is behind the login
- ⚠️Prices change every second — assert formats or changes, never exact values
- ⚠️Limit orders may fill on their own — poll status
- ⚠️Quantity must be a whole number above 0
9Suggested test strategy
1 · Smoke
4
P1 positive and end-to-end cases — run on every build.
2 · Regression
16
All cases, incl. 5 negative and 2 edge — run before release.
3 · End-to-end
3
Full user journeys — run nightly.
Start with these smoke cases
- TRADEX-01 — Sign in with trading PIN
- TRADEX-03 — Buy at market
- TRADEX-04 — Buy then sell
- TRADEX-E2E-01 — Buy then partly sell