コード例 #1
0
ファイル: Configuration.cs プロジェクト: toddbrownmcis/Pester
 public FilterConfiguration() : base("Filter configuration")
 {
     Tag        = new StringArrayOption("Tags of Describe, Context or It to be run.", new string[0]);
     ExcludeTag = new StringArrayOption("Tags of Describe, Context or It to be excluded from the run.", new string[0]);
     Line       = new StringArrayOption(@"Filter by file and scriptblock start line, useful to run parsed tests programatically to avoid problems with expanded names. Example: 'C:\tests\file1.Tests.ps1:37'", new string[0]);
     FullName   = new StringArrayOption("Full name of test with -like wildcards, joined by dot. Example: '*.describe Get-Item.test1'", new string[0]);
 }
コード例 #2
0
ファイル: Configuration.cs プロジェクト: toddbrownmcis/Pester
 public DebugConfiguration() : base("Debug configuration for Pester. ⚠ Use at your own risk!")
 {
     ShowFullErrors         = new BoolOption("Show full errors including Pester internal stack.", false);
     WriteDebugMessages     = new BoolOption("Write Debug messages to screen.", false);
     WriteDebugMessagesFrom = new StringArrayOption("Write Debug messages from a given source, WriteDebugMessages must be set to true for this to work. You can use like wildcards to get messages from multiple sources, as well as * to get everything.", new string[] { "Discovery", "Skip", "Filter", "Mock", "CodeCoverage" });
     ShowNavigationMarkers  = new BoolOption("Write paths after every block and test, for easy navigation in VSCode.", false);
     ReturnRawResultObject  = new BoolOption("Returns unfiltered result object, this is for development only. Do not rely on this object for additional properties, non-public properties will be renamed without previous notice.", false);
 }
コード例 #3
0
 public CodeCoverageConfiguration() : base("CodeCoverage configuration.")
 {
     Enabled        = new BoolOption("Enable CodeCoverage.", false);
     OutputFormat   = new StringOption("Format to use for code coverage report. Possible values: JaCoCo", "JaCoCo");
     OutputPath     = new StringOption("Path relative to the current directory where code coverage report is saved.", "coverage.xml");
     OutputEncoding = new StringOption("Encoding of the output file.", "UTF8");
     Path           = new StringArrayOption("Directories or files to be used for codecoverage, by default the Path(s) from general settings are used, unless overridden here.", new string[0]);
     ExcludeTests   = new BoolOption("Exclude tests from code coverage. This uses the TestFilter from general configuration.", true);
 }
コード例 #4
0
ファイル: Configuration.cs プロジェクト: toddbrownmcis/Pester
 public RunConfiguration() : base("Run configuration.")
 {
     Path          = new StringArrayOption("Directories to be searched for tests, paths directly to test files, or combination of both.", new string[] { "." });
     ExcludePath   = new StringArrayOption("Directories or files to be excluded from the run.", new string[0]);
     ScriptBlock   = new ScriptBlockArrayOption("ScriptBlocks containing tests to be executed.", new ScriptBlock[0]);
     Container     = new ContainerInfoArrayOption("ContainerInfo objects containing tests to be executed.", new ContainerInfo[0]);
     TestExtension = new StringOption("Filter used to identify test files.", ".Tests.ps1");
     Exit          = new BoolOption("Exit with non-zero exit code when the test run fails.", false);
     PassThru      = new BoolOption("Return result object to the pipeline after finishing the test run.", false);
 }
コード例 #5
0
 public RunConfiguration() : base("Run configuration.")
 {
     Path          = new StringArrayOption("Directories to be searched for tests, paths directly to test files, or combination of both.", new string[] { "." });
     ExcludePath   = new StringArrayOption("Directories or files to be excluded from the run.", new string[0]);
     ScriptBlock   = new ScriptBlockArrayOption("ScriptBlocks containing tests to be executed.", new ScriptBlock[0]);
     Container     = new ContainerInfoArrayOption("ContainerInfo objects containing tests to be executed.", new ContainerInfo[0]);
     TestExtension = new StringOption("Filter used to identify test files.", ".Tests.ps1");
     Exit          = new BoolOption("Exit with non-zero exit code when the test run fails. When used together with Throw, throwing an exception is preferred.", false);
     Throw         = new BoolOption("Throw an exception when test run fails. When used together with Exit, throwing an exception is preferred.", false);
     PassThru      = new BoolOption("Return result object to the pipeline after finishing the test run.", false);
     SkipRun       = new BoolOption("Runs the discovery phase but skips run. Use it with PassThru to get object populated with all tests.", false);
 }
コード例 #6
0
 public CodeCoverageConfiguration() : base("CodeCoverage configuration.")
 {
     Enabled               = new BoolOption("Enable CodeCoverage.", false);
     OutputFormat          = new StringOption("Format to use for code coverage report. Possible values: JaCoCo, CoverageGutters", "JaCoCo");
     OutputPath            = new StringOption("Path relative to the current directory where code coverage report is saved.", "coverage.xml");
     OutputEncoding        = new StringOption("Encoding of the output file.", "UTF8");
     Path                  = new StringArrayOption("Directories or files to be used for codecoverage, by default the Path(s) from general settings are used, unless overridden here.", new string[0]);
     ExcludeTests          = new BoolOption("Exclude tests from code coverage. This uses the TestFilter from general configuration.", true);
     RecursePaths          = new BoolOption("Will recurse through directories in the Path option.", true);
     UseBreakpoints        = new BoolOption("EXPERIMENTAL: When false, use Profiler based tracer to do CodeCoverage instead of using breakpoints.", true);
     CoveragePercentTarget = new DecimalOption("Target percent of code coverage that you want to achieve, default 75%.", 75m);
     SingleHitBreakpoints  = new BoolOption("Remove breakpoint when it is hit.", true);
 }
コード例 #7
0
ファイル: Configuration.cs プロジェクト: toddbrownmcis/Pester
 public StringArrayOption(StringArrayOption option, string[] value) : base(option, value)
 {
 }