Skip to content

test runner

A test runner is a software tool that discovers and executes a project’s automated tests, then reports the results. It locates test files according to naming conventions or configuration, loads them, runs each test in a defined order, captures assertion outcomes, and produces a structured report of passes, failures, errors, and skipped tests.

Many runners also manage setup and teardown actions, run independent tests in parallel, repeat flaky cases, filter tests by markers or patterns, and integrate coverage measurement.

A test runner is conceptually distinct from the testing framework that defines how tests are written. The framework provides the assertion API and fixture model, while the runner drives the execution pipeline. In practice, both responsibilities are often bundled in the same tool. Widely used examples include:

  • pytest and unittest in Python
  • JUnit and TestNG in Java
  • Jest, Mocha, and Vitest in JavaScript
  • RSpec in Ruby
  • The built-in go test in Go

Test runners are a core component of continuous integration pipelines, where every commit triggers a runner to validate the change before merge.

Tutorial

Python's unittest: Writing Unit Tests for Your Code

In this tutorial, you'll learn how to use the unittest framework to create unit tests for your Python code. Along the way, you'll also learn how to create test cases, fixtures, test suites, and more.

intermediate stdlib testing

For additional information on related topics, take a look at the following resources:


By Martin Breuss • Updated June 10, 2026 • Reviewed by Leodanis Pozo Ramos