Get Started with Testing API

Testing API combines endpoints from two preexisting Salesforce APIs: Metadata API and Connect API.

Testing API is available only in sandboxes. Note that running tests consumes requests and credits and can modify data.

To use Salesforce CLI to create and test agents instead of directly using Metadata API and Connect API, see Agentforce DX.

To use Testing API, you must have Agentforce enabled with at least one agent activated. See Set Up Agents in Salesforce Help.

You must also be familiar with how to use Metadata API and Connect API.

Use Metadata API to create tests and deploy them to different orgs. Use Connect API to run the tests.

The following diagram is the high-level worklfow of Testing API.

API Flow