Skip to content

Conversation

metal-messiah
Copy link
Member

@metal-messiah metal-messiah commented Sep 12, 2025

Test server can report its data to BAM directly from pages.

Overview

The testing server will now support reporting its activity to BAM instead of local network when supplied with the -B flag and a file path to a config file (.JSON format) or a JSON string as input.

An example config would look like:

{
  "licenseKey": "...",
  "applicationID": "...",
  "accountID": "...",
  "agentID": "...",
  "trustKey": "...",
  "beacon": "...",
  "errorBeacon": "..."
}

These values are most easily obtained by inspecting an existing browser entity in NR1 or using NerdGraph to retrieve the configs for an entity.

This was added to support more easily smoke testing certain features with concurrent changes to a BAM consumer that is deployed to a staging cell.

Related Issue(s)

Testing

try it:

with file path

npm run test-server -- -B <path_to_your_config_json_file>

with json string argument

npm run test-server -- -B '{"licenseKey":"...","applicationID":"...","accountID":"...","agentID":"...","trustKey":"...","beacon":"...","errorBeacon":"..."}'

Copy link

github-actions bot commented Sep 12, 2025

Asset Size Report

Merging this pull request will result in the following asset size changes:

Agent Asset Previous Size New Size Diff
lite loader 26.07 kB / 9.84 kB (gzip) 26.07 kB / 9.84 kB (gzip) 0% / 0% (gzip)
lite async-chunk 54.57 kB / 18.02 kB (gzip) 54.57 kB / 18.02 kB (gzip) 0% / 0% (gzip)
pro loader 53.82 kB / 19.07 kB (gzip) 53.82 kB / 19.07 kB (gzip) 0% / 0% (gzip)
pro async-chunk 92.19 kB / 28.62 kB (gzip) 92.19 kB / 28.62 kB (gzip) 0% / 0% (gzip)
spa loader 62.67 kB / 21.8 kB (gzip) 62.67 kB / 21.8 kB (gzip) 0% / 0% (gzip)
spa async-chunk 117.82 kB / 35.87 kB (gzip) 117.82 kB / 35.87 kB (gzip) 0% / 0% (gzip)

Copy link

Supportability Metric Usage Changes:

No matching changes found

Supportability Metrics .md File Changes:

supportability_metrics.md was changed? false

New supportability metrics require changes to supportability_metrics.md, as well as a new PR to Angler. Please ensure an Angler PR is created and linked to this PR.

Copy link

codecov bot commented Sep 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.25%. Comparing base (6fccaad) to head (687b2c1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1567   +/-   ##
=======================================
  Coverage   88.25%   88.25%           
=======================================
  Files         203      203           
  Lines        7755     7755           
  Branches     1574     1574           
=======================================
  Hits         6844     6844           
  Misses        792      792           
  Partials      119      119           
Flag Coverage Δ
unit-tests 80.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


/** fallback if no override was provided or override outright failed to parse correctly */
if (!agentConfig) {
agentConfig = {
Copy link
Contributor

@cwli24 cwli24 Sep 18, 2025

Choose a reason for hiding this comment

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

Really to send harvest, only the application ID & licenseKey are needed. To make this .B easier to use, you shouldn't need the rest of the properties but simply provide those 2.

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.

2 participants