2021-05-01 19:27:19 +02: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-04-27 10:59:15 +03:00
|
|
|
`pio test {{[-e|--environment]}} {{environment1}} {{[-e|--environment]}} {{environment2}}`
|
2021-05-01 19:27:19 +02:00
|
|
|
|
|
|
|
- Run only tests whose name matches a specific glob pattern:
|
|
|
|
|
2025-04-27 10:59:15 +03:00
|
|
|
`pio test {{[-f|--filter]}} "{{pattern}}"`
|
2021-05-01 19:27:19 +02:00
|
|
|
|
|
|
|
- Ignore tests whose name matches a specific glob pattern:
|
|
|
|
|
2025-04-27 10:59:15 +03:00
|
|
|
`pio test {{[-i|--ignore]}} "{{pattern}}"`
|
2021-05-01 19:27:19 +02:00
|
|
|
|
|
|
|
- Specify a port for firmware uploading:
|
|
|
|
|
|
|
|
`pio test --upload-port {{upload_port}}`
|
|
|
|
|
|
|
|
- Specify a custom configuration file for running the tests:
|
|
|
|
|
2025-04-27 10:59:15 +03:00
|
|
|
`pio test {{[-c|--project-conf]}} {{path/to/platformio.ini}}`
|