whatisgithub

What is pest?

pestphp/pest — explained in plain English

Analysis updated 2026-06-24

11,470PHPAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

A PHP testing framework with a cleaner, simpler syntax built on top of PHPUnit, making it less tedious to write tests while staying fully compatible with existing PHP test infrastructure.

Mindmap

mindmap
  root((Pest PHP))
    What it does
      Cleaner test syntax
      Built on PHPUnit
      Browser testing
    Key Features
      Expressive API
      Dataset testing
      Architecture checks
    Tech Stack
      PHP
      PHPUnit
      Composer
    Audience
      PHP developers
      Laravel teams
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Write PHP unit tests with less boilerplate using Pest's expressive syntax instead of PHPUnit classes.

USE CASE 2

Add browser-based testing to a PHP app that interacts with a real running web page, using Pest v4's browser testing feature.

USE CASE 3

Drop Pest into an existing Laravel or PHP project without rewriting any existing PHPUnit tests.

USE CASE 4

Run a full PHP test suite through Pest while keeping all existing PHPUnit configuration and test files.

What is it built with?

PHPPHPUnitComposer

How does it compare?

pestphp/pesttymondesigns/jwt-authwalkor/workerman
Stars11,47011,48111,540
LanguagePHPPHPPHP
Setup difficultyeasymoderatemoderate
Complexity2/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires an existing PHP project with Composer. Works alongside PHPUnit with no rewriting of existing tests.

Free to use for any purpose, including commercial projects, as long as you keep the copyright notice.

So what is it?

Pest is a testing framework for PHP applications. Its main pitch is that writing tests should feel straightforward and enjoyable rather than tedious, which it tries to accomplish by offering a simpler, more expressive syntax than the older PHPUnit-style approach that PHP developers have traditionally used. The project is built on top of PHPUnit under the hood, so it works with existing PHP projects without requiring a full rewrite of any test infrastructure. You write your tests using Pest's cleaner syntax, and it handles the rest. The README does not go into deep technical detail about how to write tests, directing readers instead to the full documentation at pestphp.com. Version 4 of Pest introduced browser testing support, which allows tests to interact with a running web page rather than just testing code in isolation. This is noted in the README as the headline feature of the latest release. The project is maintained by Nuno Maduro, who also produces videos and live coding streams where Pest is regularly featured. The README lists several corporate sponsors who fund the project's ongoing development, including a number of web development and SaaS companies. Pest is released under the MIT license, meaning it is free to use in both personal and commercial projects. The README itself is fairly brief and focuses on pointing to external resources rather than explaining how to use the framework in detail. For actual usage instructions, installation steps, or examples, the pestphp.com documentation site is the intended starting point.

Copy-paste prompts

Prompt 1
I have a Laravel app with PHPUnit tests. How do I add Pest so I can write new tests in Pest syntax while keeping the existing PHPUnit tests running?
Prompt 2
Show me how to write a basic feature test in Pest for a Laravel controller that returns a list of users as JSON.
Prompt 3
How do I set up browser testing in Pest v4 to test a login form on a real running web page?
Prompt 4
Write a Pest test for a PHP function that calculates a discount. Include a dataset to test multiple input and output combinations in one test.
Prompt 5
How do I use Pest's architecture testing to enforce that all service classes in my Laravel app are final?

Frequently asked questions

What is pest?

A PHP testing framework with a cleaner, simpler syntax built on top of PHPUnit, making it less tedious to write tests while staying fully compatible with existing PHP test infrastructure.

What language is pest written in?

Mainly PHP. The stack also includes PHP, PHPUnit, Composer.

What license does pest use?

Free to use for any purpose, including commercial projects, as long as you keep the copyright notice.

How hard is pest to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is pest for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.