QA Guide
This guide outlines the comprehensive testing procedures and checklists for the CRM Product. Use this to verify system stability before any release.
Pre-Release Checklist
Core System
- [ ] Authentication: Verify tenant API keys and WABA credentials load correctly.
- [ ] Quota System: Ensure message sending is blocked when quota is 0.
- [ ] Latency: Response time should be under 2 seconds for cached queries.
AI & Orchestration
- [ ] Intent Classification: Verify correct routing for "Book a table" vs "Order food".
- [ ] Context Retention: Ensure the bot remembers user name and previous context across 5+ turns.
- [ ] Hallucination Check: Ask about non-existent products; bot should politely decline.
Testing Scenarios
1. Booking Flow (Booking Agent)
Goal: Verify end-to-end booking creation.
- User: "I want to book a futsal court."
- Bot: "Sure! For which date and time?"
- User: "Tomorrow at 7 PM."
- Bot: "Checking availability... Court A is available. Should I book it?"
- User: "Yes, please."
- Bot: "Booking confirmed! Your Booking ID is #123."
- Verification: Check
bookingstable for new entry.
- Verification: Check
Edge Cases:
- [ ] Double Booking: Try to book the same slot again. Bot should say "Slot unavailable."
- [ ] Past Date: Try to book for "Yesterday". Bot should reject it.
2. Order Flow (Transaction Agent)
Goal: Verify product search and order placement.
- User: "Do you have chocolate cake?"
- Bot: "Yes! We have 'Chocolate Cake' (20cm) for Rp 150.000. Stock: 5."
- User: "I'll take 2."
- Bot: "Okay, 2 Chocolate Cakes. Total is Rp 300.000. Pickup or Delivery?"
- User: "Pickup."
- Bot: "Order created! Order #ORD-001. Please pay at the counter."
- Verification: Check
orderstable and verifystock_quantityreduced by 2.
- Verification: Check
Edge Cases:
- [ ] Out of Stock: Order more than available quantity. Bot should warn user.
- [ ] Cancel Order: "Cancel my order". Verify stock is restored.
3. Knowledge Base (RAG)
Goal: Verify answers from uploaded documents.
- User: "What is your refund policy?"
- Bot: (Retrieves answer from
policy.pdf) "We offer full refunds within 24 hours of purchase." - User: "What about cancellations?"
- Bot: "Cancellations must be made 2 hours in advance."
Edge Cases:
- [ ] Irrelevant Question: "Who is the president?" -> Bot: "I can only answer questions about [Business Name]."
- [ ] Empty KB: Ask question with no docs uploaded. Bot should handle gracefully.
4. Conversation Management
Goal: Verify session handling and handoff.
- User: "I need to speak to a human."
- Bot: "I will transfer you to an agent. Please wait."
- Verification:
handoff_requestedflag set totruein DB.
- Verification:
- Agent: (Sends message via dashboard) "Hi, how can I help?"
- User: "Thanks."
Automated Testing Commands
Run these commands to validate services locally:
bash
# Test Booking Service
curl http://localhost:3008/health
# Test Order Service
curl http://localhost:3009/health
# Test Message Sender
curl http://localhost:3006/health