Forrest logo
back to the pio tool

pio-test:tldr:79c8f

pio-test: Run only tests whose name matches a specific glob pattern.
$ pio test --filter "${pattern}"
try on your machine

The command "pio test --filter "${pattern}"" is used to run tests in a PlatformIO project while specifying a filter pattern for test selection.

Explanation:

  • "pio test" is the standard command to execute tests in a PlatformIO project.
  • "--filter" is an option used to specify a filter pattern for selecting specific tests to run.
  • "${pattern}" is a placeholder for the actual filter pattern you want to use. You need to replace "${pattern}" with the desired filter pattern.

The filter pattern can be used to match specific test names or tags. It allows you to selectively run a subset of tests based on their names or assigned tags. For example, you might have tests named "test_foo" and "testbar", and you can use a pattern like "test*" to run only the tests starting with "test_".

Here's an example of how you can use this command: pio test --filter "test_"

In this example, it will run all the tests in the project that start with "test_" in their names. The actual behavior will depend on your project's test setup and configuration.

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 pio tool