{{ message }}
Repository navigation
Write attachment test reports to a temporary directory - #420
Open
sunnnn2005 wants to merge 2 commits into
Open
sunnnn2005 wants to merge 2 commits into
sunnnn2005 wants to merge 2 commits into
Conversation
sunnnn2005
marked this pull request as ready for review
August 10, 2026 00:21
Author
|
@coderabbitai review |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Tests/XCTestHTMLReportTests/CliTests.swift`:
- Line 68: Update testRetryBundleWithSharedPayloadRefsExitsZero and
testLenientFlagIsAccepted to invoke xchtmlreportCmd with an isolated temporary
output directory, matching the defaultArgs setup used by assertAttachmentsExist.
Ensure each test creates and cleans up its temporary output location; if
default-output behavior must remain covered, execute it from an isolated
temporary bundle parent.
- Line 68: Update ResultFile.exportPayload so relocated report attachments are
self-contained: either copy assets beneath outputDirectory or emit URLs relative
to outputDirectory instead of TestResults.xcresult. In the CLI test using
defaultArgs, resolve emitted URLs against outputDirectory and assert the
resulting assets exist at those locations, covering links from
outputDirectory/index.html.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9bc2923e-b34f-4c48-b4f1-af18bbdd7f0d
📒 Files selected for processing (1)
Tests/XCTestHTMLReportTests/CliTests.swift
This branch has not been deployed
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
index.htmlfiles out of the package test resourcesRoot cause
The attachment tests passed
-rwithout-o, soxchtmlreportused the.xcresultparent directory as its output directory. That leftTests/XCTestHTMLReportTests/Resources/index.htmluntracked after runningswift test.Validation
swift test— 23 tests passed, 1 existing Xcode 26 skipswift test --filter CliTests— 7 tests passedswift testleaves noResources/index.htmlFixes #389
Summary by CodeRabbit