# Setup and Teardown

Code run before and after each test.

## What is **Setup and Teardown**?

**Setup** runs before each test (creating objects) and **teardown** after (cleaning up), so tests don't affect each other.

Level: Journeyman · [More Unit Testing terms at this level](https://www.ask-codey.com/glossary/subjects/unit-testing/journeyman)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/setup-and-teardown
