context-testing-infrastructure
22. 分层测试策略(UI模拟、身份验证存根、全栈)、固定装置、模拟和测试配置。处理测试设置、Playwright E2E测试、pytest后端测试、模拟策略和CI测试配置。在处理测试、测试设置、模拟策略或CI测试配置时使用,或当用户提及测试模式、身份验证存根、固定装置加载器、Playwright测试、测试失败、分层测试、UI模拟、E2E测试、pytest、vitest或调试测试问题时使用。
📖 中文导读:22. 分层测试策略(UI模拟、身份验证存根、全栈)、固定装置、模拟和测试配置。处理测试设置、Playwright E2E测试、pytest后端测试、模拟策略和CI测试配置。在处理测试、测试设置、模拟策略或CI测试配置时使用,或当用户提及测试模式、身份验证存根、固定装置加载器、Playwright测试、测试失败、分层测试、UI模拟、E2E测试、pytest、vitest或调试测试问题时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: context-testing-infrastructure description: | Tiered testing strategy (UI mock, auth stub, full-stack), fixtures, mocks, and test configuration. Handles test setup, Playwright E2E tests, pytest backend tests, mocking strategies, and CI test configuration. Use when working with tests, test setup, mocking strategies, or CI test configuration, or when user mentions test patterns, auth stub, fixture loaders, Playwright tests, test failures, tiered testing, UI mock, E2E tests, pytest, vitest, or debugging test issues. tags: [testing, qa, infrastructure]
Testing Infrastructure
Navigate tiered testing strategy (ui-mock, auth-stub, full-stack), fixtures, and configs.
Overview
Three-tier testing strategy for speed/isolation balance. See docs/testing/STRATEGY.md.
E2E Test Tiers
Tier 1: UI Mock
- Location:
frontend/e2e-tiers/tier-ui-mock/ - Speed: <5s
- Purpose: UI-only, no backend
Tier 2: Auth Stub
- Location:
frontend/e2e-tiers/tier-auth-stub/ - Speed: <30s
- Purpose: Real frontend + stubbed auth
Tier 3: Full Stack
- Location:
frontend/e2e-tiers/tier-full-stack/ - Speed: ~60s+
- Purpose: Complete integration
E2E Tests
frontend/e2e/*.spec.ts- Main E2E testsfrontend/e2e-smoke/*.spec.ts- Smoke tests
Backend Tests
backend/tests/unit/- Unit testsbackend/tests/integration/- Integration testsbackend/tests/manual/- Manual testsbackend/tests/conftest.py- Pytest fixturesbackend/tests/fixtures/- Mock fixtures
Test Utilities
scripts/lib/db_test_utils.py- Database utilitiesscripts/test_*.py- Test helpersscripts/quick_fix_test_data.py- Quick data generationscripts/generate-dev-data.ts- Dev data seedingfrontend/src/test-utils/- Frontend test utilities
Smoke Tests
backend/smoke_endpoints.py- Backend health checksfrontend/e2e-smoke/- Frontend smoke tests
Configuration
frontend/playwright*.config.ts- Playwright configspytest.ini- Pytest configurationfrontend/vitest.config.ts- Vitest config (if used)
Documentation
- Internal:
docs/testing/STRATEGY.md
Related Areas
- See
context-plaid-integrationfor Plaid test patterns - See
context-clerk-integrationfor auth stub patterns - See
context-infrastructurefor CI integration