aer test
Run test methods in Apex source from one or more directories
aer test [directories...] [flags]Options
--allow-deprecated strings allow deprecated Apex features (valid options: test-method-in-non-test-class, schema-recalculate-formulas, child-relationship-describe-limits, site-get-prefix, site-get-base-insecure-url, site-get-current-site-url, site-get-custom-web-address)
--bootstrap-db string bootstrap SQLite database to seed before running tests
--bootstrap-tables strings comma-separated list of tables to copy from bootstrap database (default: all tables)
--coverage enable apex code coverage tracking
--critical include tests marked @IsTest(critical=true); when used alone, runs only critical tests
--db string SQLite database file to use (for debugging, default: in-memory)
--debug enable DAP debug mode
--default-namespace string treat loaded code as if it belongs to the specified namespace
-n, --dry-run show tests that would be run without executing them
--faketime string mock current time for DateTime.now() and Date.today() (RFC3339 format, e.g., 2025-10-26T18:00:00-05:00)
-f, --filter strings filter tests by name (substring match, can be specified multiple times)
--for strings run tests marked @IsTest(testFor=...) for the specified targets (can be specified multiple times)
-h, --help help for test
--json string write test results and coverage to JSON file
--package strings package files to load (can be specified multiple times)
--package-dir strings directories containing .pkg files to load (can be specified multiple times)
--profile file write Apex profiling data to file (pprof format)
-q, --quiet only output failures and summary
--read-only run tests with application read-only mode (disables DML operations)
--sandbox set Organization.IsSandbox to true
--skip strings exclude tests by name (substring match, applied after filter, can be specified multiple times)
--timeout int timeout in seconds for each test (0 = no timeout) (default 300)
--trace file write Apex execution trace to file
--watch watch inputs for changes and re-run specified testsOptions inherited from parent commands
-v, --verbose enable verbose outputSEE ALSO
- aer - aer is the Apex Execution Runtime