Shell test frameworks

A list of shell TDD frameworks

Shell test frameworks

This is a list of test frameworks and related tools in pure shell.

Sort order is random.

Roundup

Features:

Test cases:

Output: custom human-readable format.

Installer: configure-make-based installer provided.

Codebase consists of a single file.

BATS

Features:

Test cases:

Output: TAP format.

Installer: install.sh provided to do installation Codebase consists of several files

Sharness

Shpec

Features:

Test cases:

Outuput: RSpec-like format.

Installer: installation not needed but can be done via install.sh or a makefile

Codebase is very small and clear although looks not to be very portable.

Shunit

Shunit2

Features:

Test cases:

Wide range of shells and OSes is supported.

This can also be obtained by apt-get install shunit2 in Ubuntu or searched for various forks/clones on github.

Output: custom human-readable format. Codebase consists of a single file.


See also shflags and log4sh of the same author which are commandline param processing library and logging library respectively.

kal-shlib-shunit

shell-unittest of ALTLinux's libshell

Test autorunner searches for test cases in a file pointed to by specific function invocation.

Has very poor documentation. A part of libshell and not usable without the rest of the library.

Features:

Test cases:

Output: custom human-readable format. Codebase for the whole library consists of several files.

Installer: make-based installer provided.

tapper-autoreport

Not an actually testing framework but a library to easily produce output from your script in TAP format.

It seems to carry much legacy stuff in it and I could not actually run it (although I didn't try very hard with it).

Output: TAP format.

testlib.sh

ts

wvtest

Not an actually testing framework but a library to easily produce output in custom test-result format.