🎉 Happy News! The new release is out :-) Get it NOW!

Bats

Bats is one of the most established testing frameworks for Bash, with TAP-compatible output and a compact syntax that fits shell-first projects well.

Usage

Write tests into *.bats files like:

#!/usr/bin/env bats

@test "addition using bc" {
  result="$(echo 2+2 | bc)"
  [ "$result" -eq 4 ]
}

Then run the test:

$ bats test.bats
 ✓ addition using bc

1 test, 0 failures