Skip to content
Novus Examples
tap383 B

TAP — Version 14 Subtest Syntax

TAP 14 with an explicit version line and a pragma inside a subtest. Consumers pinned to version 13 either reject the stream outright or ignore the pragma, so this file separates the two behaviours.

Preview — first 18 linestap
TAP version 14
1..2
# Subtest: cart
    ok 1 - applies the unit price
    ok 2 - multiplies by quantity
    1..2
ok 1 - cart
# Subtest: checkout
    pragma +strict
    ok 1 - creates a session
    not ok 2 - expires the session after a timeout
      ---
      message: 'session still active after 250ms'
      severity: fail
      ...
    1..2
not ok 2 - checkout # 1 subtest failed

Specifications

Seed
61200
Encoding
UTF-8
Line Endings
LF
Tap Version
14
Plan
1..2
Top Level Assertions
2
Subtests
2
Nested Assertions
4
Not Ok
1
Pragmas
1

Testing contract

Expected to pass
Scenario
Consume a TAP 14 stream containing a pragma inside a nested subtest.
Expected result
The version is read as 14, the pragma is accepted rather than treated as an assertion, and 2 top-level assertions are reported with the second failing.

What is a .tap file?

TAP (Test Anything Protocol) is a line-based plain-text format for reporting test results. A stream declares a plan such as `1..12` and then emits one `ok` or `not ok` line per test, optionally with a description, a `# SKIP` or `# TODO` directive, and an indented YAML block carrying diagnostic detail. It is deliberately simple enough that a test runner in any language can emit it and a harness can parse it line by line.

How to use this file

Use an example .tap file to test TAP consumers, CI result parsers, and format converters — checking that the declared plan matches the number of assertions, that skipped and TODO directives are classified separately from failures, and that diagnostic YAML blocks survive the round trip.

How to use this file for testing

“TAP — Version 14 Subtest Syntax” is a deterministic Novus Examples fixture for Log parsing, Error handling, Conversion testing. Access logs and JSON-lines application logs — for testing log parsers, tailers, and ingestion pipelines.

Documented properties for this file: seed 61200 · UTF-8 · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Test and coverage reports document their totals (suites, cases, passes, failures, skips, covered lines) in the spec table. Point your CI dashboard, coverage gate, or report converter at the file and assert those counts survive; format twins carry identical numbers so a conversion can be scored exactly.

Generated by generation/testing.py. Free for any use, no attribution required — license.