Add network_logs_options input (capture network log content for XCUITest)#13
Add network_logs_options input (capture network log content for XCUITest)#13aditya711-code wants to merge 1 commit into
Conversation
Adds a `network_logs_options` step input that mirrors the App Automate
`networkLogsOptions` capability (e.g. {"captureContent": true}) so XCUITest
builds can capture the request/response content (bodies) of network logs,
not just metadata. Previously this could only be set on local/IDE runs.
The input is parsed as JSON into networkLogsOptions and forwarded in the
build payload. Providing it automatically enables networkLogs (the option is
only honoured when network logs are on). When empty the payload is unchanged
(networkLogsOptions is omitted), so it is fully backward compatible. Invalid
JSON fails with a clear, actionable error.
- step.yml: new network_logs_options JSON input under "Debug logs"
- structs.go: NetworkLogsOptions struct + *NetworkLogsOptions field (omitempty)
- util_fns.go: parseNetworkLogsOptions helper + wiring in createBuildPayload
- constants.go: actionable error string for invalid JSON
- main_test.go: unit tests for parsing and payload shape
- README.md: documented the new input
AAP-20051
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude Code PR ReviewPR: #13 • Head: 7a2e7af • Reviewers: stack:pr-review SummaryAdds a Review Table
Findings
Platform note (non-blocking): this is a pass-through of the Verdict: PASS — Additive, backward-compatible (pointer + |
What
Adds a
network_logs_optionsstep input that mirrors the App AutomatenetworkLogsOptionscapability, so XCUITest builds on BrowserStack App Automate can capture the content (request and response bodies) of network logs — not just metadata such as URLs, headers, latency and status codes.Until now the step exposed only a
network_logson/off toggle, so capture-content could be enabled on local/IDE runs but not when running through this Bitrise step.Usage
The value is the same JSON you would pass as the
networkLogsOptionscapability elsewhere, so it maps 1:1 from local/IDE configurations.Behavior
networkLogsOptionsin the build payload.network_logs, becausenetworkLogsOptionsis only honoured when network logs are enabled (a notice is logged when this happens).networkLogsOptionsis omitted entirely — so the change is fully backward compatible.Changes
step.ymlnetwork_logs_optionsJSON input under "Debug logs"structs.goNetworkLogsOptionsstruct +*NetworkLogsOptionsfield (omitempty) on the payloadutil_fns.goparseNetworkLogsOptionshelper + wiring increateBuildPayload()constants.gomain_test.goREADME.mdTesting
gofmt,go build ./...,go vet ./...,go test ./...all pass.{"captureContent": true/false}, empty, malformed JSON, wrong value type) and payload shape (provided →networkLogs:true+networkLogsOptions.captureContent:true; empty →networkLogsOptionsabsent).Ref: AAP-20051
🤖 Generated with Claude Code