---
schema_version: "1"
id: bbe7c2bcfb3fffc9e9e03b810f286b414b60ababbac4d8555249cff624888880
title: ApexTestSuite
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_apextestsuite.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apextestsuite.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3795eb048615630aa593f3fcf83789b95b4b45f13a2a77e69a7d1f493eede0cc
description: Represents a suite of Apex classes to include in a test run. A TestSuiteMembership object associates each class with the suite. Available in the ens namespace in Tooling API version 36.0 and later. Also, available in the mns namespace in Tooling API version 38.0 and later.
---
# ApexTestSuite

Represents a suite of Apex classes to include in a test run. A TestSuiteMembership object associates each class with the suite. Available in the ens namespace in Tooling API version 36.0 and later. Also, available in the mns namespace in Tooling API version 38.0 and later.

## Supported SOAP API Calls

create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()

## Supported REST API HTTP Methods

Query, GET, POST, PATCH, DELETE

## Fields (ens Namespace)

| Field Name | Description |
| --- | --- |
| TestSuiteName | 
Type

string

Properties

Create, Filter, Group, Sort, Unique, Update

Description

The name of the Apex test suite. This label appears in the user interface.

This value is case-sensitive and must be unique.





 |

## Fields (mns Namespace)

| Field Name | Field Type | Description |
| --- | --- | --- |
| testClassName | string\[\] | A list of Apex test classes, specified by name, to include in this test suite. |

## Usage

Insert a TestSuiteMembership object using an API call to associate an Apex class with an ApexTestSuite object. (ApexTestSuite and TestSuiteMembership aren’t editable through Apex DML.) To remove the class from the test suite, delete the TestSuiteMembership object. If you delete an Apex test class or test suite, all TestSuiteMembership objects that contain that class or suite are deleted.

The following SOQL query returns the membership object that relates this Apex class to this test suite.

SELECT Id FROM TestSuiteMembership WHERE ApexClassId = '01pD0000000Fhy9IAC'
    AND ApexTestSuiteId = '05FD00000004CDBMA2'