QA Quick Reference: Scola LMS Testing Cheat Sheet¶
⚡ 1-Page Command Reference untuk Daily QA Work
🚀 P0 Fast Path (2 Minutes)¶
# Setup
cd /home/scola/odoo/scola-fe-v2
ps aux | grep -E "(odoo-bin|vite)" | grep -v grep || echo "⚠️ Start services first!"
# Proven local baseline: FE localhost -> dev backend scoladev
E2E_ODOO_URL=https://be-dev.gcgscola.id npx playwright test tests/e2e/setup-auth.spec.ts --project=setup --workers=1
E2E_ODOO_URL=https://be-dev.gcgscola.id npm run test:e2e:smoke:starter
# Run P0 critical flows
npx playwright test tests/e2e/flow --grep "@p0"
# Expected: ✅ 11 passed (2.0-2.4 min)
# Debug failures
npx playwright show-trace test-results/<failed-test>/trace.zip
🔧 Environment Check (30 Seconds)¶
# All-in-one health check
cd /home/scola/odoo
ps aux | grep odoo-bin | grep -v grep && echo "✅ Backend OK" || echo "❌ Backend DOWN"
ps aux | grep vite | grep -v grep && echo "✅ Frontend OK" || echo "❌ Frontend DOWN"
# Reset database (if needed)
make qa-reset && make qa-seed
🧪 Test API (1 Minute)¶
# Login
curl -X POST http://127.0.0.1:8069/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"student1","password":"student123"}' | jq
# Check submissions
curl -X POST http://127.0.0.1:8069/web/dataset/call_kw/lms.submission/search_read \
-H "Content-Type: application/json" \
-H "Cookie: session_id=<from-login>" \
-d '{
"jsonrpc": "2.0",
"params": {
"model": "lms.submission",
"method": "search_read",
"args": [],
"kwargs": {
"fields": ["assignment_item_id", "version", "state", "student_id"]
}
}
}' | jq
🔍 Inspect Code (2 Minutes)¶
# Routing
grep -r "path.*assignment\|path.*course" scola-fe-v2/src/router/
# Selectors
grep -r "data-testid" scola-fe-v2/src/components/
grep -r "data-testid" scola-fe-v2/src/views/
# API fields
grep -r "assignment_type" scola-fe-v2/src/services/
# Service calls
grep -r "search_read\|call_kw" scola-fe-v2/src/services/
🐛 Common Failures & 30-Second Fixes¶
| Error | Fix Command | Verification |
|---|---|---|
assignment_type_id undefined |
sed -i 's/assignment_type_id:/assignment_type:/g' src/services/lms/*.service.js |
grep "assignment_type:" src/services/lms/course.service.js |
Version stays at 2 |
Check assignmentItemId resolved before submission |
curl .../lms.submission/search_read check assignment_item_id not null |
Publish average = 0 |
Verify gradebook service computes from assignments object |
grep "assignments\[" src/services/lms/gradebook.service.js |
Modal not showing |
Add <AssignmentDetailModal :force-edit="true"> to detail view |
grep "AssignmentDetailModal" src/views/.../AssignmentDetail.vue |
Login timeout |
Use session auth, not UI login | Check .auth/student.json exists |
.txt file rejected |
Add .txt to accept list |
grep 'accept=".*txt' src/components/Assignment/ |
📸 Evidence Collection (3 Minutes)¶
# 1. Screenshot (auto in test-results/)
npx playwright test <test> --headed --debug
# Pause at failure, F12 > screenshot
# 2. Backend state
curl -X POST http://127.0.0.1:8069/web/dataset/call_kw/<model>/search_read \
-d '{"params": {"kwargs": {"fields": ["field1", "field2"]}}}' | jq > backend-state.json
# 3. Frontend state
xdg-open http://localhost:5173
# F12 > Application > Local Storage > screenshot
# 4. Network logs
# (Playwright trace.zip > Network tab > save HAR)
🎯 Test Type Decision¶
| Scenario | Test Location | Tag | Run Command |
|---|---|---|---|
| Student submit → Teacher grade → Publish | tests/e2e/flow/ |
@p0 |
npx playwright test --grep "@p0" |
| Enroll, unenroll, attendance | tests/e2e/critical/ |
@critical |
npx playwright test tests/e2e/critical |
| Login, 404, navigation | tests/e2e/smoke/ |
@smoke |
npx playwright test tests/e2e/smoke |
| Component props, composables | tests/unit/ |
(none) | npm run test:unit |
⚠️ Pre-Flight Checklist (Print & Stick to Monitor)¶
☐ Backend running?
☐ Frontend running?
☐ Database seeded?
☐ API tested with curl?
☐ Router.js checked?
☐ DOM inspected in browser?
☐ Selectors documented?
☐ Fallback strategy ready?
If ALL ✅ → START CODING
If ANY ☐ → STOP! FIX FIRST!
🔗 Full Documentation Links¶
- Comprehensive Guide: testing-guidelines.md
- Playwright Runbook: qa-playwright-runbook.md
- Test Suite Structure: qa-suite-structure.md
- Quality Gates: qa-gates.md
- AI Development: AI Guidelines/AGENTIC_AI_APP_DEV_GUIDE.md
🎓 Golden Rules¶
- Inspect First, Code Later → 15 min inspect saves 2-3 hours debugging
- API Login > UI Login → Session auth = stable, UI login = fragile
- Fallback Always →
.or()locators prevent selector brittleness - Skip > Fail → Graceful skips better than blocking CI/CD
- Verify Environment First → If env check fails, STOP and fix!
Generated: 2026-01-26
Maintained by: QA Team
For questions: Check testing-guidelines.md first!