---
schema_version: "1"
id: 67a994befcf39a6cb80ee56ae14c37a89d265fd3a9b12f2ffe702f97c503b9b8
title: ApexTestSuite
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_apextestsuite.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apextestsuite.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: dfca93298152aab69d7bbc7dda7163f6d9e725cc9d031c4d6a5e7a08bbc61739
description: Represents a suite of Apex classes to include in a test run. A TestSuiteMembership object associates each class with the suite. This object is available in API version 36.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. This object is available in API version 36.0 and later.

## Supported Calls

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

## Special Access Rules

In API version 49.0 and later, users must have the View Setup and Configuration permission to access this object.

## Fields

| 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.





 |

## 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'

#### See Also

- [TestSuiteMembership](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_testsuitemembership.htm "Associates an Apex class with an ApexTestSuite. This object is available in API version 36.0 and later.")