---
schema_version: "1"
id: a9dae5e0107f4acfc7d5e136a9d5369e8c716c54f65c32d5d487e5349f4c2937
title: ApexTestSuite
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_apextestsuite.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_apextestsuite.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 09c5958021f2687a5de30dd7bda69b9e2885fbbb5d08045f81e012a1827bc22b
description: Represents a suite of Apex test classes to include in a test run.
---
# ApexTestSuite

Represents a suite of Apex test classes to include in a test run.

## File Suffix and Directory Location

ApexTestSuite components have the suffix .testSuite and are stored in the testSuites folder.

## Version

ApexTestSuite components are available in API version 38.0 and later.

## Fields

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

## Declarative Metadata Sample Definition

To include namespaced tests in an Apex test suite, specify each namespace individually. Local Apex tests consist of all tests in the org that don’t originate from managed packages.

<?xml version="1.0" encoding="UTF-8"?>
<ApexTestSuite xmlns="http://soap.sforce.com/2006/04/metadata">
   <testClassName\>LocalTestClass</testClassName\>
      <!-- LocalTestClass adds the test class named LocalTestClass. -->
   <testClassName\>A\*Class</testClassName\>
      <!-- A\*Class adds AClass, AnotherClass, AwesomeClass, and so on. -->
   <testClassName\>Namespace1.NamespacedTestClass</testClassName\>
   <testClassName\>\*</testClassName\> <!-- Adds all local tests. -->
   <testClassName\>Namespace1.\*</testClassName\> <!-- Adds all tests in Namespace1. -->
   <testClassName\>Namespace2.\*</testClassName\> <!-- Adds all tests in Namespace2. -->
</ApexTestSuite\>

These syntaxes are supported in package.xml. If the test classes in your suites are already present in the target org, you can omit the ApexClass type in package.xml.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
   <types\>
      <members\>\*</members\>
      <name\>ApexClass</name\>
   </types\>
   <types\>
      <members\>\*</members\>
      <name\>ApexTestSuite</name\>
   </types\>
   <version\>38.0</version\>
</Package\>

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
   <types\>
      <members\>\*</members\>
      <name\>ApexClass</name\>
   </types\>
   <types\>
      <members\>Suite1</members\>
      <members\>Suite2</members\>
      <name\>ApexTestSuite</name\>
   </types\>
   <version\>38.0</version\>
</Package\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).