Test Plan: Drop — Fintech Payment App
Performance Test Plan: Drop — Fintech Payment App
Project: Drop — Remittance + QR Payments Version: 1.0 Date: 2026-02-23 Author: John (AI Director) Status: Approved Reviewers: Alem Bašić (CEO)
Document History
| Version | Date | Author | Changes |
|---|---|---|---|
| 0.1 | 2026-02-23 | John | Initial |
1. Performance TestingTest Objectives
This test plan covers testing for Drop MVP + Phase 0.5 Security Hardening (v0.5.0).
Primary objectives:
- Verify that all authentication and onboarding flows (registration, OTP, PIN, login) work correctly for Norwegian residents (age ≥ 18, phone +47)
- Verify that remittance transactions apply correct 0.5% fee across all 6 NOK corridors with mock BaaS
- Verify that QR payments apply correct 1% merchant fee with mock BaaS
- Confirm the pass-through model invariant: Drop NEVER stores user balances or full card data
- Confirm Phase 0.5 security hardening: bcrypt 12 rounds, persistent rate limiting, CSRF, security headers, audit logging
- Validate
that Drop meets theperformanceSLAs defined in the NFR documentundernormalexpectedoperating conditionsload (20040+ concurrentusersusers;ontargetSQLite200MVP; 5,000+ on PostgreSQLfor Phase 1) Determine the SQLite concurrent user limit before migrating to PostgreSQL (target: migrate at 200 concurrent)Identify bottlenecks (bcrypt hashing, DB queries, rate limiter) before production releaseEstablish a performance baseline for regression comparison in future releases
ReferenceOut NFRs:of scope for this plan: BankID docs/BUSINESS-REQUIREMENTS/non-functional-requirements.md— Section 2SCA (Performance)Phase 2), real BaaS payments (Phase 2), real Sumsub KYC (Phase 2), Cards feature (Phase 3), mobile native app (Phase 2).
2. PerformanceFeatures RequirementsUnder ReferenceTest
Registration — 3-step (FR-001) |
||||||
Login ( |
||||||
Transaction ( |
||||||
Rates API (FR-021) |
||||||
Payment — Consumer (FR-030) |
||||||
Registration + QR (FR-031) |
||||||
Limiting (NFR-SEC05) |
||||||
| Input Validation / Security (NFR-SEC06) | ||||||
| DB |
||||||
3. Test TypesScope
3.1In Load Testing — Normal Load SimulationScope
Objective:
- Authentication
Dropmodule:meetsregistration,SLAsOTPunderverification,expectedPINnormalsetup,loadlogin, logout,/api/auth/me - Remittance module:
POST /api/transactions/remittance,GET /api/transactions, exchange rates - QR payments module:
POST /api/transactions/qr-payment,POST /api/merchants,GET /api/merchants/me - Security middleware: rate limiting, CSRF, JWT validation, security headers
- Database compliance: schema assertions (
Norwegiannoremittancebalance,corridornopeakcard_number,traffic)noNormalcvv),loadFKdefinition:constraints,200transaction type enum - Performance benchmarks: bcrypt timing, DB query latency, concurrent
users (SQLite MVP limit) / ~20 requests/secondDuration:10 minutes (after 2-minute ramp-up)Pass criteria:All SLA targets in Section 2 met with ≤ 0.1% error rate3.2 Stress Testing — Beyond Normal CapacityObjective:Find SQLite concurrent user limit; understand failure behavior to plan PostgreSQL migrationStarting point:50 users, increasing by 25 users every 2 minutesStop condition:Errorrate>limit5%checkorthroughput - Regression
> 3,000ms or service crashesPass criteria:System fails gracefully with meaningful error messages (429 rate limit, not 500); data integrity maintained; no double-spend under stress3.3 Spike Testing — Sudden Traffic SurgesObjective:Simulate scenarios like marketing campaigns or media coverage causing sudden user influxBaseline:20 usersSpike to:100 users (5× baseline)Spike duration:2 minutesPass criteria:System recovers to baseline performance within 5 minutes after spike ends; no data corruption3.4 Endurance / Soak Testing — Sustained LoadObjective:Identify SQLite file lock issues, connection pool exhaustion, memory leaks under sustained loadLoad level:50 users (25%testing of200allconcurrent26limit)APIDuration:routes - Input
hoursvalidation:MetricsXSS,toSQLwatch:injection,SQLiteboundarywriteages,queueUnicodedepth,names,memorylongusagepasswords
3.5Out Scalabilityof Testing — Phase 1 PostgreSQL MigrationScope
Objective: Verify PostgreSQL migration enables proportional scaling for Phase 1 target (5,000+ users)
Test: Step load from 200 to 1,000 concurrent users on PostgreSQL staging
Pass criteria: P95 stays under 500ms as concurrent users scale; no P99 explosion
Note: PostgreSQL not yet deployed — Phase 1 task. This plan establishes the baseline for comparison.
4. Load Profiles
| Real BaaS PISP/AISP payments | ||||||
| Real Sumsub KYC webhooks | ||||||
| Cards feature | ||||||
| Mobile native app | ||||||
| Load |
||||||
Think time simulation: Realistic user think time of 2–5s (Norwegian users reviewing remittance details before confirming)
5.4. Test EnvironmentSchedule & Milestones
NOTE: Performance tests run against a representative staging environment. SQLite MVP limits are tested on Fly.io staging (1× shared CPU, 256MB RAM). Phase 1 PostgreSQL tests require production-equivalent environment.
| Builder agent | ||
| Playwright E2E authoring complete | Before Phase 0.5 release | Builder agent |
| Regression testing complete (all 26 routes) | Before Phase 0.5 release | Validator agent |
| Performance benchmarks run | Before Phase 0.5 release | Builder agent |
| UAT start (CEO walkthrough) | TBD — before Phase 1 launch | John |
| UAT sign-off | TBD | Alem Bašić (CEO) |
| Go/no-go decision | Before Phase 1 launch | Alem Bašić (CEO) |
| Production release | Phase 1 (BaaS partner confirmed) | John (AI Director) |
5. Resource Allocation
| Resource | Role | Testing Activities | Availability |
|---|---|---|---|
| Builder Agent (Claude Sonnet) | Developer / QA | Unit + integration + E2E authoring | Per task |
| Validator Agent (Claude Sonnet, read-only) | Code review + test verification | Per task | |
| John ( |
Tech Lead | Test strategy, UAT coordination | Continuous |
| Alem Bašić (CEO) | Product Owner / |
CEO UAT walkthrough | TBD |
6. Entry Criteria
Testing may begin when:
- Feature development is code-complete (
landing)all tickets in "Ready for QA") - Unit tests passing (≥ 100% pass rate on unit + integration suite)
- Build artifact deployed to staging (https://drop-staging.fly.dev/)
- Staging environment is stable (health checks passing)
- Test data is seeded (
npm run db:seed) - Previous known blocking bugs resolved (Mission Control backlog reviewed)
7. Exit Criteria
Testing is complete when:
- All 14 test files execute cleanly
- ≥ 100% of unit + integration tests pass
- All Critical and High test cases in AC-001–AC-092 pass
- Code coverage ≥ 80% overall; 100% for auth + transaction paths
- All Playwright E2E tests passing on staging (user-flows, full-flows, input-chaos)
- Performance benchmarks meeting NFR-P01..P06 targets (api-benchmarks.test.ts green)
- DB compliance tests passing (db.test.ts: no balance, no card_number/cvv columns)
- UAT sign-off obtained from Alem Bašić (CEO) — or conditional approval documented
- Security audit score ≥ 80/100 (post Phase 0.5 hardening)
Exceptional circumstances: If exit criteria cannot be met, a documented risk acceptance from Alem Bašić (CEO) is required.
8. Test Strategy Summary Per Type
| Type | Approach | Tool | Owner | Gate |
|---|---|---|---|---|
| Unit | White-box — bcrypt, JWT, fee calc, validators | Vitest | Builder | Blocks merge |
| Integration | Real SQLite test DB — 26 API routes, DB schema | Vitest | Builder | Blocks merge |
| E2E | Critical journeys on staging — 3 Playwright projects | Playwright | Builder | Blocks release |
| Regression | All 26 routes via api-endpoints.test.ts | Vitest | Builder | Blocks merge |
| Performance | api-benchmarks.test.ts — bcrypt timing, query latency | Vitest bench | Builder | Warning → release |
| Security | npm audit + validation.test.ts + middleware.test.ts |
Vitest + GitHub Actions | Builder | Blocks merge |
| DB compliance | db.test.ts — schema assertions | Vitest | Builder | Blocks merge |
| UAT | CEO business scenario walkthrough | Manual | Alem Bašić | Blocks Phase 1 launch |
9. Test Environment Requirements
| Environment | Purpose | URL | Access Needed |
|---|---|---|---|
| Local dev | Unit/integration | http://localhost:3000 |
Builder agent |
| Staging (Fly.io, Stockholm) | E2E, regression, UAT | https://drop-staging.fly.dev/ |
Team + Alem |
| Performance | Benchmarks | Local (api-benchmarks.test.ts) | Builder agent |
LoadEnvironment generator:requirements:
Tool:StagingVitestmustbenchmarkshaveNEXT_PUBLIC_SERVICE_MODE=mock(api-benchmarks.test.ts)noforrealmicro-benchmarksBaaS)LoadStaginggeneratorSQLiteforDBintegration:seededk6withscriptssyntheticintestdata (no real PII)infrastructure/performance/LoadMonitoringgenerator location: Local or CI runnerenabled (same region asFly.ioStockholm)metrics)
6.10. Test Data Requirements
| Data |
Volume | Responsible | |
|---|---|---|---|
npm run db: |
Builder agent | ||
npm |
Builder agent | ||
npm |
Builder agent | ||
DatabaseData sizecleanup: atAll test time:data ~50MBremoved SQLiteafter file
Data preparation: npmtest run db:seed:perfvia Vitest afterEach (estimatedteardown. time:Staging ~2DB minutes)reset between major test runs.
7.11. ToolsRisk-Based &Test InfrastructurePrioritization
| Mitigation | ||||
|---|---|---|---|---|
|
db.test.ts always asserts no balance column | |||
P1 |
Full auth.test.ts suite + middleware.test.ts | |||
| Unit tests for 0.5% and 1% fee calculations | ||||
| Double-spend race condition | Low | Critical | P1 | Transaction lock integration test |
| Rate limiter reset on server restart | Medium (was a bug) | High | P2 | middleware.test.ts with persistent limiter |
| BaaS mock mode leaking to production config | Low | High | P2 | CI check for NEXT_PUBLIC_SERVICE_MODE env var |
| SQLite |
|
Script location: src/drop-app/__tests__/api-benchmarks.test.ts (Vitest benchmarks)
8. Key Metrics to Capture
Response Time
Throughput
Error Metrics
Resource Utilization (Fly.io Metrics)
Database Query Performance (NFR-P04)
9. SLA Targets Per Endpoint (from api-benchmarks.test.ts)
| ||||
| ||||
| ||||
| ||||
| ||||
| ||||
10. Baseline Establishment (api-benchmarks.test.ts Results)
Baseline established: Phase 0 MVP on local dev (SQLite in-memory)
Regression threshold: Alert if any metric degrades > 15% vs baseline
11. Test Execution Schedule
12. ResultsDependencies Analysis& TemplateAssumptions
TestDependencies:
- Staging environment provisioned and accessible at https://drop-staging.fly.dev/
- Mock BaaS and Mock Sumsub configured in staging environment variables
- Playwright installed in CI (
npx playwright install)
Assumptions:
- Feature
{DATE}requirementsTester:will not change during the testing phase without John (AI Director) review - All Builder
Agentagent PRs include tests alongside code - Validator agent reviews test files before merge
- BaaS partnership not confirmed — mock mode accepted for MVP/staging
13. Defect Management Process
Bug tracker: Mission Control tasks + ValidatorSlack Agent#drop-bugs on alai-talk.slack.com
Scenario:Severity levels: Load (normal) / Stress / Spike / Soak
Build / Version: v{VERSION}
Critical |
Fix before release — | ||||||
High |
|||||||
| Low |
Summary:Bug lifecycle:
- Open
Peak→concurrent users: {PEAK_USERS}Peak throughput: {PEAK_RPS} req/sTest duration: {DURATION} minTotal requests: {TOTAL_REQUESTS}Total errors: {TOTAL_ERRORS}
Notable findings:
SQLite concurrent user limit reached at: {LIMIT} usersRecommend PostgreSQL migration at: {TRIGGER} concurrent usersAssigned (perMissionNFR-S02)Control)
In Progress → Fixed → Verified by Validator → Closed
Recommendation:Triage cadence: PassOn /each FailPR/commit /(CI-driven); Conditional pass with PostgreSQL migration requireddaily for Phaseactive 1test phase
13. Bottleneck Identification Process
Drop-specific bottleneck investigation order:
1. Check bcrypt timing → bcrypt > 1,000ms P95 = config issue (rounds too high OR long password pre-check missing)
2. Check SQLite write queue → "database is locked" errors = concurrent write saturation → trigger PostgreSQL migration
3. Check rate limiter DB table → rate_limit_requests table query slow = add index or migrate to Redis
4. Check transaction lock → SELECT FOR UPDATE timeout = deadlock in double-spend prevention
5. Check mock BaaS response → mock service timeout = CI/staging environment issue
6. Check Fly.io metrics → CPU > 90% = scale up instance; Memory > 200MB = Node.js leak check
14. RemediationTest TrackingDeliverables
| Test |
||||||
| Test execution results | Vitest + Playwright CI reports | Per PR | CI | |||
| Performance test report | api-benchmarks.test.ts output | Per release | Builder agent | |||
| UAT sign-off | uat-signoff.md | Before Phase 1 | Alem Bašić | |||
| Test summary report | Markdown (per release) | Per release | Validator agent |
Related Documents
- Test Strategy
Non-FunctionalTestRequirementsCase Template- E2E Test Plan
- Performance Test Plan
- Definition of Done
- UAT Sign-off
- Testing Guide
- Test Inventory
Approval
| Role | Name | Date | Signature |
|---|---|---|---|
| Author | John (AI Director) | 2026-02-23 | Approved (AI) |
| QA Lead | Validator Agent | 2026-02-23 | Approved (AI) |
| AI Director (John) | John | 2026-02-23 | Approved |
| CEO (Alem) | Alem Bašić | TBD |