Run ISV Hammer on Package Versions and Subscriber Orgs
Where: This change applies to Lightning Experience, and Enterprise and Unlimited editions. In addition, ISV Hammer can only be enabled in the orgs with Developer Hub enabled. And for all the packages that are intended to be tested, namespaces for those packages need to be added to the Namespace Registry. See Link a Namespace to a Dev Hub Org.
- To start ISV Hammer tests, run the Salesforce CLI command sfdx force:package:hammertest:run.
- Use this command to run ISV Hammer for the specified package versions and subscriber orgs.
If Salesforce has enabled Multiple Managed Packages for your org, you can test more than one package version. Supply the IDs of the package versions you want to test in the desired order of execution.
The command creates a copy of each of the supplied subscriber orgs and tests the package upgrade in each of them.
If a scheduled date/time is supplied, validation and setup start immediately but the package upgrade test does not start until after the supplied date/time. Format the --scheduledrundatetime value as YYYY-MM-DD HH:mm:ss in the GMT timezone. This date cannot be more than 25 days from today.
To test against the Salesforce preview release version, during the sandbox preview window, include --preview and a --scheduledrundatetime value that’s immediately after a staggered release, based on the Salesforce release calendar.
To run the package version’s Apex tests in each subscriber org after successfully testing the package upgrade, include --apextests.
The command returns a request ID. (This ID always starts with 0TW). Use this ID to query for the test status by running sfdx force:package:hammertest:report -i 0TW....Examples:
sfdx force:package:hammertest:run --targetusername firstname.lastname@example.org \ --packageversionids 04t...a,04t...b \ --subscriberorgs 00D...a,00Dx...b
sfdx force:package:hammertest:run -u email@example.com -i 04txxxxxx \ --subscriberfile subscriberOrgs.txt
- For details about the status of an in-progress ISV Hammer run, or to see the results of a completed run, run sfdx force:package:hammertest:report.
sfdx force:package:hammertest:report --targetusername firstname.lastname@example.org \ --requestid 0TWxxxxxxxx
- To list your ISV Hammer runs, run sfdx force:package:hammertest:list.
sfdx force:package:hammertest:list --targetusername email@example.com \ --packageversionid 04txxxxxxxxx
sfdx force:package:hammertest:list -u firstname.lastname@example.org