Playwright Web Test Framework — Runtime Architecture

Playwright Web Test Framework — Runtime Architecture An architecture diagram generated by Archify. CI / Local Runner · Maven + GitHub Actions · Local test runtime CI / Local Runner Maven + GitHub Actions TestNG Suite · Groups + data providers · Local test runtime TestNG Suite Groups + data providers WebBaseTest · Setup / teardown · Local test runtime WebBaseTest Setup / teardown SwagLabsPortal · Page composition · Local test runtime SwagLabsPortal Page composition Page Objects · Login / cart / checkout · Local test runtime Page Objects Login / cart / checkout Sauce Demo · App under test · Local test runtime Sauce Demo App under test BrowserManager · Session lifecycle · Local test runtime BrowserManager Session lifecycle BrowserFactory · Browser selection · Local test runtime › Browser sandbox BrowserFactory Browser selection Browser Runtime · Multi-browser · Local test runtime › Browser sandbox Browser Runtime Multi-browser Playwright Engine · BrowserContext + Page · Local test runtime › Browser sandbox Playwright Engine BrowserContext + Page CDP Monitor · Network + console tracing · Local test runtime CDP Monitor Network + console tracing Artifacts · Screenshots + logs + metrics · Local test runtime Artifacts Screenshots + logs + metrics observe log + snapshot browser traffic Local test runtime Browser sandbox Legend Backend Cloud Security External

Execution path

  • • Maven or GitHub Actions invokes the TestNG suite.
  • • WebBaseTest initializes Playwright, creates a browser page, and tears it down after each test method.
  • • SwagLabsPortal composes the login, home, cart, and checkout page objects used by the test flow.

Runtime responsibilities

  • • BrowserManager owns the browser context lifecycle and cleanup.
  • • BrowserFactory selects the concrete browser implementation for Chrome, Edge, Firefox, or WebKit.
  • • Page objects target the Sauce Demo UI and assert business behavior rather than raw DOM details.

Trust and observability boundaries

  • • The browser sandbox isolates the runner process from the target browser runtime.
  • • CDP listeners capture network failures, JavaScript exceptions, and page-load events.
  • • Screenshots, logs, and performance timing are stored for pass/fail investigation.