Test Class Mapping
Create an org test matrix
Navigate to Salesforce → Insights → Test Class Mappings → + New Org Test Matrix
Select Salesforce Org, enter a Name
Configure key toggles (see table below)
Click Save
Disable Autoinclude for unmapped classes
Only explicitly mapped test classes execute. Does not affect manual pipeline runs.
Mandate test class mapping (Auto Include)
Pipeline fails if any Apex class in the package has no mapping. Bypassed if package contains only config (no Apex).
To activate the mandate rule in a pipeline, set Unit Test Type to Auto Include Tests in pipeline config or PR Validation Repository Rules policy.
Add component mappings
Click Manage Mapping → Add Component Mappings
Select Apex classes to map, click Next Step
Choose test classes via Manual Selection, Suggested Mapping (AI-based naming/dependency analysis), or type to Add Manually
Review in Confirmation step and save
Bulk mapping via CSV
Click Manage Mapping → Create Suggested Mapping — system analyzes metadata and downloads a CSV
Review/edit CSV columns: Component Type, Component Name, Test Classes, Actio
Action values: (blank) = add/modify, override = replace, delete = remove mapping
Re-upload via Upload Mapping → Validate → Proceed
Last updated

