| name | testing-e2e |
| description | End-to-end testing -- Playwright E2E suites, Cypress E2E, API testing with supertest, load testing with k6, and test reporting. |
| metadata | {"thinkfleetbot":{"emoji":"🔬","requires":{"bins":["npx","node"]}}} |
End-to-End Testing
Full E2E test suites, API testing, load testing, and report generation.
Run Playwright E2E suite
npx playwright test --config=playwright.config.ts
npx playwright test --retries=2
npx playwright test --reporter=html --workers=4
npx playwright test --grep="@smoke"
npx playwright test --grep="@critical"
npx playwright test --trace=on-first-retry
npx playwright show-trace test-results/trace.zip
Run Cypress E2E
npx cypress run --e2e
npx cypress run --spec "cypress/e2e/checkout.cy.ts"
npx cypress run --e2e --record
npx cypress run --e2e --browser electron
npx cypress run --e2e --env BASE_URL=http://localhost:3000
API testing with supertest
npx jest tests/api/
npx vitest run tests/api/
Load testing with k6
k6 run load-tests/smoke.js
k6 run --vus 50 --duration 30s load-tests/stress.js
k6 run --out json=results.json load-tests/spike.js
Test report generation
npx playwright test --reporter=html
npx playwright show-report
npx playwright test --reporter=json > test-results.json
npx playwright test --reporter=junit > junit-results.xml
npx cypress run --reporter mochawesome --reporter-options reportDir=reports,overwrite=false,html=true
npx mochawesome-merge reports/*.json > merged-report.json
npx marge merged-report.json --reportDir=reports --inline
npx jest --reporters=default --reporters=jest-html-reporter