FREEDOM251

Freedom251 › Unit Testing

Pest

Free plan LinuxMacSelf-hostedWindows

Visit Pest Alternatives Pricing

Pest's own site

What Pest is

Pest is a free PHP testing framework for developers and AI agents. It is added to a PHP project as a Composer development dependency, and Pest 5 requires PHP 8.4 or later. Its testing capabilities include parallel execution, coverage, mutation and snapshot testing, profiling, architectural checks, browser testing, and optional plugins. The Browser plugin uses Playwright for interactions such as clicking buttons and filling forms. The Agent plugin supports one-off application checks by coding agents and can operate a real browser when the Browser plugin is installed. Pest Evals combines regular Pest tests with AI-powered scorers to assess LLM responses, including a documented scorer for checking resistance to prompt injection. The Tia Engine reruns tests affected by recent changes and requires PCOV or Xdebug as a coverage driver. Pest 5 includes PHPStan and Rector plugins; team-maintained plugins include Faker, Laravel, and Livewire. JetBrains maintains a PhpStorm plugin, included by default since version 2023.3. Pest supports parameterized cases but has no built-in mocks.

Who it suits

Pest suits PHP developers and AI agents working on projects ranging from personal work to enterprise applications. It is also relevant to teams that want browser checks or evaluations of LLM output within their testing workflow.

What it does well

  • Free PHP testing framework
  • Supports parallel execution and snapshot testing
  • Browser plugin uses Playwright
  • Parameterized test cases are supported
  • PhpStorm plugin included by default since version 2023.3

What to know first

  • Pest 5 requires PHP 8.4 or later
  • Built-in mocks are not included
  • Tia Engine requires PCOV or Xdebug

Limits

Pest 5 requires PHP 8.4 or greater. The Tia Engine requires PCOV or Xdebug as a code coverage driver.

Plans

PlanBilled and limitsPrice
PestOpen-source PHP testing framework · Requires PHP 8.4+ for Pest 5Free

As pestphp.com lists them, read 5 Oct 2026. The maker's own page has the final word.

Getting started

  1. Open the Pest website.
  2. Add Pest to a PHP project as a Composer development dependency.
  3. Use PHP 8.4 or later for Pest 5.
  4. Install the Browser plugin if browser testing or real-browser agent checks are needed.
  5. Install PCOV or Xdebug if using the Tia Engine.

Pest is a PHP testing framework for development teams and coding agents that want conventional checks alongside browser automation and AI-oriented evaluations. It is best suited to PHP projects able to run Pest 5 on PHP 8.4 or newer, from small personal codebases to large enterprise applications. The free, Composer-installed toolkit is unusually broad, but teams should account for its lack of built-in mocks and the extra coverage-driver requirement for its test-impact engine.

Overview

Pest is added to a PHP project as a Composer development dependency, so it fits naturally into an existing PHP workflow rather than operating as a separate service. Its scope runs from everyday unit and application tests to parallel execution, browser checks, profiling, architectural rules, code coverage, mutation testing, and snapshots. Parameterized cases are supported, while built-in mocks are not.

That combination makes Pest a strong general-purpose choice when a team wants one PHP-native test runner for both routine regression work and more specialized quality gates. Pest 5's PHP 8.4-or-greater requirement is the first compatibility check for older applications or conservative hosting environments.

Key features

The core feature set covers parallel execution, coverage, mutation testing, snapshots, profiling, architectural testing, and parameterized cases. Parallel runs can shorten feedback cycles, while mutation testing and coverage expose weaknesses that ordinary pass/fail checks can miss. Snapshots and parameterized cases are useful for repeatable, data-heavy assertions. The absence of built-in mocks matters for teams whose existing testing style depends on mock objects; they will need to supply another solution.

The Browser plugin uses Playwright to operate real pages, including clicking buttons and filling forms. This gives PHP teams an end-to-end option without switching to a separate browser-testing framework. The Agent plugin lets coding agents perform one-off application verifications and can drive a real browser when the Browser plugin is installed, making it relevant to agent-assisted development as well as human-written tests.

