# Include synchronized Test Cases to a Test Suite (deprecated)

{% hint style="warning" %}
With SpecSync v5 the `remote/testSuite` setting described here has been deprecated. For including synchronized Test Cases to a Test Suite, please use the [Synchronizing Test Case hierarchies using Test Suites](/specsync/features/common-synchronization-features/synchronizing-test-case-hierarchies.md) feature. For ensuring that SpecSync can detect local test case deletions, please use the [Remote scope](/specsync/features/common-synchronization-features/remote-scope.md) feature. The [Upgrade configuration wizard](/specsync/features/general-features/configuration-wizards.md#upgrade-wizard) can also be used to upgrade this setting for v5.
{% endhint %}

To be able to easily find these synchronized test cases in Azure DevOps, they can be added to test suites. SpecSync can automatically add/remove the synchronized test cases to a test suite. For this you have to specify the name or the ID or the name of the test suite in the configuration.

1. Create a "Static suite" (e.g. "BDD Scenarios") in Azure DevOps. (For that you have to navigate to "Test plans" and create and select a test plan first.)
2. Specify the name of the test suite in the `remote/testSuite/name` entry of the `specsync.json` file. (Alternatively you can specify the ID of the suite in `remote/testSuite/id`. The suite names are not unique in Azure DevOps!)

   ```
   {
     "$schema": "http://schemas.specsolutions.eu/specsync4azuredevops-config-latest.json",

     // See configuration options and samples at http://speclink.me/specsyncconfig.

     "remote": {
       "projectUrl": "https://specsyncdemo.visualstudio.com/MyCalculator",
       "user": "52yny4a......................................ycsetda",
       "testSuite": {
         "name": "BDD Scenarios"
       }
     }
   }
   ```
3. Make sure that the project compiles and the tests pass.
4. Run the synchronization again:

   ```
   path-to-specsync-package\tools\SpecSync4AzureDevOps.exe push
   ```

As a result, SpecSync adds the synchronized test cases to the test suite.

![Test cases were added to the test suite](/files/dC5ooV6NzndncDjMva0P)

If you specify a test suite name that does not exist, SpecSync creates a test suite first (under the first test plan).

{% hint style="info" %}
The test suite names are not unique in Azure DevOps. If the same name is used for multiple suites, you should specify the test suite ID in the `remote/testSuite/id` setting instead.
{% endhint %}

{% hint style="info" %}
Retrieving Test Suites might take longer time when the Test Plan that the Test Suite is defined in is unknown. If you have many Test Plans or experience longer processing time, please specify the Test Plan in the `remote/testSuite/testPlan` setting using the name or the ID `#1234` format.
{% endhint %}

## Removing Test Cases from the Test Suite

When a scenario is removed from the feature file, SpecSync will also remove the linked Test Case from the Test Suite. In that case the Test Case related to the missing scenario is not deleted but tagged with `specsync:removed`. You can review the Test Cases of this tag and delete them manually. (The tag is removed from the Test Case if the scenario is restored.)

{% hint style="info" %}
Scenario removals are detected, but the Test Cases will not be removed from the Test Suite when the synchronization is performed with a filter (e.g. by using the `--filter` command line option). The actual removal will be performed at the next full (unfiltered) synchronization.
{% endhint %}


---

# 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/common-synchronization-features/group-synchronized-test-cases-to-a-test-suite.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.
