blog
2026-09-23Winter '271 min read

Salesforce Winter '27 Apex integration tests

Apex integration tests can make real HTTP callouts in Salesforce Winter '27, with developer preview access limited to scratch orgs.

Abstract artwork for the article "Salesforce Winter '27 Apex integration tests"

Salesforce Winter '27 Apex integration tests can make real HTTP callouts to any endpoint, including External Services through Named Credentials. The feature is a **developer preview, available only in scratch orgs**. release note

Configure and run

  1. **Enable the feature and prepare the test.** Enable ApexIntegrationTests in the scratch org definition. Use @IntegrationTest to relax callout restrictions and rollback semantics, @BeforeClass to set up data shared across test methods, and @TearDown to clean up committed data.
  1. **Remove mock registrations.** Remove Test.setMock() registrations from the integration tests being evaluated so calls reach real endpoints.
  1. **Run asynchronously.** Execute tests through the Tooling API runTestsAsynchronous resource. Execution is asynchronous only, with **one concurrent integration test**.

Editorial recommendations

These checks are operational guidance, not Salesforce configuration requirements.

Before running, verify target endpoints and inspect any Named Credentials used by the calls. Choose targets with real requests in mind.

During the test, record identifiers for data created in the scratch org. Track effects at the called endpoint separately, including identifiers for any records created there.

After @TearDown, check the scratch-org records for anything remaining. Verify endpoint-side effects independently; do not assume @TearDown reverses external changes. Investigate remaining data or unexpected effects before rerunning.

release items covered