Repository navigation
feat(attachments): attach logs, HAR files, videos, traces and HTML to tests - #37
Merged
Merged
Conversation
… tests Adds reporter methods that upload a file against the current build and add it to the current test or to its last step: - attachFile(filePath, fileName?) and attachData(data, fileName) for the whole test (video, trace, HAR, console log) - attachFileToLastStep / attachDataToLastStep for the most recent step (e.g. page.content() as page.html right after a fail()) The id is added to the test or step once the upload finishes, so callers await the attach before saveTest(). It works in batch mode too, because the upload only needs the build id. Also adds AttachmentRequests.uploadTestAttachment / uploadTestAttachmentData (POST /build/:buildId/attachment), executionId and buildId filters on getAttachments, a TestAttachment model, and `attachments` on CreateExecution and Execution. Needs an Angles server with test attachment support (AnglesHQ/angles, same branch name). minor_bump Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KgQXSUjuLVXmLWxobnMfSf
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
Adds reporter methods that upload a file against the current build and attach it to the current test, or to its last step:
attachFile(filePath, fileName?)andattachData(data, fileName)attach to the whole test.attachFileToLastStepandattachDataToLastStepattach to the most recent step.saveTest(). The test and step are captured when the call is made, so a slow upload still lands on the right test.AttachmentRequests.uploadTestAttachment/uploadTestAttachmentDatacallPOST /build/:buildId/attachment(Node only, unlimited body size).getAttachmentsacceptsexecutionIdandbuildId.TestAttachmentmodel (exported), andattachmentsonCreateExecutionandExecution.Depends on
AnglesHQ/angles#133 (the API).
Release
The commit message includes
minor_bump, so the release workflow publishes this as a minor version (3.2.0) rather than a patch. Remove it from the merge commit if you'd prefer a patch release.Testing
npm run buildpasses.npm run lintreports the same 20 errors asmain(all pre-existingmax-classes-per-file), so this PR adds none..exeis rejected with a 400npm cifails onmainas well, becausepackage-lock.jsonpins ts-node 10.4.0 whilepackage.jsonasks for ^10.9.2. This PR leaves that alone.🤖 Generated with Claude Code
https://claude.ai/code/session_01KgQXSUjuLVXmLWxobnMfSf
Generated by Claude Code