Improve Markdown report and exclude step artifacts from test artifacts#795
Open
Improve Markdown report and exclude step artifacts from test artifacts#795
Conversation
…rtifacts - Markdown pipe: render per-test meta as a table; parse <br>-joined string steps into a bullet list with parsed durations; wrap artifacts in collapsible <details>; remove the noisy Environment section. - Client: collect step artifact paths before upload and filter them out of test-level files / manuallyAttachedArtifacts so per-step screenshots no longer duplicate into the test artifacts list. Step artifacts continue to upload to S3 and stay attached to their step. - Docs: add docs/pipes/markdown.md, list Markdown and HTML in the built-in pipes index, and link the Markdown report from README. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Testomat.io pipe already forwards a run-level description (e.g. the Coverage pipe's coverageDescription on the shared store) to the API. Make the local Markdown and HTML reports surface the same content: - Markdown pipe: render description verbatim under a "## Description" section between Run Metadata and Tests. - HTML pipe: pass description into the template, register a `markdown` Handlebars helper backed by `marked`, render it in a styled Description card beneath the header. Skip both the section and the surrounding whitespace when no description is provided. - Add `marked` as a direct runtime dependency. - Tests for both pipes cover the present-and-omitted cases. - Docs: mention the new behavior in pipes/markdown.md and pipes/html.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
client.createRun(params) already passes params to every pipe.createRun, but
the testomatio pipe ignored params.configuration and built configuration
only from the coverage-derived store. The HTML and Markdown reports had no
way to display run configuration at all.
- Testomatio pipe: merge params.configuration into runParams.configuration
sent to the API. Caller values win on key conflict; coverage-derived
tests/suites lists are preserved when not overridden. Stash the same
configuration on the shared store so other pipes can read it.
- Markdown pipe: stash params.configuration in createRun, render as a
"## Configuration" key/value table after the Description. tests/suites
arrays are skipped (those are coverage scoping, not user config).
- HTML pipe: stash params.configuration in createRun, expose to the
template, render in a styled Configuration card after the Description.
- Tests: 4 new pipe tests cover present/absent for both reports.
- Docs: pipes/markdown.md and pipes/html.md mention configuration support.
Caller usage:
client.createRun({ configuration: { exploratory: true } })
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
marked v14's parse() return type is string | Promise<string> because the
parser supports async extensions. SafeString expects string, so tsc
rejected the assignment in CI. Pass { async: false } to pin the synchronous
overload.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Markdown pipe tests set process.env.TESTOMATIO_RUN to assert the env table,
but never restored process.env. The leak survived into testomatio_pipe_test.js,
where TestomatioPipe(...) saw an existing run id and switched createRun() to
PUT /api/reporter/{id} — a path the mock-http-server didn't have a handler
for, breaking 7 testomatio tests and the XML Reader run-id test on CI.
- markdown_pipe_test.js: snapshot process.env in before(), restore in after().
- testomatio_pipe_test.js: server.reset() in afterEach so handlers from one
test don't leak into the next (defensive hygiene; the env restore above is
the actual fix for the CI failures, but the mock-server reset removes a
similar accidental coupling within the file itself).
Verified: bringing markdown_pipe_test.js + testomatio_pipe_test.js together
in the same mocha run goes from 7 failing to all 74 passing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<br>-joined string steps split into a bullet list with parsed durations; artifacts collapse into<details>; the noisy Environment section is removed.addTestRuncollects step artifact paths before upload and filters them out offilesandmanuallyAttachedArtifacts. Step artifacts still upload to S3 and stay attached to their step.docs/pipes/markdown.md, Markdown + HTML added to the built-in pipes index, and a Markdown report link in the README documentation list.Test plan
npx mocha tests/unit/pipes/markdown_pipe_test.js(16 passing, including new assertions for the table layout, no-Environment-section, and<details>artifacts wrapper)2.x, unrelated to this change)data.filesretains test-only files and excludes paths referenced bystep.artifacts; the existing step-artifact upload path is untouchedTESTOMATIO_MARKDOWN_REPORT_SAVE=1 ...) shows: meta table, step list, fenced logs/stack, collapsible artifacts, no env block, no per-step screenshots duplicated under Artifacts🤖 Generated with Claude Code