You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cleanup about_* help topics and extract PesterConfiguration docs to about_PesterConfiguration (#2518)
* Remove outdated docs
* Include option types in PesterConfiguration docs
* Add draft for about_PesterConfiguration help topic
* Move PesterConfiguration options reference to help topic
* Minor text updates
* wip
* Update Invoke-Pester help for Configuration
* Update build script
* Update help for Invoke-Pester -Configuration
* Fix build script
* Update about_Pester.help.txt
* Update release script
Copy file name to clipboardExpand all lines: src/Pester.RSpec.ps1
+5-145Lines changed: 5 additions & 145 deletions
Original file line number
Diff line number
Diff line change
@@ -288,154 +288,11 @@ function New-PesterConfiguration {
288
288
289
289
Calling New-PesterConfiguration is equivalent to calling [PesterConfiguration]::Default which was used in early versions of Pester 5.
290
290
291
-
Sections and options:
292
-
293
-
```
294
-
Run:
295
-
Path: Directories to be searched for tests, paths directly to test files, or combination of both.
296
-
Default value: @('.')
297
-
298
-
ExcludePath: Directories or files to be excluded from the run.
299
-
Default value: @()
300
-
301
-
ScriptBlock: ScriptBlocks containing tests to be executed.
302
-
Default value: @()
303
-
304
-
Container: ContainerInfo objects containing tests to be executed.
305
-
Default value: @()
306
-
307
-
TestExtension: Filter used to identify test files.
308
-
Default value: '.Tests.ps1'
309
-
310
-
Exit: Exit with non-zero exit code when the test run fails. Exit code is always set to `$LASTEXITCODE` even when this option is `$false`. When used together with Throw, throwing an exception is preferred.
311
-
Default value: $false
312
-
313
-
Throw: Throw an exception when test run fails. When used together with Exit, throwing an exception is preferred.
314
-
Default value: $false
315
-
316
-
PassThru: Return result object to the pipeline after finishing the test run.
317
-
Default value: $false
318
-
319
-
SkipRun: Runs the discovery phase but skips run. Use it with PassThru to get object populated with all tests.
320
-
Default value: $false
321
-
322
-
SkipRemainingOnFailure: Skips remaining tests after failure for selected scope, options are None, Run, Container and Block.
323
-
Default value: 'None'
324
-
325
-
Filter:
326
-
Tag: Tags of Describe, Context or It to be run.
327
-
Default value: @()
328
-
329
-
ExcludeTag: Tags of Describe, Context or It to be excluded from the run.
330
-
Default value: @()
331
-
332
-
Line: Filter by file and scriptblock start line, useful to run parsed tests programmatically to avoid problems with expanded names. Explicit filter that overrides -Skip. Example: 'C:\tests\file1.Tests.ps1:37'
333
-
Default value: @()
334
-
335
-
ExcludeLine: Exclude by file and scriptblock start line, takes precedence over Line.
336
-
Default value: @()
337
-
338
-
FullName: Full name of test with -like wildcards, joined by dot. Example: '*.describe Get-Item.test1'
339
-
Default value: @()
340
-
341
-
CodeCoverage:
342
-
Enabled: Enable CodeCoverage.
343
-
Default value: $false
344
-
345
-
OutputFormat: Format to use for code coverage report. Possible values: JaCoCo, CoverageGutters
346
-
Default value: 'JaCoCo'
347
-
348
-
OutputPath: Path relative to the current directory where code coverage report is saved.
349
-
Default value: 'coverage.xml'
350
-
351
-
OutputEncoding: Encoding of the output file.
352
-
Default value: 'UTF8'
353
-
354
-
Path: Directories or files to be used for code coverage, by default the Path(s) from general settings are used, unless overridden here.
355
-
Default value: @()
356
-
357
-
ExcludeTests: Exclude tests from code coverage. This uses the TestFilter from general configuration.
358
-
Default value: $true
359
-
360
-
RecursePaths: Will recurse through directories in the Path option.
361
-
Default value: $true
362
-
363
-
CoveragePercentTarget: Target percent of code coverage that you want to achieve, default 75%.
364
-
Default value: 75
365
-
366
-
UseBreakpoints: When false, use Profiler based tracer to do CodeCoverage instead of using breakpoints.
367
-
Default value: $false
368
-
369
-
SingleHitBreakpoints: Remove breakpoint when it is hit. This increases performance of breakpoint based CodeCoverage.
370
-
Default value: $true
371
-
372
-
TestResult:
373
-
Enabled: Enable TestResult.
374
-
Default value: $false
375
-
376
-
OutputFormat: Format to use for test result report. Possible values: NUnitXml, NUnit2.5, NUnit3 or JUnitXml
377
-
Default value: 'NUnitXml'
378
-
379
-
OutputPath: Path relative to the current directory where test result report is saved.
380
-
Default value: 'testResults.xml'
381
-
382
-
OutputEncoding: Encoding of the output file.
383
-
Default value: 'UTF8'
384
-
385
-
TestSuiteName: Set the name assigned to the root 'test-suite' element.
386
-
Default value: 'Pester'
387
-
388
-
Should:
389
-
ErrorAction: Controls if Should throws on error. Use 'Stop' to throw on error, or 'Continue' to fail at the end of the test.
390
-
Default value: 'Stop'
391
-
392
-
DisableV5: Disables usage of Should -Be assertions, that are replaced by Should-Be in version 6.
393
-
Default value: $false
394
-
395
-
Debug:
396
-
ShowFullErrors: Show full errors including Pester internal stack. This property is deprecated, and if set to true it will override Output.StackTraceVerbosity to 'Full'.
397
-
Default value: $false
398
-
399
-
WriteDebugMessages: Write Debug messages to screen.
400
-
Default value: $false
401
-
402
-
WriteDebugMessagesFrom: 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.
ShowNavigationMarkers: Write paths after every block and test, for easy navigation in VSCode.
406
-
Default value: $false
407
-
408
-
ReturnRawResultObject: 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.
409
-
Default value: $false
410
-
411
-
Output:
412
-
Verbosity: The verbosity of output, options are None, Normal, Detailed and Diagnostic.
413
-
Default value: 'Normal'
414
-
415
-
StackTraceVerbosity: The verbosity of stacktrace output, options are None, FirstLine, Filtered and Full.
416
-
Default value: 'Filtered'
417
-
418
-
CIFormat: The CI format of error output in build logs, options are None, Auto, AzureDevops and GithubActions.
419
-
Default value: 'Auto'
420
-
421
-
CILogLevel: The CI log level in build logs, options are Error and Warning.
422
-
Default value: 'Error'
423
-
424
-
RenderMode: The mode used to render console output, options are Auto, Ansi, ConsoleColor and Plaintext.
425
-
Default value: 'Auto'
426
-
427
-
TestDrive:
428
-
Enabled: Enable TestDrive.
429
-
Default value: $true
430
-
431
-
TestRegistry:
432
-
Enabled: Enable TestRegistry.
433
-
Default value: $true
434
-
```
291
+
For a complete list of options, see `Get-Help about_PesterConfiguration` or https://pester.dev/docs/usage/configuration
435
292
436
293
.PARAMETERHashtable
437
294
Override the default values for the options defined in the provided dictionary/hashtable.
438
-
See Description in this help or inspect a PesterConfiguration-object to learn about the schema and
295
+
See about_PesterConfiguration help topic or inspect a PesterConfiguration-object to learn about the schema and
439
296
available options.
440
297
441
298
.EXAMPLE
@@ -479,6 +336,9 @@ function New-PesterConfiguration {
0 commit comments