Pest Evals combines ordinary Pest tests with AI-powered scorers to assess LLM responses. Its documented toBeSafe() scorer can check whether an AI agent resists prompt-injection attempts, so it is a practical fit for teams evaluating AI behavior rather than only deterministic output.

The Tia Engine reruns tests affected by recent changes, potentially avoiding unrelated work in large suites. It requires PCOV or Xdebug as a code-coverage driver, which adds setup and may rule it out for minimal environments. Tia Engine can detect Laravel, Symfony, Livewire, Inertia, and browser assets through Composer. Pest 5 also provides first-party PHPStan and Rector plugins and describes time-balanced sharding for CI machines. Team-maintained plugins cover Faker, Laravel, and Livewire.

JetBrains maintains a Pest plugin for PhpStorm, included by default since version 2023.3. That makes editor-based discovery and execution a sensible part of a PHP team's workflow. Pest's homepage also presents a security architecture-testing preset, but no security certification or compliance standard is part of the product's offering.

Pricing

PlanPriceWhat it includes
PestfreeOpen-source PHP testing framework; Pest 5 requires PHP 8.4 or newer.

There is no paid tier, seat charge, quota, or trial decision to make: the framework is free to use. That is particularly attractive for teams standardizing tests across personal projects and enterprise applications. The trade-off is technical rather than commercial: compatibility with PHP 8.4 and, for Tia Engine, PCOV or Xdebug determine whether the full feature set fits your environment.

Platforms

Pest supports Linux, macOS, Windows, and self-hosted deployments. PHP is its supported language, and installation is handled inside a PHP project through Composer. The platform range works for local development and self-managed CI infrastructure, while browser and agent workflows add their own plugin and Playwright considerations.

Who it's for

Choose Pest if you build in PHP and want a single free framework spanning standard tests, parallelization, coverage, mutation testing, browser interaction, and AI-agent or LLM evaluation. It suits both small personal projects and large-scale enterprise applications, especially teams already using Laravel, Symfony, Livewire, Inertia, PHPStan, Rector, or PhpStorm.

Look elsewhere if your project cannot move to PHP 8.4, requires built-in mocking, or cannot install a coverage driver for test-impact analysis. Pest is also a poor fit when your primary language is not PHP, since its tooling and integrations are PHP-specific.

Pros and cons

Pros

  • Broad testing scope: parallel runs, coverage, mutation testing, snapshots, profiling, architecture checks, and parameterized cases live in one framework.
  • Useful browser and agent extensions: Playwright-backed browser interaction and one-off agent verification extend testing beyond static assertions.
  • LLM evaluation support: deterministic tests and AI scorers can be combined, including a scorer for prompt-injection resistance.
  • Free across project sizes: the open-source plan has no stated seat or usage charge.
  • Strong PHP ecosystem fit: Laravel, Livewire, Faker, PHPStan, Rector, and PhpStorm integrations reduce tool switching.

Cons

  • PHP 8.4 floor for Pest 5: older PHP applications may need to remain on an earlier major version or choose another framework.
  • No built-in mocks: teams expecting mock support inside the framework must adopt a separate approach.
  • Tia Engine setup cost: test impact analysis depends on PCOV or Xdebug.
  • Support is not time-bound: maintainers do not promise a fixed bug-resolution time or a fix for every issue; outdated major versions receive bug fixes for 12 months after the latest release.

Alternatives

PHPUnit is the direct PHP alternative for teams wanting a free framework downloadable as a PHAR or installable with Composer. Pick QUnit instead for JavaScript projects, including browser and API environments. Kotest suits Kotlin-oriented work with standalone testing, assertion, and property-testing projects. Choose NUnit for a free, MIT-licensed option across its supported platforms, or CppUTest when C and C++ unit testing and mocking are the priority. FsCheck is the alternative for .NET property-based testing, while Jasmine is a free choice for JavaScript testing. Rust libtest is appropriate when you want Rust's standard-library test harness. Browse Unit Testing Frameworks for a wider comparison.

Verdict

Pest is the right choice for PHP teams that want a free, modern testing foundation with browser automation and first-class paths into AI-agent and LLM evaluation. Its breadth and ecosystem integrations are compelling for projects that meet the PHP 8.4 requirement. Choose another framework when built-in mocks, an older PHP runtime, or a non-PHP language is central to your project.

