Loading

10,000 Character Limit on the RunSpecifiedTests in Apex Deployment

Data pubblicazione: Jul 23, 2026
Descrizione

When deploying Apex code using the RunSpecifiedTests test level, users may encounter truncation when entering test class names, when the content entered in the Run Tests field exceeds 10,000 characters.

The Run Tests field accepts a comma-separated list of Apex test class names to be executed during deployment. When the total character length of the comma-separated list exceeds 10,000 characters, the input may be truncated without a clear error message.


Steps to Reproduce:
  1. Initiate a deployment using RunSpecifiedTests as the test level.
  2. Populate the Run Tests field with a comma-separated list of Apex test class names whose total character length exceeds 10,000 characters.
  3. Observe that the deployment fails or behaves unexpectedly.
Risoluzione

The Run Tests field has a hard character limit of 10,000 characters. To resolve or avoid this issue, use one of the following approaches:

Option 1 — Reduce the number of specified test classes
Trim the list of test classes in the Run Tests field to ensure the total character count (including commas and spaces) stays within 10,000 characters.

Option 2 — Split the deployment into multiple batches
Break the deployment into smaller batches, each with a subset of test classes that keeps the Run Tests field within the 10,000 character limit.

Numero articolo Knowledge

005389824

 
Caricamento
Salesforce Help | Article