Bats-core
TAP-compliant testing framework for Bash 3.2+ that runs test cases written as Bash functions to verify Bash scripts and other UNIX programs.
Bats (Bash Automated Testing System) is a TAP-compliant testing framework for Bash 3.2 or above. It is used to verify that UNIX programs behave as expected. Bats-core is the community-maintained continuation of the original sstephenson/bats project, forked in 2017 after the original became inactive and later archived.
A Bats test file is a Bash script, run with the bats interpreter, that uses a special @test "description" { ... } syntax. Each test case is a function with a description. Test bodies are ordinary shell commands run with Bash's errexit (set -e) option. A test passes if every command exits with status 0, so each line acts as an assertion, for example [ "$result" -eq 4 ].
Bats is most useful for testing software written in Bash, but it can test any UNIX program that can be invoked from the shell. Because it emits TAP output (for example via bin/bats --tap test), results can be consumed by TAP-aware tooling and CI systems. Documentation is hosted on Read the Docs, and the wiki has a list of open-source projects that use Bats and instructions for editor syntax highlighting. Typical users are developers and DevOps engineers who write shell scripts and command-line tools.
Alternatives & related tools
arduino-cli-interactive
Interactive TUI wrapper for arduino-cli providing menu-driven Arduino development workflows
jscpd
Copy/paste detector for 224 source formats with a Rust engine. Also reports dead code, complexity, git-history duplication trends, and a health score.
Popeye
Read-only scanner that lints live Kubernetes clusters for misconfigurations, unused resources, and over/under allocation, with console, JSON, and HTML reports.
harlequin
Terminal-based SQL IDE with database adapter support for DuckDB, SQLite, PostgreSQL, MySQL and dozens of other databases
pastel
Command-line tool to generate, analyze, convert and manipulate colors across multiple formats and color spaces
add a badge to your README
Maintain Bats-core? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/bats-core?utm_source=badge)<a href="https://www.trmn.sh/tools/bats-core?utm_source=badge"><img src="https://www.trmn.sh/badge/bats-core.svg" alt="Featured on trmn" height="20"></a>