---
schema_version: "1"
id: 0e76fd996a00f01ddc9253c8df1e50e4347463d8e2d9df5be2c491df131c7c55
title: IntegrationTest Class (Developer Preview)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_System_IntegrationTest.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_System_IntegrationTest.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3956c9950a6c68824663b28cd9bfe901952c02329cce0bcae7944a17fc15a9c1
description: Contains the commitTestOnly() method that can be called from an @IntegrationMethod to commit data mid-transaction so that it’s visible to service threads such as Agentforce and Data 360.Commits data to the database mid-transaction so it’s visible to service threads such as Agentforce and Data 360. It resets the uncommitted work checkpoint and mixed DML tracking for the new transaction boundary. The method can only be called from an @IntegrationTest method.
---
# IntegrationTest Class (Developer Preview)

Contains the commitTestOnly() method that can be called from an @IntegrationMethod to commit data mid-transaction so that it’s visible to service threads such as Agentforce and Data 360.

## Namespace

[System](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_System.htm "The System namespace provides classes and methods for core Apex functionality.")

![Note](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/images/icon_note.png)

#### Note

The Apex Integration Tests feature is available as a developer preview in scratch orgs in Summer ’26 (API version 67.0). The feature isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. All commands, parameters, and other features are subject to change or deprecation at any time, with or without notice. Don't implement functionality developed with these commands or tools in your production package.

- **[IntegrationTest Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_System_IntegrationTest.htm#apex_System_IntegrationTest_methods)**

## IntegrationTest Methods

The following are methods for IntegrationTest.

- **[commitTestOnly()(Developer Preview)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_System_IntegrationTest.htm#apex_System_IntegrationTest_commitTestOnly)**  
    Commits data to the database mid-transaction so it’s visible to service threads such as Agentforce and Data 360. It resets the uncommitted work checkpoint and mixed DML tracking for the new transaction boundary. The method can only be called from an @IntegrationTest method.

### commitTestOnly()(Developer Preview)

Commits data to the database mid-transaction so it’s visible to service threads such as Agentforce and Data 360. It resets the uncommitted work checkpoint and mixed DML tracking for the new transaction boundary. The method can only be called from an @IntegrationTest method.

![Note](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/images/icon_note.png)

#### Note

The Apex Integration Tests feature is available as a developer preview in scratch orgs as of Summer ’26 (API version 67.0). The feature isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. All commands, parameters, and other features are subject to change or deprecation at any time, with or without notice. Don't implement functionality developed with these commands or tools in your production package.

#### Signature

public static void commitTestOnly()

#### Return Value

Type: void

#### Usage

When you call IntegrationTest.commitTestOnly(), active savepoints created with Database.setSavepoint() are committed and released. Records locked with the FOR UPDATE SOQL clause are also released.

#### See Also

- [_Apex Developer Guide_: Apex Integration Tests for Agentforce and Data 360 Services (Developer Preview)](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexcode.meta/apexcode/apex_testing_integration_testing.htm "Apex Developer Guide: Apex Integration Tests for Agentforce and Data
    360 Services (Developer Preview) - HTML (New Window)")