What Is a Headless Browser?
A headless browser is a full browser engine that runs without a graphical window, driven programmatically instead of by a person. It renders pages, runs JavaScript, and responds to scripted interactions exactly as a normal browser would, just with no display. Tools like Playwright, Puppeteer, and headless Chrome use it to test web apps in CI.
Why it matters
End-to-end and visual tests need real browser behavior, but CI servers have no screen. A headless browser provides genuine rendering and JavaScript execution in that environment, making automated browser testing possible. It typically needs system libraries on the runner, which managed runner images often preinstall.
Related concepts
- Runs a real engine without a visible window
- Drives Playwright, Puppeteer, headless Chrome
- Often needs browser system libraries on the runner
Related guides
What Is a Snapshot Test?A snapshot test records a serialized output on first run and fails later runs when the output changes, catchi…
What Is a Golden File?A golden file is a stored reference output that a test compares against, flagging any difference as a failure…
What Is a Test Double?A test double is a stand-in for a real dependency in a test, such as a mock, stub, fake, or spy, used to isol…