Skip to main content

Impact Analysis

Before running your full test suite, use squirex impact to determine exactly which tests are affected by a file change.


Usageโ€‹

# Single file
squirex impact -f AccountController.cls

# Multiple files
squirex impact -f AccountController.cls,ContactService.cls

Outputโ€‹

Impact Analysis: AccountController.cls
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Direct dependents:
โ†’ AccountControllerTest.cls
โ†’ OpportunityHandlerTest.cls (via OpportunityHandler.cls)

Transitive dependents:
โ†’ IntegrationSuiteTest.cls (depth: 3)

Recommended test run:
squirex run --method AccountControllerTest,OpportunityHandlerTest,IntegrationSuiteTest

Use in Pre-Commitโ€‹

# Only run tests that matter for your staged files
CHANGED=$(git diff --cached --name-only | grep '\.cls$' | tr '\n' ',')
squirex impact -f "$CHANGED"