How caprisrv/playwright-js-e2e-framework works
This repository is a Playwright end-to-end testing framework for UI and API-backed scenarios. Its central workflow discovers scenarios, creates scenario-level shards, executes them through Playwright, retries failures, persists run artifacts, and aggregates scenario history and final status. Separate utilities support test discovery, retry planning, GitHub Actions result retrieval, historical validation, and reporting. The tree and excerpts identify these capabilities, but the README is empty; some subsystem links are therefore omitted where source relationships were not shown.
Main entry points: testOrchestrator.js Test orchestrator · tests Scenario specs · shardExecutor.js Shard executor · shardManager.js Shard planning
Components 31
Test scenarios
- Scenario specs
tests - Cart scenarios
tests/cart - Login scenarios
tests/login - Booking scenarios
tests/restfulbooker
Run coordination
- Test orchestrator
utils/testOrchestrator.js - Test discovery
utils/testDiscovery.js - Shard planning
utils/shardManager.js - Shard executor
utils/shardExecutor.js - Retry manager
utils/retryManager.js - Retry planner
utils/retryPlanner.js - Retry-plan command
scripts/create-retry-plan.js - Discovery command
scripts/discover-tests.js - Shard command
scripts/execute-shard.js
Results and analysis
- Result parser
utils/resultParser.js - Execution artifact store
utils/resultStore.js - Run manifest
utils/runManifest.js - Scenario aggregator
utils/resultAggregator.js - GitHub run results
utils/githubExecutionResults.js - Historical validation
scripts/create-historical-validation-plan.js - Extent reporting
scripts/generate-extent-report.js
Application interfaces
- Base page
pages/BasePage.js - Cart page
pages/CartPage.js - Login page
pages/LoginPage.js - Products page
pages/ProductsPage.js - Booking page
pages/RestfulBookerBookingPage.js - Booking API client
api/RestfulBookerApi.js
Other components
- Test author
- Playwright runner
- GitHub Actions
- Sauce Demo site
- Booking site
Connections 38
- Test author → Scenario specs: defines scenarios
- Scenario specs → Cart scenarios: includes
- Scenario specs → Login scenarios: includes
- Scenario specs → Booking scenarios: includes
- Test author → Test orchestrator: starts run
- Test orchestrator → Run manifest: creates and records
utils/testOrchestrator.js - Test orchestrator → Test discovery: discovers scenarios
utils/testOrchestrator.js - Test orchestrator → Shard planning: plans shards
utils/testOrchestrator.js - Test orchestrator → Shard executor: executes shards
utils/testOrchestrator.js - Test orchestrator → Execution artifact store: saves results
utils/testOrchestrator.js - Test orchestrator → Result parser: selects failures
utils/testOrchestrator.js - Test orchestrator → Retry manager: retries failures
utils/testOrchestrator.js - Test orchestrator → Scenario aggregator: aggregates executions
utils/testOrchestrator.js - Retry manager → Shard executor: runs retry shards
utils/retryManager.js - Retry manager → Result parser: filters failures
utils/retryManager.js - Shard executor → Playwright runner: runs scenarios
utils/shardExecutor.js - Shard executor → Result parser: normalizes report
utils/shardExecutor.js - Discovery command → Test discovery: discovers tests
scripts/discover-tests.js - Discovery command → Shard planning: plans shards
scripts/discover-tests.js - Shard command → Shard executor: executes shard
scripts/execute-shard.js - Shard command → Execution artifact store: saves result
scripts/execute-shard.js - Retry-plan command → Retry planner: creates retry plan
scripts/create-retry-plan.js - Retry planner → Shard planning: uses shard plan
utils/retryPlanner.js - Historical validation → Scenario aggregator: uses history
scripts/create-historical-validation-plan.js - Historical validation → GitHub run results: retrieves executions
scripts/create-historical-validation-plan.js - Historical validation → Shard planning: uses shard plan
scripts/create-historical-validation-plan.js - Extent reporting → Scenario aggregator: aggregates results
scripts/generate-extent-report.js - Extent reporting → GitHub run results: loads run results
scripts/generate-extent-report.js - GitHub run results → GitHub Actions: downloads artifacts
utils/githubExecutionResults.js - Cart page → Base page: extends
pages/CartPage.js - Login page → Base page: extends
pages/LoginPage.js - Products page → Base page: extends
pages/ProductsPage.js - Booking page → Base page: extends
pages/RestfulBookerBookingPage.js - Login page → Sauce Demo site: navigates to
pages/LoginPage.js - Booking page → Booking site: navigates to
pages/RestfulBookerBookingPage.js - Scenario specs → Cart page: uses page object
- Scenario specs → Login page: uses page object
- Scenario specs → Booking page: uses page object