Introduction
shUnit2 is a unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc.
shUnit2 was originally developed to provide a consistent testing solution for log4sh, a shell based logging framework similar to log4j. During the development of that product, the problem of having things work just fine under one shell (/bin/bash on Linux to be specific), and then not working under another shell (/bin/sh on Solaris), kept coming up. Although there were several simple tests ran, they were not adaquate and did not catch very many corner cases. The decision was finally made to write a proper unit test framework after after multiple brown-bag releases were made.
Tested Operating Systems
Cygwin
FreeBSD (user supported)
Linux (Gentoo, Ubuntu)
Mac OS X
Solaris 8, 9, 10
Tested Shells
Bourne Shell (sh)
BASH - GNU Bourne Again SHell (bash)
DASH (dash)
Korn Shell (ksh)
pdksh - Public Domain Korn Shell (pdksh)
See the appropriate Release Notes (doc/RELEASE_NOTES-X.X.X.txt) for this release for the actual versions tested.
Credits / Contributors
A list of contributors to shUnit2 can be found in the source archive as doc/contributors.txt. I want to personally thank all those who have contributed to make this a better tool.
Feedback
Feedback is most certainly welcome for this document. Send your additions, comments and criticisms to the following email address: &myEmail;.