Skip to content

t1k:web:testing:core

FieldValue
Moduletesting
Version1.7.0
Effortmedium
Tools

Keywords: a11y, E2E, integration, k6, load, Playwright, testing, unit, visual, Vitest

/t1k:web:testing:core
[test-type] [target]

Comprehensive web testing: unit, integration, E2E, load, security, visual regression, accessibility.

Terminal window
npx vitest run # Unit tests
npx playwright test # E2E tests
npx playwright test --ui # E2E with UI
k6 run load-test.js # Load tests
npx @axe-core/cli https://example.com # Accessibility
npx lighthouse https://example.com # Performance
ModelStructureBest For
PyramidUnit 70% > Integration 20% > E2E 10%Monoliths
TrophyIntegration-heavyModern SPAs
HoneycombContract-centricMicroservices

./references/testing-pyramid-strategy.md

  • ./references/unit-integration-testing.md - Vitest, browser mode, AAA
  • ./references/e2e-testing-playwright.md - Fixtures, sharding, selectors
  • ./references/playwright-component-testing.md - CT patterns (production-ready)
  • ./references/component-testing.md - React/Vue/Angular patterns
  • ./references/test-data-management.md - Factories, fixtures, seeding
  • ./references/database-testing.md - Testcontainers, transactions
  • ./references/ci-cd-testing-workflows.md - GitHub Actions, sharding
  • ./references/contract-testing.md - Pact, MSW patterns
  • ./references/cross-browser-checklist.md - Browser/device matrix
  • ./references/mobile-gesture-testing.md - Touch, swipe, orientation
  • ./references/performance-core-web-vitals.md - LCP/CLS/INP, Lighthouse CI
  • ./references/visual-regression.md - Screenshot comparison
  • ./references/test-flakiness-mitigation.md - Stability strategies
  • ./references/accessibility-testing.md - WCAG, axe-core
  • ./references/security-testing-overview.md - OWASP Top 10
  • ./references/security-checklists.md - Auth, API, headers
  • ./references/api-testing.md - Supertest, GraphQL
  • ./references/load-testing-k6.md - k6 patterns
  • ./references/pre-release-checklist.md - Complete release checklist
  • ./references/functional-testing-checklist.md - Feature testing
Terminal window
node ./scripts/init-playwright.js [--ct] [--dir <path>]

Creates best-practice Playwright setup: config, fixtures, example tests.

Terminal window
node ./scripts/analyze-test-results.js \
--playwright test-results/results.json \
--vitest coverage/vitest.json \
--output markdown

Parses Playwright/Vitest/JUnit results into unified summary.

jobs:
test:
steps:
- run: npm run test:unit # Gate 1: Fast fail
- run: npm run test:e2e # Gate 2: After unit pass
- run: npm run test:a11y # Accessibility
- run: npx lhci autorun # Performance
  • Playwright page.waitForLoadState('networkidle') flakes on apps with long-poll — switch to explicit element-visible waits.
  • Vitest in --watch mode caches modules aggressively — clear cache between test runs that mutate file system.
  • k6 default thresholds suppress real failures — explicit http_req_failed{rate:<0.01} thresholds, never accept defaults.