Skip to content

[CI-6519] Document linking test attachments by file name - #326

Merged
zoltan-baba merged 6 commits into
mainfrom
claude/documentation-example-code-ef276e
Oct 8, 2026
Merged

zoltan-baba merged 6 commits into
mainfrom
claude/documentation-example-code-ef276e

Conversation

@AndrasEszes

@AndrasEszes AndrasEszes commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Documents the attachment file name convention on the test results page: the naming rules, setups for Espresso, Paparazzi, Roborazzi, Detox and Playwright, the Export test results to Test Reports setup that collects the files, and troubleshooting.

Details
  • Every example was run and its file names checked against the Export step 1.3.0 matcher:
    • Espresso: AGP 9.4.1 on an API 34 emulator.
    • Paparazzi: 1.3.5 on AGP 8.13.2 with compileSdk 35, and the 2.0 alpha variant on AGP 9.4.1.
    • Roborazzi: 1.76.0 with Robolectric 4.17.
    • Detox: 20.51.4 name logic with Jest 30 and jest-junit 17, without a device.
    • Playwright: 1.63.0, with attachments simulated instead of real browser screenshots.
  • Left out on purpose:
    • Shot: needs the deprecated android.newDsl=false.
    • Flutter: needs a private test_api import.
    • Maestro: gets its own Step.
  • Not verified: whether the Tests tab shows attachments whose names contain spaces, [ ] or › (Playwright and Detox names do), and multi-device runs.

The page now covers the file name convention that the Deploy to
Bitrise.io (2.26.0) and Export test results to Test Reports (1.3.0)
Steps use to link attachments to test cases. The manual attachment_*
properties stay documented as the alternative.

Every example is a one-time setup (a listener, a Gradle task, a
path builder, a reporter), so readers don't have to touch their
tests. Each was run against the Export Step's matcher. Tools that
could only be covered per test class or through deprecated or
private APIs (Paparazzi, Shot, Flutter) are left out.

The search_pattern examples name a single class XML on purpose: the
Export Step exports only its first match, and Gradle writes one XML
per test class.

CLAUDE.md listed only the languages added in docusaurus.config.ts,
which read as if JavaScript, TypeScript and XML blocks were not
highlighted. They come bundled with prism-react-renderer.
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Readers found the section hard to scan. The convention is now four
rules, each tool gets one sentence and its code, and the Export Step
setup and version requirements are stated once instead of three times.

Edge cases that rarely matter (a test name ending in __run<k>, the
255-byte file name limit, .XML and .junit results, testsuite-level
properties, git filtering details) are left out. The rule to put the
device in the label stays, since every multi-device run hits it.
Paparazzi runs in more workspaces than Roborazzi, so it gets an
example even though it needs a shared rule factory instead of a
one-time setup: Paparazzi has no global hook, and its own file names
can't be mapped back to the test case unambiguously.

The example targets 1.3.5, the stable release. On AGP 8 with
kotlin-android the handler needs noJdk off to see java.awt, and
without outputs.dir a build-cache hit restores the XML but not the
snapshots, so nothing gets linked.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The Espresso and Paparazzi examples can lose attachments in multi-device or multi-task runs.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Documents file-name-based test attachment linking and related setup guidance.

Changes:

  • Adds naming rules and examples for five testing tools.
  • Expands export and troubleshooting instructions.
  • Clarifies supported code-block languages.
File Description
docs/​bitrise-ci/​testing/​deploying-and-viewing-test-results.mdx Adds attachment-linking documentation and examples.
CLAUDE.md Clarifies syntax-highlighting guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/bitrise-ci/testing/deploying-and-viewing-test-results.mdx Outdated
Comment thread docs/bitrise-ci/testing/deploying-and-viewing-test-results.mdx
Two devices on the same API level got the same Espresso screenshot
name, and the Export Step skips duplicate names, so neither was
attached. The label now carries the screen size too, which tells
phone and tablet emulators apart.

Every Test task deleted and refilled one shared bitrise-snapshots
folder, so a later variant's task wiped the snapshots of tests that
only ran in an earlier one. Each task now writes to its own folder,
named through a system property.
@AndrasEszes
AndrasEszes marked this pull request as ready for review October 6, 2026 14:54
zoltan-baba and others added 2 commits October 7, 2026 17:49
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@zoltan-baba
zoltan-baba merged commit 259e25f into main Oct 8, 2026
5 checks passed
@zoltan-baba
zoltan-baba deleted the claude/documentation-example-code-ef276e branch October 8, 2026 09:55
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.

3 participants