Skip to content

test: add tests for benchmark shell scripts #48

@BryanFRD

Description

@BryanFRD

The three benchmark scripts have no tests:

  • `scripts/run.sh` — handles complex JSON parsing, floating-point arithmetic, fixture generation
  • `scripts/compare.sh` — performs percentage calculations, threshold comparisons, regression detection
  • `scripts/format-release.sh` — formats benchmark results for release notes

These scripts handle numeric data and reporting. Regressions in the scripts could corrupt benchmark results silently. The recent changelog (v2.2.1 through v2.2.4) shows multiple corrections to script behavior, confirming they are prone to edge case issues.

Expected

  • Shell unit tests (e.g., with bats-core) for critical functions
  • Test cases for edge conditions: zero baseline, missing data, empty results
  • Validation of JSON output format

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Nice to have, no rush

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions