# kward/shunit2

shUnit2 is a xUnit based unit test framework for Bourne based shell scripts.

Repository: https://github.com/kward/shunit2
Canonical: https://ross.abutalabs.com/products/shunit2
Language: Shell
License: Apache-2.0
License Family: permissive
Last push: 2026-03-15T21:14:41+00:00

## Health v2 (maintenance only)
Score: 55/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 72, release rhythm 8, longevity 100
- inputs: {"age_days": 4086, "days_push": 171, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1737, forks 202 (observed 2026-08-28T04:05:29.899436+00:00)

## What it is
shUnit2 is a xUnit-style unit test framework for Bourne-based shell scripts, modeled after JUnit and PyUnit. It lets developers write and run assertions-based tests for shell scripts across many shells and operating systems.

## Use cases
- write unit tests for bash scripts
- test shell scripts across sh, bash, dash, ksh, zsh
- add xUnit-style assertions to shell code
- catch cross-shell portability bugs in scripts
- run shell script tests in CI

## When to choose
- you need structured unit tests for shell scripts
- you must support multiple Bourne-family shells and Unix platforms
- you want a lightweight, dependency-free test framework for shell

## When to avoid
- you need testing for languages other than shell
- you want modern assertion libraries with mocking or coverage tooling
- your project uses PowerShell or fish shells

## Facets
- artifact type: library
- maturity: stable
- function: testing
- domain: testing, developer-tools
- platform: cross-platform, cli
- tags: shell-scripting, xunit, unit-testing, bash, posix-shell, command-line, linux, macos

## Member repositories
- kward/shunit2 (main) score 55

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:29.899436+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:30:38.406230+00:00, confidence not recorded.
  - readme: https://github.com/kward/shunit2 (fetched 2026-08-28T04:05:29.899436+00:00, sha 8fdf88348ab6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
