shellspec
« Back to VersTracker
Description:
BDD unit testing framework for dash, bash, ksh, zsh and all POSIX shells
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  @shellspec  |  formulae.brew.sh
Category: Developer tools
Tags: testing shell bash devops bdd posix
Install: brew install shellspec
About:
Shellspec is a comprehensive BDD (Behavior-Driven Development) testing framework designed for shell scripts. It allows developers to write tests in a readable, specification-like format to validate script behavior across various POSIX-compliant shells. The tool provides robust testing capabilities including mocking, parameterized tests, and detailed reporting, ensuring script reliability and maintainability.
Key Features:
  • Cross-shell compatibility (bash, zsh, ksh, dash, POSIX)
  • Readable BDD syntax with describe/it blocks
  • Built-in mocking and stubbing capabilities
  • Detailed test reports and code coverage
  • Zero-dependency, self-contained executable
Use Cases:
  • Unit testing shell scripts and automation pipelines
  • Validating POSIX shell script compatibility
  • Testing system administration and DevOps scripts
  • CI/CD integration for shell-based projects
Alternatives:
  • bats-core – Bats is simpler but lacks built-in BDD syntax and advanced features like mocking
  • shunit2 – Older framework with xUnit style, less modern features and shell compatibility
Version History
Detected Version Rev Change Commit