Skip to content

MaarkssDN/Birthub-360 / .agents/skills/bats-testing

bats-testing

Verified

Use whenever the code under test is a shell script, a CLI binary or anything run from Bash: argument parsing, flags, exit codes and output. Sets up Bats-core with @test blocks, run, status and output assertions, setup/teardown, shared helpers and TAP output for CI.

FileKindSize
.tessl-plugin/plugin.jsonconfig394 B
SKILL.mdskill md9.3 KB
references/ci-integration.mdmarkdown1.3 KB

references/ci-integration.md

View on GitHub
# Bats output formats and CI integration

Output-format flags and continuous-integration wiring for `bats`, split out of
the main skill spine. See [SKILL.md](../SKILL.md) for the core workflow.

## Output formats

```bash
# Default (pretty)
bats test/

# TAP (CI-friendly, parseable)
bats --tap test/

# JUnit XML (for CI dashboards via TAP-to-JUnit converters)
bats --formatter junit test/ > junit.xml

# Verbose (show stdout/stderr of every command)
bats --verbose-run test/
```

## GitHub Actions

```yaml
jobs:
  bats:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
        with: { submodules: recursive }
      - run: |
          sudo apt-get install -y parallel
      - run: bats --jobs 4 --formatter junit test/ > junit.xml
      - uses: actions/upload-artifact@v4
        if: always()
        with: { name: bats-junit, path: junit.xml }
```

`submodules: recursive` restores vendored `bats-core` / `bats-support` /
`bats-assert` when they are pinned as git submodules; GNU `parallel` is
required for `--jobs`.

## Docker

For Docker-based CI, per [bats][bats]: "Running Bats in Docker"
using the official `bats/bats:latest` image:

```yaml
- run: docker run --rm -v "$PWD:/code" bats/bats:latest test/
```

[bats]: https://bats-core.readthedocs.io/en/stable/
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall