During a test, C++test will perform the specified action(s) on all code in the selected resource that satisfies the scope criteria for the selected Test Configuration. By default, C++test checks all code in the resource selected when the Test Configuration is run. However, you can use the Scope tab to configure restrictions such as:

Note that some file filters and line filters are only applicable if you are working with projects that are under supported source control systems. The Scope tab has the following settings:

File Filters


  • Perl-style expressions can be used.
  • The following wildcards are supported:
    • *   matches 0 or more characters except  '/'.
    • ?  matches any single character except '/'.
    • ** matches 0 or more characters, including '/'. This allows you to include path elements.
  • The following sample elements are added by default to the Code Review configuration:
    • **/bin/**/*.properties is added to the sample list of rejected wildcards.
    • (.*?/(bin|obj)(/x86|/x64){0,1}/(Debug|Release)/.*?\\.(dll|exe|pdb))$ is added to the sample list of rejected regexps.
  • Regular expressions can be used to identify specific differences. For instance, if you want to flag only source code changes that add, remove, or modify TODO tags, you would use the Differences regular expression .*TODO.*


A basic file mask might be:

  • *.java, *.xml, *.properties
  • *.c, *.cpp, *.h, *.cc, *.hpp, makefile, .project, .classpath
  • *.c, *.cpp, *.h, *.cc, *.hpp, makefile, *.sln, *.prj, *.res
  • *.cs, *.vb, *.sln, *.prj, *.resx

To include every file whose path has a folder named "bank" or "customer", use: 

  • **/bank/**, **/customer/**

To include every file whose path has a folder with a name that either starts with "bank",  includes "customer", or ends with "invoice", use: 

  • **/bank*/**, **/*customer*/**, **/*invoice/**

To include every .java file that 1) has name that starts with "Test", and 2) is located in a folder named "security" (which is within the src/test directory of any project), use:


To include every .cs file that 1) is in the ATM solution,  2)  is in the ATMLib project, 3) is within the CompanyTests subfolder, 4) has a name that starts with "Test", use:


Line Filters 

Restricts the lines of code that C++test operates on. The file filter is applied first, so code that reaches the line filter must have already passed the file filter. Available line filter options include: