Title: SDK-7389: send per-test tags to Test Observability by rounak610 · Pull Request #1224 · browserstack/browserstack-cypress-cli · GitHub
Open Graph Title: SDK-7389: send per-test tags to Test Observability by rounak610 · Pull Request #1224 · browserstack/browserstack-cypress-cli
X Title: SDK-7389: send per-test tags to Test Observability by rounak610 · Pull Request #1224 · browserstack/browserstack-cypress-cli
Description: Summary Jira: SDK-7389 Tags set on a test through its Cypress config, e.g. it('…', { tags: ['@test_tag'] }, …) or describe('…', { tags: [...] }, …), never reach Test Observability: details.tags is always [] for Cypress tests, while build-level tags (buildTag) work. The Test Observability reporter builds the TestRun* events without a tags field. Cypress already hands each test's config to the Node-side reporter as test._testConfig (_testConfig is in RUNNABLE_PROPS and is merged into the reporter's runnable on every test event), so no browser-side change is needed. Change bin/testObservability/reporter/index.js: new tags(test) reads the tags from test._testConfig. Current Cypress sends it resolved as { testConfigList: [{ overrides }, ...] } (one entry per describe/it level), older versions send the raw overrides object; both are handled. Suite and test tags are combined, trimmed and de-duplicated; a single string tag is accepted. Any error returns [], so a malformed config can't break reporting. tags is added to TestRunStarted / TestRunFinished / TestRunSkipped events only; hook events are unchanged. Verification On BrowserStack, with the BStackAutomation Cypress sample (SDK/api/automate/cypress, spec sample_before_spec.js, which tags its test @test_tag), Chrome on OS X Big Sur and Edge on Windows 10: this branch (packed and installed through npm_dependencies), Cypress latest: O11y build 69z0q6vj55k5zttjzfggbklwju5tlgtxx0nq7qfq — both tests have details.tags = ["@test_tag"]. this branch, Cypress 13.15.0 pinned in npm_dependencies: O11y build fsiscepazz3g1qwnnsvqjg2qebxtg8fd3mjo0ts2 — both tests have details.tags = ["@test_tag"]. published 1.37.5, Cypress latest, same setup: O11y build 1ec9r1q5zfxidpjzdydegxsm5sxoxtfwpoxdxe8z — both tests have details.tags = []. Unit tests: new test/unit/bin/testObservability/testTags.js (5 cases). Full suite: 750 passing, 2 pending, 16 failing; the same 16 fail on master (745 passing there). That is the check BStackAutomation's test_cypress_wrapper_before_sample.py::test_o11y_test_tag makes (some test in the build must carry @test_tag). 🤖 Generated with Claude Code Summary by CodeRabbit New Features Test run events now include tags configured at both suite and test levels, making run metadata more descriptive. Tags are trimmed and deduplicated, and support both newer configuration formats and legacy overrides. Events remain available when tag configuration is missing or cannot be read; in those cases, no tags are included.
Open Graph Description: Summary Jira: SDK-7389 Tags set on a test through its Cypress config, e.g. it('…', { tags: ['@test_tag'] }, …) or describe('…', { tags: [...] }, …), never reach Test Observa...
X Description: Summary Jira: SDK-7389 Tags set on a test through its Cypress config, e.g. it('…', { tags: ['@test_tag'] }, …) or describe('…', { tags: [...] }, …), ...
Opengraph URL: https://github.com/browserstack/browserstack-cypress-cli/pull/1224
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:9a1e3abd-1dbc-b679-ef90-034002537ba6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B24C:E4EF6:89F71C:BC743A:6B044AEB |
| html-safe-nonce | 5a667260455116a5dfd8076ae90d77df91cda1bdeab7c731df941d9113be1524 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjRDOkU0RUY2Ojg5RjcxQzpCQzc0M0E6NkIwNDRBRUIiLCJ2aXNpdG9yX2lkIjoiODIwMzEzMDAxOTUwNjMwOTg2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2685b6e8fdbe9647cabf1e467947f40e043ddf75eec0268038c5f7fae7d9c274 |
| hovercard-subject-tag | pull_request:5451768292 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/browserstack/browserstack-cypress-cli/pull/1224/files |
| twitter:image | https://avatars.githubusercontent.com/u/81288115?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/81288115?s=400&v=4 |
| og:image:alt | Summary Jira: SDK-7389 Tags set on a test through its Cypress config, e.g. it('…', { tags: ['@test_tag'] }, …) or describe('…', { tags: [...] }, …), never reach Test Observa... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 002aa6b95ffa730b0aec436a5c383f536ad677284e60056037fb120afe37b730 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/browserstack/browserstack-cypress-cli git https://github.com/browserstack/browserstack-cypress-cli.git |
| octolytics-dimension-user_id | 1119453 |
| octolytics-dimension-user_login | browserstack |
| octolytics-dimension-repository_id | 242935045 |
| octolytics-dimension-repository_nwo | browserstack/browserstack-cypress-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 242935045 |
| octolytics-dimension-repository_network_root_nwo | browserstack/browserstack-cypress-cli |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 059f24c781e3a0d7df3f27a97da0e93fab06ae39 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width