Shell Testing
Testing bash and CLI tools with BATS and the Test Anything Protocol.
4 articles by Paul Scarrone.
- Testing Shell Scripts: BATS, TAP, and Treating Bash as a Runtime A working guide to testing bash: what BATS is, why TAP is a reporting protocol rather than a test framework, and how shell function resolution order gives you mocking without a mocking library.
- BATS - Testing Bash Like You Mean It Stop treating bash scripts like second-class citizens. BATS brings real testing rigor to CLI tools—from basic assertions to background processes and state machine validation.
- The Magic of Stubbing sh Testing sh is as easy as anything else, if testing is about side-effects its easy
- TAPS - Not just a reporting protocol Exploring the Test Anything Protocol (TAP) and using BATS to effectively test Bash scripts with practical examples and mocking techniques