Problem
PharmaConnect is a multi-tenant B2B pharmaceutical distribution and logistics platform. Distributors, pharmacies, drivers, and administrators operate across a unified system where catalog pricing, discounts, checkout, delivery batches, invoicing, payment reconciliation, returns, and credit notes govern commercial transactions. Defects in such an architecture risk privilege escalation, cross-tenant data tampering, and financial corruption.
The platform required rigorous end-to-end verification of its full order-to-cash lifecycle and authorization boundaries prior to release.
Context
Production engagement leading QA across 15 functional modules, testing directly against staging and API gateways with reproduction evidence and retest verification.
My Role
Lead QA: authored journey-based test plans, led multi-persona execution, investigated defects at the browser network and API level with curl, validated database persistence, and retested fixes through to resolution.
Architecture & Coverage Scope
Testing covered 6 user roles (Pharmacy Manager, Distributor Manager, Driver, System Admin, and public visitor personas) across 15 core modules:
- •Order-to-delivery: catalog search, shopping cart, checkout, order management, logistics dispatch, route execution, and proof of delivery
- •Finance & billing: invoicing, partial payments, ledger settlement, overdue derivation, and returns/credit notes
- •Catalog & pricing: master catalog, distributor tiered pricing, volume discounts, and promotional validity windows
- •Access & tenant isolation: authentication, onboarding workflows, RBAC role assignments, partnerships, and multi-tenant isolation boundaries
- •Reporting: dashboards, audit logging, and financial ledgers
Implementation & Journey Matrix
Testing was structured into 20 end-to-end journeys across four functional groups:
- •Order to delivery (6 journeys): Pharmacy checkout, distributor back-office booking, batch dispatching, driver route execution (proof of delivery, GPS, partial delivery), and automated invoice generation.
- •Payments and finance (4 journeys): Negative RBAC authorization checks, three-stage partial settlements, ledger reconciliation against dashboards, and cross-tenant invoice boundary audits.
- •Returns (4 journeys): Return authorizations with attachment validation, stock dispositioning (restock vs. disposal), driver pickups, and credit note ledger issuance.
- •Security and boundaries (6 journeys): Distributor vs. driver boundaries, deactivated/unverified account isolation, cross-entity tenant isolation sweeps, RBAC permission matrices, and frontend-versus-backend parity testing.
Reliability & Verification Findings
Systematic testing documented 110+ defects (108 logged in the export sheet) across 15 modules, with 75 defects verified and closed after rigorous retesting. Network traffic and database inspections separated UI presentation bugs from severe backend authorization faults.
Critical findings uncovered during testing included:
- •Authentication & session bypass: Deactivated users remained able to authenticate and access active sessions; unverified accounts bypassed verification requirements without completing OTP or admin approval gates.
- •Privilege escalation: Distributor Managers were able to assign themselves and others System Admin permissions via direct API manipulation, bypassing UI restrictions.
- •Cross-tenant account tampering: Account isolation gaps allowed users to modify settings and view resources belonging to separate tenant organizations.
- •Credential & token exposure in audit logs: Audit trails inadvertently recorded live refresh tokens, active session tokens, one-time verification codes (OTPs), and password hashes in plaintext logs.
- •Financial & ledger corruption: Payments exceeding the outstanding balance were accepted and corrupted revenue ledgers; invoice line quantities doubled when re-batching orders from cancelled delivery runs; expired-discount pricing was honored during checkout.
- •Checkout workflow blockers: Phone input formatting defects blocked submission across specific international pharmacy numbers.
Results & Impact
- •20 end-to-end journeys executed across 6 user roles (17 passed, 3 failed security sweeps leading to critical remediation)
- •110+ defects documented with step-by-step reproduction scripts and API-level payload evidence
- •75 defects verified and closed through regression retesting
- •Prevented unauthorized privilege escalation, ledger balance corruption, and credential leakage before release