Skip to content

feat(formatters): Add TAP (Test Anything Protocol) formatter #220

@juvistr

Description

@juvistr

Summary

Add TAP v13 output formatter for broad CI/CD tool compatibility.

Motivation

  • Universal format: Supported by many CI tools
  • Simple parsing: Line-based, easy to process
  • Jenkins/legacy CI: TAP plugins widely available

Acceptance Criteria

  • `draftspec run --format tap` outputs TAP format
  • TAP v13 compliant output
  • Includes diagnostics for failures
  • Supports TODO/SKIP directives
  • Tests added
  • Documentation updated

Example Output

TAP version 13
1..47
ok 1 - UserService > CreateAsync > creates a user
ok 2 - UserService > CreateAsync > validates email
not ok 3 - UserService > CreateAsync > sends welcome email
  ---
  message: Expected email to be sent
  severity: fail
  at:
    file: UserService.spec.csx
    line: 45
  ...
ok 4 - UserService > GetAsync > returns user # SKIP temporarily disabled
ok 5 - UserService > DeleteAsync > removes user # TODO not implemented

Implementation Notes

  • Create TapFormatter : IFormatter
  • Register in FormatterRegistry
  • Simple line-based output, minimal dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCLI-related issuesenhancementNew feature or requeststaleNo recent activity

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions