Running Apex Tests
Primary Testing Patterns
# Test a specific package (primary pattern)
sfp apextests trigger -o my-org -l RunAllTestsInPackage -n my-package
# Test all packages in a domain (recommended for domain validation)
sfp apextests trigger -o my-org -l RunAllTestsInDomain -r config/release-config.yaml
# Test multiple packages together
sfp apextests trigger -o my-org -l RunAllTestsInPackage -n package-a -n package-b
# Quick test during development
sfp apextests trigger -o my-org -l RunSpecifiedTests --specifiedtests MyTestTest Levels
RunAllTestsInPackage (Recommended)
RunAllTestsInDomain (Recommended for Domain Validation)
RunSpecifiedTests
RunApexTestSuite
RunLocalTests
RunAllTestsInOrg
Code Coverage Validation
Individual Class Coverage
Package Coverage
Coverage vs No Coverage
Output Formats
Raw Format (Default)
Dashboard Format
Dashboard JSON Schema
How Dashboard Output is Used
Dashboard vs Raw Format
Feature
Raw Format
Dashboard Format
Non-Blocking Dashboard Mode
Both Format
Output Directory Structure
Troubleshooting
Tests Timeout
Parallel vs Serial Execution
Coverage Validation Failures
Tests Not Found
Mixed Results with Retries
Additional Options
Wait Time Control
Specifying API Version
Git Metadata
Custom Environment Name
Last updated
Was this helpful?