azd app test
Run tests for all services in your application with support for different test types and aggregated code coverage.
Usage
azd app test [flags]Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--type | -t | string | all | Test type to run: `unit`, `integration`, `e2e`, or `all` |
--coverage | -c | bool | false | Generate code coverage reports |
--service | -s | string | "" | Run tests for specific service(s) (comma-separated) |
--watch | -w | bool | false | Watch mode - re-run tests on file changes |
--update-snapshots | -u | bool | false | Update test snapshots |
--fail-fast | - | bool | false | Stop on first test failure |
--parallel | -p | bool | true | Run tests for services in parallel |
--threshold | - | int | 0 | Minimum coverage threshold (0-100) |
--verbose | -v | bool | false | Enable verbose test output |
--dry-run | - | bool | false | Show what would be tested without running tests |
--output-format | - | string | default | Output format: `default`, `json`, `junit`, `github` |
--output-dir | - | string | ./test-results | Directory for test reports and coverage |
--stream | - | bool | false | Force streaming output even in parallel mode |
--no-stream | - | bool | false | Force progress bar mode (suppress streaming) |
--timeout | - | duration | 10m | Per-service timeout for test execution |
--save | - | bool | false | Save auto-detected test config to azure.yaml |
--no-save | - | bool | false | Don't prompt to save auto-detected test config |
Examples
azd app test [flags]azd app testazd app test --coverageazd app test --type unitazd app test --type integrationazd app test --type e2eazd app test --service api,webazd app test --type unit --coverage --service apiazd app test --watchazd app test --fail-fast📚 Detailed Documentation
For complete documentation including flows, diagrams, and advanced usage, see the full command specification.
View full test specification →