SpecSync Documentation
Getting StartedConfigurationGuidesDownloads
Azure DevOps
Azure DevOps
  • Introduction to SpecSync for Azure DevOps
  • Getting started
    • Getting started using SpecFlow
    • Getting started using Cucumber or other Gherkin-based BDD tool
  • Installation & Setup
    • Install as .NET tool
    • Install as .NET Console App
    • Install as native binaries for Linux or macOS
    • Install as Docker image
    • Setup and Configure
  • Features
    • Push features
      • Pushing scenario changes to Test Cases
      • Configuring the format of the synchronized test cases
      • Synchronizing Scenario Outlines
      • Add new Test Cases to an Area or an Iteration
      • Mark Test Cases as Automated
      • Setting Test Case state on change
      • Update Test Case fields
      • Attach files to Test Cases using tags
      • Customization: Setting Test Case fields with default values
      • Customization: Update custom Test Case fields on push
      • Customization: Ignoring marked Test Case steps
      • Customization: Ignoring Test Case Tags
      • Customization: Ignore non-supported local tags
      • Customization: Mapping tags
      • Customization: Synchronizing scenarios from feature branches
      • Customization: Reset Test Case state after change
      • Customization: Automatically link changed Test Cases
      • Customization: Synchronize linked artifact titles
      • Customization: Add Test Cases to Suites
      • Customization: Do not synchronize title
    • Pull features
      • Pulling Test Case changes to local scenarios
    • Common synchronization features
      • Configuration key
      • Remote scope
      • Linking Work Items using tags
      • Synchronizing Test Case hierarchies using Test Suites
      • Include synchronized Test Cases to a Test Suite (deprecated)
      • Excluding scenarios from synchronization
      • Synchronization conflict resolution
      • Re-link scenarios to new Test Cases
    • Test result publishing features
      • Publishing test result files
      • Support for Azure DevOps Test Plan / Test Suite based test execution
      • Customization: Publishing test results to multiple Test Suites
    • General features
      • Azure DevOps authentication options
      • Configuration file
      • Hierarchical configuration files
      • Local test case conditions
      • Configuration wizards
      • SpecSync plugins
    • Customizations
    • Plugin list
  • Licensing
  • Guides
    • What is my Azure DevOps project URL?
    • How to define the local feature-set to be synchronized
    • Filters and scopes
    • How to synchronize automated test cases
    • How to use SpecSync from build or release pipeline
    • How to publish test results from pipelines using the VSTest task
    • How to use the SpecSync Azure DevOps pipeline tasks
    • How to link GitHub pull requests
    • How to upgrade to a newer version of SpecSync
    • How to attach files to test results
    • Using SpecSync with SpecFlow+
    • Using SpecSync with Cucumber
    • Using SpecSync with Cypress
    • Using SpecSync with Postman
    • Using SpecSync with TestNG
    • Using SpecSync on macOS or Linux
    • Using SpecSync inside a Docker container
    • How to handle Test Cases of multiple parallel application releases
    • Migrating from SpecSync v3 to v5
    • Migrating from SpecSync v2 to v3
    • Migrating from SpecSync v1 to v2
  • Changelog
  • Release Model and Roadmap
  • Downloads
  • Reference
    • Command line reference
      • init
      • upgrade
      • push
      • pull
      • publish-test-results
      • re-link
      • version
    • Configuration reference
      • toolSettings
      • local
      • remote
      • knownRemotes
      • synchronization
        • push
        • pull
        • automation
        • state
        • areaPath
        • iterationPath
        • links
        • attachments
        • format
        • fieldUpdates
      • hierarchies
      • publishTestResults
      • specFlow
      • reqnroll
      • customizations
    • Compatibility
    • Older versions
  • Contact
    • SpecSync Support
    • Troubleshooting
    • FAQ
  • Project Website
Powered by GitBook
On this page
  • Setting local scope
  • Setting remote scope
  • Setting local filter

Was this helpful?

  1. Guides

Filters and scopes

PreviousHow to define the local feature-set to be synchronizedNextHow to synchronize automated test cases

Last updated 1 month ago

Was this helpful?

SpecSync synchronizes scenarios from feature files to Azure DevOps test cases when using the push command. For that you have to specify which feature files and which scenarios within the feature files should be considered by SpecSync. This is the synchronization local scope or local scope in short.

Similarly to this, when using the pull command (for ), you have to specify the the scope of the test cases that should be considered. This is the synchronization local scope or .

Although the local scope is primarily used for the the push and the remote scope primarily for the pull command, they are both used for both operation actually: the pull command uses the local scope to find changes in the linked Test Cases; the push command can detect removed scenarios using the remote scope.

In general, the synchronization scope defines the set of artifacts (scenarios or Test Cases) that are to be synchronized. In some cases you don't want to synchronize the entire scope though, but only a subset of them. For example while working on a particular story, you only want to synchronize the scenarios related to that story. This can be specified by the synchronization filter.

So scope is a permanent configuration setting, filter is a temporary setting that you want to apply only for a particular synchronization run.

Setting local scope

The set of feature files and scenarios to be considered for the synchronization can be specified in the .

You can choose about which feature files should be considered

  • based on a .NET project

  • based on a folder

You can also limit the scope by set of feature files or particular scenario tags. See for details.

The following example sets the local scope to the scenarios that are marked as @done but exclude the ones that are tagged with @ignored or @planned.

{
  ...
  "local": {
    "tags": "@done and not (@ignored or @planned)"
  },
  ...
}

Setting remote scope

Configuring a remote scope is optional, but recommended. If no remote scope is configured SpecSync will not be able to detect removed local test cases and the related option for the pull command will not be available.

Setting local filter

For example to only synchronize the scenarios related to a particular user story (tagged with @story:123), the following option can be used.

dotnet specsync push --filter "@story:123"

To only synchronize a particular feature file in a sub-folder (e.g. order.feature), the following option can be used.

dotnet specsync push --sourceFileFilter "**/order.feature"

For details on how to specify the remote scope and how does SpecSync detects hand processes removed local test cases, please check the documentation.

To synchronize only a subset of the scenarios within the local scope you can specify a (--filter) or a feature file filter (--sourceFileFilter) expression as a command line option. (See for details.)

two-way synchronization
remote scope
local Configuration
Excluding scenarios from synchronization
Remote scope
local test case condition
Command line reference