# TestDrive

*noun*

say it: **“TEST dryve”** **/ˈtɛst draɪv/**

An empty scratch folder Pester makes for a group of tests and deletes afterwards, so tests can write files safely.

## What is **TestDrive** in Pester?

`TestDrive:` is a scratch folder Pester makes, empty, for each `Describe` block and deletes when the block ends. A test can write playlists and reports there without touching your real files.

```powershell
$csv = Join-Path $TestDrive 'test.csv'
Set-Content $csv 'Title,Artist,Length', 'Golden Hour Drive,The Night Owls,3:45'
(Get-Song -Path $csv).Count | Should -Be 1
```

## In a sentence

- “The test writes its pretend playlist into **TestDrive**.”
- “Nothing in **TestDrive** is left behind after the tests finish.”

Level: Freelancer · [More PowerShell terms at this level](https://www.ask-codey.com/glossary?category=powershell&level=4)

Updated: November 10, 2026

Source: https://www.ask-codey.com/glossary/testdrive
