11version : ' 3'
22
33# QA commands
4- # Testing and quality assurance tasks
4+ # Consolidated testing and quality assurance tasks
55
66tasks :
7+ # Smoke tests (parallel health checks)
8+ smoke :
9+ desc : " Health checks for all services"
10+ cmds :
11+ - echo "🧪 Running smoke tests..."
12+ - |
13+ BACKEND_FAIL=0
14+ FRONTEND_FAIL=0
15+
16+ curl -sf http://localhost:${BACKEND_PORT:-4000}/health > /dev/null && echo "✅ Backend healthy" || { echo "❌ Backend smoke test failed"; BACKEND_FAIL=1; } &
17+ PID_BACKEND=$!
18+
19+ curl -sf http://localhost:${FRONTEND_PORT:-5173} > /dev/null && echo "✅ Frontend healthy" || { echo "❌ Frontend smoke test failed"; FRONTEND_FAIL=1; } &
20+ PID_FRONTEND=$!
21+
22+ wait $PID_BACKEND || BACKEND_FAIL=1
23+ wait $PID_FRONTEND || FRONTEND_FAIL=1
24+
25+ if [ $BACKEND_FAIL -eq 0 ] && [ $FRONTEND_FAIL -eq 0 ]; then
26+ echo "✅ All smoke tests passed"
27+ exit 0
28+ else
29+ echo "❌ Some smoke tests failed"
30+ exit 1
31+ fi
32+ silent : false
33+
734 smoke:backend :
8- desc : " Run backend smoke tests "
35+ desc : " Backend health check only "
936 cmds :
10- - echo "🧪 Running backend smoke tests..."
11- - echo " Testing backend health endpoint..."
37+ - echo "🧪 Testing backend health..."
1238 - curl -f http://localhost:${BACKEND_PORT:-4000}/health || (echo "❌ Backend smoke test failed" && exit 1)
13- - echo "✅ Backend smoke tests passed"
39+ - echo "✅ Backend smoke test passed"
1440 silent : false
1541
1642 smoke:frontend :
17- desc : " Run frontend smoke tests "
43+ desc : " Frontend availability check only "
1844 cmds :
19- - echo "🧪 Running frontend smoke tests..."
20- - echo " Testing frontend accessibility..."
45+ - echo "🧪 Testing frontend availability..."
2146 - curl -f http://localhost:${FRONTEND_PORT:-5173} > /dev/null || (echo "❌ Frontend smoke test failed" && exit 1)
22- - echo "✅ Frontend smoke tests passed"
47+ - echo "✅ Frontend smoke test passed"
48+ silent : false
49+
50+ # Static analysis
51+ lint :
52+ desc : " Lint both services"
53+ cmds :
54+ - echo "🔍 Linting backend..."
55+ - cd ../../../backend && bunx biome lint .
56+ - echo "🔍 Linting frontend..."
57+ - cd ../../../frontend && bunx biome lint .
58+ - echo "✅ Linting complete"
59+ silent : false
60+
61+ typecheck :
62+ desc : " TypeScript checking for both services"
63+ cmds :
64+ - echo "🔍 Type checking frontend..."
65+ - cd ../../../frontend && bun run check
66+ - echo "✅ Frontend types valid"
67+ silent : false
68+
69+ # Unit tests
70+ unit:backend :
71+ desc : " Backend unit tests"
72+ cmds :
73+ - echo "🧪 Running backend unit tests..."
74+ - cd ../../../backend && encore test
75+ silent : false
76+
77+ unit:frontend :
78+ desc : " Frontend unit tests"
79+ cmds :
80+ - echo "⚠️ No frontend unit tests configured yet"
81+ - echo " Frontend uses Playwright for E2E tests (use qa:e2e)"
82+ silent : false
83+
84+ unit :
85+ desc : " All unit tests (backend only, frontend has no unit tests)"
86+ cmds :
87+ - task : unit:backend
88+ - echo "Note - Frontend has no unit tests (uses E2E tests instead)"
89+ silent : false
90+
91+ # E2E tests
92+ e2e :
93+ desc : " Frontend E2E tests (headless)"
94+ cmds :
95+ - echo "🧪 Running E2E tests..."
96+ - cd ../../../frontend && bun run test:e2e
97+ silent : false
98+
99+ e2e:headed :
100+ desc : " Frontend E2E tests (headed mode)"
101+ cmds :
102+ - echo "🧪 Running E2E tests (headed)..."
103+ - cd ../../../frontend && bun run test:e2e:headed
23104 silent : false
24105
25- smoke:all :
26- desc : " Run all smoke tests "
106+ e2e:ui :
107+ desc : " Playwright UI mode "
27108 cmds :
28- - task : smoke:backend
29- - task : smoke: frontend
109+ - echo "🎭 Opening Playwright UI..."
110+ - cd ../../../ frontend && bun run test:e2e:ui
30111 silent : false
31112
113+ # Complete test suite
114+ all :
115+ desc : " Complete test suite (smoke + lint + typecheck + unit + e2e)"
116+ cmds :
117+ - task : smoke
118+ - task : lint
119+ - task : typecheck
120+ - task : unit
121+ - task : e2e
122+ - echo "🎉 All tests passed!"
123+ silent : false
124+
125+ # Appium (mobile testing)
32126 appium:start :
33127 desc : " Start Appium server"
34128 cmds :
@@ -44,10 +138,3 @@ tasks:
44138 - lsof -ti:${APPIUM_PORT:-4723} 2>/dev/null | xargs kill -9 2>/dev/null || true
45139 - echo "✅ Appium server stopped"
46140 silent : false
47-
48- e2e :
49- desc : " Run end-to-end tests"
50- cmds :
51- - echo "🧪 Running E2E tests..."
52- - cd ../../backend && bun run test:e2e
53- silent : false
0 commit comments