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
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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