$ExcludedTestFiles
$ExcludedTestFiles
is an option of TestFiles and TestSummary that specifies which test files are to be excluded when selecting or running test files.
Details and Options
- Functions like TestFiles and TestSummary typically act on multiple test files associated with a symbol, paclet or file-system categorization. $ExcludedTestFiles reduces the collection of files acted upon by excluding files that match given patterns.
- Common settings include:
-
{"*FileSystemModify.*"} exclude files containing tests that modify the underlying file system None do not exclude any test files {spec1,spec2,…} exclude test files matching any of the spec1
Examples
Basic Examples (1)
By default, test files matching the string pattern "*FileSystemModify.* are excluded since they are by design intended to include tests that modify the underlying file system.
As a result, by default TestSummary does not include test files matching the pattern "*FileSystemModify.*
Excluding these file modifying tests ensures testing takes place entirely in memory and hence is generally efficient.
Now include all available test files in a possible test suite.
Similarly when generating a test summary all available test files can be specified to be included.
Next, perform all tests used by CodeAssurance on CreateDeveloperPaclet which internally includes writing files to $TemporaryDirectory (warning - this can take several minutes).
Including file-modifying tests can increase the time to generate a summary by orders of magnitude.
To implement a more persistent exclusion of desired test files, change the value of $ExcludedTestFiles.
Persistently exclude exception handling tests:
Return automatically all test files except those that match "*ExceptionHandling.*"
Return the number of test files used by CodeAssurance except those that match "*ExceptionHandling.*".
Reset $ExcludedTestFiles to its default value.