Running tests
When not describing tests interactively, as we did in the previous code samples, you can also place them in script files that end in Tests.ps1. When calling Invoke-Pester and giving it a path to work in, Pester will recursively execute all Describe blocks in all *.Tests.ps1 files and display the test results.
In order to only execute specific test cases, you can pass Invoke-Pester the test names to run. Pester will still enumerate all files, but will only execute the selected tests.
To support a release pipeline, Pester can output its results in an XML format called NUnitXML. This test format is used by the popular .NET unit test framework NUnit, and is understood by many CI tools, such as VSTS and AppVeyor. This will allow ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access