Comprehensive guidance for writing unit and integration tests for shell scripts using Bats. Covers installation, test structure, setup/teardown, common assertion patterns, fixtures, mocking/stubbing, CI integration, and cross-shell compatibility. Helps engineers produce maintainable, CI-friendly test suites for shell utilities and scripts.
Use this skill when you need to: write tests for shell scripts; adopt TDD for bash utilities; add automated tests to CI pipelines; validate behavior across bash/sh/dash; or create fixtures and mocks for complex shell scenarios.
Likely compatible with terminal-enabled agents and environments that can run shell tooling (agents with shell/terminal access such as Codex/GPT with exec, CLI-focused agents).
Pure documentation skill providing comprehensive Bats testing patterns for shell scripts. No bundled scripts to execute — it's a reference guide with code examples. Covers setup/teardown, mocking, fixtures, CI integration, and best practices. Well-written but some examples are platform-specific (macOS stat syntax) without noting Linux alternatives.
Single-file knowledge skill, no scripts/. Could be improved with a scaffold script that generates a Bats test template. Some code examples are macOS-biased.