# Test Runner

> The tool that finds your tests, runs them and shows how many passed.

**Field:** Software Development  
**Category:** Testing & Quality  
**Also known as:** Test Harness, Test Command

## Think of it like

Think of it like a teacher. They hand out the quiz, mark it and read the score.

## Definition

A test runner is the tool that finds your tests, runs them and reports the results. It looks for files with names like test_cart.py or cart.test.js. Then it runs each test and counts how many passed and failed. For each failure it shows the line and the values that did not match. pytest, Jest and Vitest are all test runners.

## Example

Lucy types pytest in her project folder. It finds 48 tests in 6 files, runs them and prints 48 passed in 1.2 seconds.

## Example code

```console
$ pytest -q test_cart.py
.                                  [100%]
1 passed in 0.02s
```

pytest found one test, ran it and reported a pass.

## Why it matters

Without a runner you would call every test by hand. The runner makes the whole suite one command.

## Common mistake

Naming a test file so the runner cannot find it. A test in check_cart.py may never run, and never fail.

## Three principles

- **Finds the tests.** By file and function names.
- **Runs them all.** One command.
- **Reports the score.** Passed, failed, and why.

## Related terms

- [Test Suite](https://learn.benibix.com/term/development/test-suite)
- [Assertion](https://learn.benibix.com/term/development/assertion)
- [pytest](https://learn.benibix.com/term/development/pytest)
- [Jest](https://learn.benibix.com/term/development/jest)

---

Source: https://learn.benibix.com/term/development/test-runner
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
