Skip to content

test: enabling network api calls from browserstack#25655

Merged
javiergarciavera merged 9 commits intomainfrom
MMQA-1361-track-api-calls
Feb 6, 2026
Merged

test: enabling network api calls from browserstack#25655
javiergarciavera merged 9 commits intomainfrom
MMQA-1361-track-api-calls

Conversation

@javiergarciavera
Copy link
Copy Markdown
Contributor

@javiergarciavera javiergarciavera commented Feb 4, 2026

Description

Adds tracking of BrowserStack network (API) calls into the performance E2E pipeline. The custom reporter fetches network logs per session and attaches them to each test metric as apiCalls (and apiCallsError when the fetch fails). The aggregation script is updated so these fields are kept in the cleaned and aggregated reports. Removes the unused getDeviceInfoFromProfiling method and fixes the missing comma in the aggregation script after the new apiCalls / apiCallsError properties.

Changelog

CHANGELOG entry:

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MMQA-1361

Manual testing steps

Feature: my feature name

Check that after running performance pipeline, the performance summary report includes a section with the api calls

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Touches the test infrastructure and BrowserStack/Appium capability set, which can change test stability, runtime, and artifact sizes. Risk is limited to CI/e2e tooling but includes new API calls and additional logged data.

Overview
Adds BrowserStack network log (HAR) collection to the performance-reporting pipeline: AppProfilingDataHandler now fetches /networklogs, custom-reporter retrieves and stores per-session entries/errors, and emitted performance-metrics-*.json plus the aggregation script now include apiCalls/apiCallsError fields.

Updates the patched appwright BrowserStack capabilities to enable richer telemetry (network profile/log content capture, app profiling, self-heal, various Appium settings), adds env-driven overrides (BROWSERSTACK_BUILD_NAME, DISABLE_VIDEO_DOWNLOAD), and adjusts runner behavior (CI retries/workers, locator text-matching behavior/logging) via the Yarn patch.

Written by Cursor Bugbot for commit 44ee531. This will update automatically on new commits. Configure here.

@javiergarciavera javiergarciavera requested a review from a team as a code owner February 4, 2026 16:03
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 4, 2026

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-qa QA team label Feb 4, 2026
@github-actions github-actions bot added the size-M label Feb 4, 2026
@javiergarciavera javiergarciavera added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Feb 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: @PerformanceLaunch, @PerformanceLogin
  • Risk Level: low
  • AI Confidence: 95%
click to see 🤖 AI reasoning details

E2E Test Selection:
All changes in this PR are exclusively within the appwright performance testing infrastructure and related tooling:

  1. appwright patch update: Enables network log capture with content in BrowserStack capabilities
  2. AppProfilingDataHandler.js: Adds network logs fetching from BrowserStack API (new getNetworkLogs method)
  3. custom-reporter.js: Integrates network logs into performance test reports, adds debugging logs, removes unused code
  4. aggregate-performance-reports.mjs: Includes apiCalls/apiCallsError in aggregated reports
  5. yarn.lock: Checksum updates for the patch change

These changes do NOT affect:

  • Any application code (no changes to app/, components, controllers, etc.)
  • Any Detox E2E test files or infrastructure
  • Any user-facing functionality

The changes are purely infrastructure improvements for performance test reporting - adding network log capture capabilities. No Detox E2E tests are needed as the application behavior is completely unchanged.

Performance Test Selection:
Since these changes directly modify the appwright performance testing infrastructure (reporters, data handlers, and BrowserStack configuration), running a subset of performance tests is appropriate to validate that the new network logging functionality works correctly and doesn't break existing performance test reporting. Selected @PerformanceLaunch and @PerformanceLogin as representative tests that will exercise the modified reporting infrastructure without running the full performance test suite. This validates the changes work in practice while being efficient.

View GitHub Actions results

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

entries: [],
error: 'No build ID found in session details',
};
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant BrowserStack API calls for session details

Low Severity

The new getNetworkLogs method makes its own getSessionDetails API call internally, while the same session details are already being fetched by fetchCompleteProfilingData earlier in the same loop iteration. For each session, getSessionDetails is now called 2-3 times instead of once, making redundant HTTP requests to BrowserStack's API. This adds unnecessary latency to test reporting and could trigger rate limiting with many sessions.

Additional Locations (1)

Fix in Cursor Fix in Web

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 6, 2026

@javiergarciavera javiergarciavera added this pull request to the merge queue Feb 6, 2026
Merged via the queue into main with commit 839303a Feb 6, 2026
97 checks passed
@javiergarciavera javiergarciavera deleted the MMQA-1361-track-api-calls branch February 6, 2026 11:14
@github-actions github-actions bot locked and limited conversation to collaborators Feb 6, 2026
@metamaskbot metamaskbot added the release-7.66.0 Issue or pull request that will be included in release 7.66.0 label Feb 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.66.0 Issue or pull request that will be included in release 7.66.0 size-M team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants