75 lines
2.1 KiB
Markdown
75 lines
2.1 KiB
Markdown
# Testing and acceptance
|
|
|
|
## Test layers
|
|
|
|
### Unit/domain
|
|
|
|
- vehicle status derivation;
|
|
- return mileage handling;
|
|
- duplicate scoring and merge rules;
|
|
- booking overlap detection;
|
|
- status conflict rules;
|
|
- outbox retry schedule;
|
|
- RAG answer-state mapping.
|
|
|
|
### Database/integration
|
|
|
|
- migrations from empty database;
|
|
- constraints and transaction rollback;
|
|
- concurrent return submissions;
|
|
- idempotency replay;
|
|
- customer merge atomicity;
|
|
- outbox claim concurrency;
|
|
- demo reset determinism.
|
|
|
|
### API contract
|
|
|
|
Validate OpenAPI and test authentication, role boundaries, filtering, error shape and service-token routes.
|
|
|
|
### External adapters
|
|
|
|
Use contract tests with fake HTTP servers for RAGcore, n8n and MCP Hub-facing APIs. Test timeout, unavailable, malformed response and success.
|
|
|
|
### Playwright
|
|
|
|
The five-minute demo must be automated:
|
|
|
|
1. login as Operations Manager;
|
|
2. verify dashboard metrics are loaded;
|
|
3. open active demo booking;
|
|
4. register odometer-regression return;
|
|
5. verify issue and queued workflow;
|
|
6. resolve/merge the duplicate customer scenario;
|
|
7. ask the damage procedure question and inspect citations;
|
|
8. inspect audit entries;
|
|
9. verify responsive navigation at mobile width.
|
|
|
|
## Clean-checkout acceptance
|
|
|
|
From a clean checkout:
|
|
|
|
1. copy `.env.example` to `.env`;
|
|
2. run one documented bootstrap command;
|
|
3. migrations and seed complete automatically or via one explicit command;
|
|
4. web and API health become green;
|
|
5. all automated tests pass;
|
|
6. no secret is required for the demo provider;
|
|
7. RAGcore unavailable state is clear and operational pages still work;
|
|
8. n8n unavailable does not roll back a vehicle return;
|
|
9. MCP provider endpoints are read-only and service-protected;
|
|
10. no visible route contains dead actions or placeholder data.
|
|
|
|
## Final evidence
|
|
|
|
Create `artifacts/evidence/final-summary.md` containing:
|
|
|
|
- commit/tag;
|
|
- exact commands;
|
|
- test counts;
|
|
- screenshots of the seven main pages;
|
|
- RAGcore success and unavailable evidence;
|
|
- n8n success and retry evidence;
|
|
- MCP tool sample calls;
|
|
- known PoC limitations;
|
|
- truthful portfolio wording.
|