Skip to content

Reduce low-verbosity runner noise and improve test summaries#17

Open
stringintech wants to merge 10 commits into
mainfrom
less-output-noise
Open

Reduce low-verbosity runner noise and improve test summaries#17
stringintech wants to merge 10 commits into
mainfrom
less-output-noise

Conversation

@stringintech
Copy link
Copy Markdown
Owner

@stringintech stringintech commented May 24, 2026

Addresses #15. Details included in commit descriptions.
This is based on #14 (only the last three commits belong here) and will be rebased once that PR is merged.

Changes can be tested using v0.0.4-alpha.pr17.1 (diff).

stringintech and others added 10 commits May 14, 2026 13:28
Also change values to better titles and adapt runner to use both title and filename
New suites added for operations on block, block hash, block header, script pubkey, transaction, transaction input, transaction output and txid.

Chain suite refactored to return ref for `btck_block_tree_entry_get_block_hash` test cases and call `btck_block_hash_to_bytes` for asserting its value.

Existing suites refactored to call destroy as soon as objects (refs) no longer needed and use `"expected_response": {}` where both `result` and `error` are expected to be null.
Adds suite-schema.json which is used to validate each test suite in testdata dir against. Adds a separate schema file per method which is referenced by the root schema file suite-schema.json.

Response schema files are also introduced separately (and referenced by their parent method schema file). This allows the runner to later only embed the response schemas for handler response validation.

A validator command line tool is written in cmd/suite-validate which performs the testdata suites validation against the root schema and depends on a third party library (github.com/santhosh-tekuri/jsonschema/v6).

Co-authored-by: janb84 <githubjanb.drainer976@passmail.net>
Now the runner binary embeds the response schema files and uses the corresponding method response schema for a more strict validation of an incoming response from handler.
Adds a generator in cmd/specgen that deterministically generates a markdown file documenting methods based on method schema files.

Now handle-spec points to the generated document using the generator.
This adds skipped counts to suite and total summaries, prints clear timeout messages when remaining suites or test cases are skipped, and makes skipped tests cause a non-zero exit because not all tests completed successfully.
This changes output behavior by verbosity level:
- quiet: print nothing for suites with no failures
- on-failure (-v): print the suite summary, but hide passed test cases
- always (-vv): print full suite and test output like before
Print each failed test case as '<suite-file> <test-case-id> (<test-case-description>)' above the total summary section in all verbosity modes.
@stringintech stringintech linked an issue May 24, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test verbosity in output

1 participant