awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目MCP 服务器关于排名机制媒体报道
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
sstephenson avatar

sstephenson/batsArchived

0
View on GitHub↗
7,107 星标·510 分支·Shell·MIT·10 次浏览

Bats

BATS 是一个专为 Bash 脚本和 Unix 程序设计的测试框架和验证工具。它充当测试运行器,通过验证退出状态和命令输出来验证命令行工具的行为。

该框架作为符合 TAP 标准的测试运行器,其输出遵循 Test Anything Protocol,以便与报告工具和持续集成流水线集成。

该工具提供测试自动化功能,包括在独立子进程中执行测试,以及通过 setup 和 teardown 函数进行生命周期管理。它涵盖了跨目录的结果聚合、命令输出捕获以及共享测试辅助工具的加载。

项目为测试文件提供了语法高亮规则,以辅助文本编辑器中的代码可读性和维护。

Features

  • Bash Script Testing - Provides a dedicated framework for verifying that shell scripts and Unix programs behave as expected.
  • Bash - Provides a framework for writing and running tests for Bash scripts using simple syntax for exit statuses and output.
  • TAP Stream Outputs - Produces test results in the standardized Test Anything Protocol format for compatibility with external runners.
  • System Stream Interception - Intercepts standard output and error streams, buffering them and displaying contents only upon test failure.
  • Operation Output Captures - Captures the exit status and output streams of commands to verify resulting data and error messages.
  • Global Output Interception - Intercepts global stdout and stderr, displaying the captured content only when a test case fails.
  • Automated Test Suites - Provides an automated suite for validating that command line tools produce correct results across different environments.
  • Behavior Verification - Validates the functional behavior of Unix command line utilities by comparing actual outputs against expected results.
  • Behavioral Verification Tools - Provides tools to verify the behavior of Unix command line programs through automated suites and isolated environments.
  • CI Test Exporting - Outputs test outcomes in machine-parsable formats, such as TAP, for seamless integration with continuous delivery pipelines.
  • Test Isolation - Executes each test case in a separate child process to prevent environment pollution and shared state interference.
  • Test Lifecycle Hooks - Implements setup and teardown functions that execute before and after individual test cases.
  • Test Lifecycle Hooks - Implements setup and teardown functions to ensure a consistent execution environment for every test case.
  • Continuous Integration Checks - Integrates standardized test results into continuous integration pipelines to automatically detect regressions in shell scripts.
  • Test Report Aggregators - Aggregates results from multiple test files across directories into a combined exit status and summary report.
  • Conditional Skipping - Allows specific tests to be bypassed using conditional triggers or manual reasons to avoid unnecessary failures.
  • Test Dependency Validation - Evaluates required components during the initial load to terminate the test suite early if dependencies are missing.
  • Test File Discovery - Automatically scans project directories to identify and map test files for execution.
  • Test Producers - A testing framework for Bash scripts.

Star 历史

sstephenson/bats 的 Star 历史图表sstephenson/bats 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Bats 的开源替代方案

相似的开源项目,按与 Bats 的功能重合度排序。
  • thomhurst/tunitthomhurst 的头像

    thomhurst/TUnit

    3,744在 GitHub 上查看↗

    TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source generation for test discovery and mock creation, ensuring compatibility with Native AOT and IL trimming by eliminating the need for runtime reflection and proxies. The framework provides specialized capabilities for integration testing, including the management of distributed application lifecycles, isolated database schemas, and the correlation of telemetry and logs across process boundaries via OTLP. It also includes an HTTP testing utility to intercept network exchanges and mock AP

    C#csharpdotnettest
    在 GitHub 上查看↗3,744
  • substack/tapesubstack 的头像

    substack/tape

    5,800在 GitHub 上查看↗

    Tape is a JavaScript testing framework and assertion library that serves as a test runner for Node.js and browser environments. It implements the Test Anything Protocol to provide a standardized, machine-readable format for test results. The project functions as a cross-environment test harness, allowing the same test suites to be executed across both server-side and client-side environments while maintaining a consistent output protocol. Its capabilities include validating value equality and truthiness, verifying exception handling, and coordinating asynchronous workflows. The framework als

    JavaScript
    在 GitHub 上查看↗5,800
  • avajs/avaavajs 的头像

    avajs/ava

    20,849在 GitHub 上查看↗

    Ava is a test runner for JavaScript and TypeScript designed to execute test suites with a focus on concurrency and isolation. It serves as a concurrent test executor that runs test files in parallel across multiple processes to reduce total runtime and prevent state leakage between suites. The project features a built-in snapshot testing framework that saves large data structures to disk and compares subsequent executions to detect regressions via diffs. It is also compatible with the Test Anything Protocol, allowing it to export results for use with external reporting tools. Its capability

    JavaScriptassertasyncasync-functions
    在 GitHub 上查看↗20,849
  • jquery/qunitjquery 的头像

    jquery/qunit

    4,035在 GitHub 上查看↗

    QUnit is a JavaScript unit testing framework designed to verify code behavior using assertions and lifecycle hooks across browsers and server runtimes. It functions as a browser-based test runner with an HTML interface for reporting results, an asynchronous test orchestrator for coordinating callbacks, and a utility for isolating and verifying document object model changes. The framework distinguishes itself through specialized DOM testing capabilities, allowing for the isolation and resetting of the document object model between tests to ensure atomicity. It also features a system for detect

    JavaScript
    在 GitHub 上查看↗4,035
查看 Bats 的所有 30 个替代方案→

常见问题解答

sstephenson/bats 是做什么的?

BATS 是一个专为 Bash 脚本和 Unix 程序设计的测试框架和验证工具。它充当测试运行器,通过验证退出状态和命令输出来验证命令行工具的行为。

sstephenson/bats 的主要功能有哪些?

sstephenson/bats 的主要功能包括:Bash Script Testing, Bash, TAP Stream Outputs, System Stream Interception, Operation Output Captures, Global Output Interception, Automated Test Suites, Behavior Verification。

sstephenson/bats 有哪些开源替代品?

sstephenson/bats 的开源替代品包括: thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… substack/tape — Tape is a JavaScript testing framework and assertion library that serves as a test runner for Node.js and browser… avajs/ava — Ava is a test runner for JavaScript and TypeScript designed to execute test suites with a focus on concurrency and… jquery/qunit — QUnit is a JavaScript unit testing framework designed to verify code behavior using assertions and lifecycle hooks… onsi/ginkgo — Ginkgo is a behavior-driven development testing framework, assertion library, and test runner for Go. It provides a… vitest-dev/vitest — Vitest is a high-performance testing framework designed for JavaScript and TypeScript applications. It provides an…