Customization: Add Test Cases to Suites
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. To migrate existing configurations automatically, run the specsync upgrade command.
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.
The Add Test Cases to Suites customization can be used to include the synchronized Test Cases into various static Test Suites based on conditions.
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.
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.
{
...
"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.
Last updated
Was this helpful?