LinuxCommandLibrary

pest

TLDR

Run all tests

$ pest
copy
Run specific test
$ pest --filter [test_name]
copy
Run with coverage
$ pest --coverage
copy
Run in parallel
$ pest --parallel
copy
Stop on first failure
$ pest --bail
copy
Watch for changes
$ pest --watch
copy
Show test list
$ pest --list-tests
copy
Run specific file
$ pest [tests/Feature/ExampleTest.php]
copy

SYNOPSIS

pest [--filter pattern] [--parallel] [--coverage] [options] [files]

DESCRIPTION

pest is an elegant PHP testing framework. It provides a clean, expressive syntax built on PHPUnit.
Tests use a describe/it syntax similar to JavaScript testing frameworks. Expectations chain fluently for readable assertions.
Parallel execution speeds up large test suites. Processes are distributed across available cores.
Coverage reports show code coverage percentage. HTML and other formats are available.
Watch mode reruns tests on file changes. Failed tests rerun first for faster feedback.

PARAMETERS

--filter PATTERN

Filter tests by name.
--parallel
Run in parallel.
--coverage
Generate coverage report.
--bail
Stop on first failure.
--watch
Watch mode.
--list-tests
List available tests.
--min PERCENT
Minimum coverage.
--group NAME
Run test group.
--exclude-group NAME
Exclude test group.
-v, --verbose
Verbose output.

CAVEATS

Requires PHP 8.1 or higher. Built on PHPUnit. Some PHPUnit features accessed differently.

HISTORY

Pest was created by Nuno Maduro in 2020. It brings a modern, expressive syntax to PHP testing while maintaining full PHPUnit compatibility.

SEE ALSO

phpunit(1), php(1), composer(1)

Copied to clipboard