Step 8: E2E Integration with real API - FINAL VALIDATION
Executes end-to-end integration tests against real API and database for final validation.
/plugin marketplace add packlikez/claude-code-dev-plugin/plugin install dev@packlikez-dev-plugins<feature-name>□ GATE 7 PASSED (E2E with mocked API complete)
□ Backend running
□ Database accessible
□ All previous gates passed (1-7)
cat specs/{type}/{feature-name}.md # Spec (source of truth)
cat api-contracts/{feature}.yaml # API contract
cat tests/e2e/{feature}/*.spec.ts # E2E tests (mocked)
cat skills/gate-8-e2e-integration.md # Gate 8 criteria
# Ensure backend is running
curl http://localhost:3000/health
# Ensure database is accessible
# Run migrations if needed
npm run db:migrate
# Seed test data if needed
npm run db:seed:test
| E2E Test (Mocked) | Integration Version |
|---|---|
| tests/e2e/login.spec.ts | tests/e2e-integration/login.spec.ts |
| Remove: page.route() | Use: real API calls |
| Add: DB verification | Add: cleanup |
Use Task tool with test-writer agent:
Write E2E Integration tests for {feature-name}:
- Copy from tests/e2e/ as base
- Remove ALL route mocks (use real API)
- Add database state verification
- Add test data cleanup (beforeEach/afterEach)
- Add auth token handling if needed
- Verify data persists correctly
Real Integration:
Database Verification:
// After mutation, verify DB state
const res = await request.post('/api/users').send(data);
const dbUser = await db.users.findById(res.body.id);
expect(dbUser.email).toBe(data.email);
Test Isolation:
beforeEach(async () => {
await db.users.deleteMany({ email: /@test\.com$/ });
});
afterEach(async () => {
await db.users.deleteMany({ email: /@test\.com$/ });
});
Stability:
Use Task tool with gate-keeper agent:
Validate GATE 8 for {feature-name}
See gate-8-e2e-integration skill for all criteria.
When GATE 8 passes:
## {feature-name}
- [x] Step 1: Spec (GATE 1 ✓)
- [x] Step 2: Backend (GATE 2 ✓)
- [x] Step 3: Backend Unit Tests (GATE 3 ✓)
- [x] Step 4: API Tests (GATE 4 ✓)
- [x] Step 5: Frontend (GATE 5 ✓)
- [x] Step 6: Frontend Unit Tests (GATE 6 ✓)
- [x] Step 7: E2E Tests (GATE 7 ✓)
- [x] Step 8: E2E Integration (GATE 8 ✓)
STATUS: ✅ FEATURE COMPLETE
Feature ready for: code review → merge → deploy
tests/e2e-integration/{feature}/