Bats is a TAP-compliant testing framework for Bash. It provides a simple way to verify that the UNIX programs you write behave as expected. A Bats test file is a Bash script with special syntax for defining test cases. Under the hood, each test case is just a function with a description. Bats is most useful when testing software is written in Bash, but you can use it to test any UNIX program. Test cases consist of standard shell commands. Bats makes use of Bash's errexit (set -e) option when running test cases. If every command in the test case exits with a 0 status code (success), the test passes. In this way, each line is an assertion of truth. The Bats source code repository is hosted on GitHub. There you can file bugs on the issue tracker or submit tested pull requests for review.

Features

  • For real-world examples from open-source projects using Bats
  • Learn how to set up your editor for Bats syntax highlighting
  • You can use it to test any UNIX program
  • Bats is most useful when testing software written in Bash
  • Test cases consist of standard shell commands
  • Bats makes use of Bash's errexit option

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Bats-core

Bats-core Web Site

Other Useful Business Software
Auth0 for AI Agents now in GA Icon
Auth0 for AI Agents now in GA

Ready to implement AI with confidence (without sacrificing security)?

Connect your AI agents to apps and data more securely, give users control over the actions AI agents can perform and the data they can access, and enable human confirmation for critical agent actions.
Start building today
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Bats-core!

Additional Project Details

Operating Systems

Windows

Programming Language

Unix Shell

Related Categories

Unix Shell Terminals, Unix Shell Exam Software, Unix Shell Automated Testing Tool

Registered

2022-04-12