azd app test

Run tests for all services in your application with support for different test types and aggregated code coverage.

Usage

Terminal window
azd app test [flags]

Flags

FlagShortTypeDefaultDescription
--type-tstringallTest type to run: `unit`, `integration`, `e2e`, or `all`
--coverage-cboolfalseGenerate code coverage reports
--service-sstring""Run tests for specific service(s) (comma-separated)
--watch-wboolfalseWatch mode - re-run tests on file changes
--update-snapshots-uboolfalseUpdate test snapshots
--fail-fast-boolfalseStop on first test failure
--parallel-pbooltrueRun tests for services in parallel
--threshold-int0Minimum coverage threshold (0-100)
--verbose-vboolfalseEnable verbose test output
--dry-run-boolfalseShow what would be tested without running tests
--output-format-stringdefaultOutput format: `default`, `json`, `junit`, `github`
--output-dir-string./test-resultsDirectory for test reports and coverage
--stream-boolfalseForce streaming output even in parallel mode
--no-stream-boolfalseForce progress bar mode (suppress streaming)
--timeout-duration10mPer-service timeout for test execution
--save-boolfalseSave auto-detected test config to azure.yaml
--no-save-boolfalseDon't prompt to save auto-detected test config

Examples

Terminal window
azd app test [flags]
Terminal window
azd app test
Terminal window
azd app test --coverage
Terminal window
azd app test --type unit
Terminal window
azd app test --type integration
Terminal window
azd app test --type e2e
Terminal window
azd app test --service api,web
Terminal window
azd app test --type unit --coverage --service api
Terminal window
azd app test --watch
Terminal window
azd app test --fail-fast

📚 Detailed Documentation

For complete documentation including flows, diagrams, and advanced usage, see the full command specification.

View full test specification →