2025-03-14 21:59:59 -06:00
|
|
|
# pio test
|
|
|
|
|
|
|
|
|
|
> Run local tests on a PlatformIO project.
|
|
|
|
|
> More information: <https://docs.platformio.org/en/latest/core/userguide/cmd_test.html>.
|
|
|
|
|
|
|
|
|
|
- Run all tests in all environments of the current PlatformIO project:
|
|
|
|
|
|
|
|
|
|
`pio test`
|
|
|
|
|
|
|
|
|
|
- Test only specific environments:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`pio test {{[-e|--environment]}} {{environment1}} {{[-e|--environment]}} {{environment2}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Run only tests whose name matches a specific glob pattern:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`pio test {{[-f|--filter]}} "{{pattern}}"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Ignore tests whose name matches a specific glob pattern:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`pio test {{[-i|--ignore]}} "{{pattern}}"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Specify a port for firmware uploading:
|
|
|
|
|
|
|
|
|
|
`pio test --upload-port {{upload_port}}`
|
|
|
|
|
|
|
|
|
|
- Specify a custom configuration file for running the tests:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`pio test {{[-c|--project-conf]}} {{path/to/platformio.ini}}`
|