Verdict

Pest offers a broad PHP testing toolkit, including browser and AI-agent checks, without a listed charge. Check the PHP 8.4 requirement for Pest 5 and the coverage-driver requirement for Tia Engine before choosing it.

Questions

Is Pest free?

Yes. Pest is listed as free and is described as open source.

Which language does Pest support?

Pest is a PHP testing framework. Pest 5 requires PHP 8.4 or greater.

How do I install Pest?

Pest is installed in a PHP project as a Composer development dependency.

Can Pest run browser tests?

Yes. Its Browser plugin uses Playwright to run browser tests that can click buttons and fill forms.

Does Pest include built-in mocks?

No. Built-in mocks are listed as not included.

What support does the project provide for older versions?

Bug fixes for outdated major versions are available for 12 months after the latest version's release. Maintainers do not guarantee a fixed resolution time or a fix for every issue.

Facts from Pest's own pages

AI agent checks
The Agent plugin lets coding agents run isolated checks against a live app and save screenshots as proof. · pestphp.com, 5 Oct 2026
AI evaluations
Pest Evals can combine deterministic checks with AI-powered scorers to assess LLM output from a test suite. · pestphp.com, 5 Oct 2026
Browser testing
The Browser plugin uses Playwright to run browser tests that can interact with pages, including clicking buttons and filling forms. · pestphp.com, 5 Oct 2026
Editor integration
JetBrains maintains the Pest plugin for PhpStorm, where it has been included by default since version 2023.3. · pestphp.com, 5 Oct 2026
Framework integrations
The Pest 5 Tia Engine documentation says it detects Laravel, Symfony, Livewire, Inertia, and browser assets automatically via Composer. · pestphp.com, 5 Oct 2026
Install
Pest is installed in a PHP project as a Composer development dependency. · pestphp.com, 5 Oct 2026
Integrations
Pest's team-maintained plugins include Faker, Laravel, and Livewire. · pestphp.com, 5 Oct 2026
Intended users
The maker describes Pest as a testing framework for PHP developers and AI agents. · pestphp.com, 5 Oct 2026
LLM evaluations
Evals use ordinary Pest tests and can apply AI-powered scorers to responses. · pestphp.com, 5 Oct 2026
Maker
The site describes Pest as a PestPHP project by Nuno Maduro. · pestphp.com, 5 Oct 2026
PHP requirement
Pest 5 requires PHP 8.4 or greater and is built on PHPUnit 13. · pestphp.com, 5 Oct 2026
PHP tooling
Pest 5 includes first-party plugins for PHPStan and Rector, and its release page describes time-balanced sharding for CI machines. · pestphp.com, 5 Oct 2026
Purpose
Pest is a PHP testing framework for developers and AI agents. · pestphp.com, 5 Oct 2026
Security
The homepage shows a security architecture testing preset, but the opened maker pages did not state a security certification or compliance standard. · pestphp.com, 5 Oct 2026
Security testing
Pest's Evals documentation describes a toBeSafe() scorer for checking whether an AI agent resists prompt injection. · pestphp.com, 5 Oct 2026
Support
Pest's maintainers say they cannot guarantee a fixed bug resolution time or a fix for every issue; bug fixes for outdated versions are available for 12 months after the latest version's release. · pestphp.com, 5 Oct 2026
Support policy
Pest says bug fixes for outdated major versions are available for 12 months after the latest version's release, with no fixed resolution time or guaranteed fix for every issue. · pestphp.com, 5 Oct 2026
Test features
Pest includes parallel execution, coverage, mutation testing, and snapshots. · pestphp.com, 5 Oct 2026
Test impact analysis
The Tia Engine reruns tests affected by recent changes and requires PCOV or Xdebug as a code coverage driver. · pestphp.com, 5 Oct 2026
Testing features
Pest lists parallel execution, browser testing, profiling, architectural testing, coverage, mutation testing, and optional plugins among its features. · pestphp.com, 5 Oct 2026
Who it is for
Pest says it is suitable for small personal projects and large-scale enterprise applications. · pestphp.com, 5 Oct 2026

Where Pest stands on Freedom251

Look at these too