

Modifications to items created in parent blocks are not reversed, see caution below.

You may use this drive to isolate the file operations of your test to a temporary store. It doesn’t come with Pester tests Instead, use the Test-Equality cmdlet from the Functional module on PowerShell Gallery. Pester will remove this drive after the tests completes. Pester also supports testing of string values, as demonstrated in Test Group 4. Pester creates a PSDrive inside the user's temporary drive that is accessible via a named PSDrive TestDrive. It is usually desirable not to perform file activity tests that will produce side effects outside of an individual test. Why should I care That’s a more involved question if you’re new to DevOps in general. It provides a language that allows you to define test cases, and the Invoke-Pester cmdlet to execute these tests and report the results.

TestDrive is a PowerShell PSDrive for file activity limited to the scope of a block ( Describe or Context).Ī test may need to work with file operations and validate certain types of file activities. What is Pester That’s easy to answer Pester is a test framework for PowerShell. Isolating File Operations using the TestDrive
