Forrest logo
back to the pest tool

pest:tldr:64767

pest: Run tests and print the coverage report to `stdout`.
$ pest --coverage
try on your machine

The command pest --coverage is used to generate a coverage report for your Pest test suite. Here's how it works:

  1. pest refers to the Pest command-line interface (CLI) tool. It is used to run Pest tests.

  2. --coverage is an option that you provide to the Pest CLI. This option tells Pest to generate a coverage report for your tests.

When you run pest --coverage in your terminal, Pest will execute all the tests in your Pest test suite and gather information about which parts of your codebase were covered by the tests.

The coverage report will provide an overview of the percentage of code covered by tests, highlighting the areas that were and were not tested. It will also display detailed information about each file, including the number of executable lines, the number of lines covered by tests, and the coverage percentage for each file.

By using the --coverage option, you can quickly assess the effectiveness of your test suite and identify areas of your codebase that require more test coverage. This helps ensure that your code is adequately tested, improving overall quality and minimizing the risk of undetected bugs.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pest tool