# Customization: Add Test Cases to Suites

{% hint style="warning" %}
Deprecated: The `addTestCasesToSuites` customization has been replaced by the `hierarchies` feature in SpecSync v5. New configurations should use [Synchronizing Test Case hierarchies using Test Suites](/specsync/features/common-synchronization-features/synchronizing-test-case-hierarchies.md). To migrate existing configurations automatically, run the [`specsync upgrade` command](/specsync/features/general-features/configuration-wizards.md#upgrade-wizard).

This page documents the legacy customization for adding synchronized Test Cases to Azure DevOps Test Suites. The feature remains available for backward compatibility but will be removed in a future major version.
{% endhint %}

The *Add Test Cases to Suites* customization can be used to include the synchronized Test Cases into various static Test Suites based on conditions.

{% hint style="info" %}
The *Add Test Cases to Suites* customization described here is an [Enterprise feature](/specsync/licensing.md).
{% endhint %}

In order to enable this customization, the `customizations/addTestCasesToSuites` section of the configuration has to be enabled. The complete reference of the configuration settings can be found in the [customizations configuration reference](/specsync/reference/configuration/configuration-customizations.md#addtestcasestosuites).

The following example shows a basic configuration that adds all Test Cases to a Suite `All Test Cases` and all Test Cases that are synchronized from scenarios with `@important` tag but without `@external` tag to a Suite `Important Logic` in Test Plan #1234. In addition to these it adds all the Test Cases of scenarios within the `pricing` folder to a Suite named `Pricing`.

```javascript
{
  ...
 "customizations": {
    "addTestCasesToSuites": {
      "enabled": true,
      "testSuites": [
        {
          "name": "All Test Cases"
        },
        {
          "name": "Important Logic",
          "testPlan": "My Plan",
          "condition": "@important and not @external"
        },
        {
          "name": "Pricing",
          "condition": "$sourceFile ~ pricing/"
        }
      ]
    }
  }
  ...
}
```

You can find more examples of the different local test case conditions that can be used in the [Local test case conditions documentation](/specsync/features/general-features/local-test-case-conditions.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.specsolutions.eu/specsync/features/push-features/customization-add-test-cases-to-suites.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
