Skip to content

feat(TE-4324): propagate testName from session capabilities to snapshot options#511

Merged
sushobhit-lt merged 6 commits intoLambdaTest:stagefrom
sushobhit-lt:TE-4324
Apr 29, 2026
Merged

feat(TE-4324): propagate testName from session capabilities to snapshot options#511
sushobhit-lt merged 6 commits intoLambdaTest:stagefrom
sushobhit-lt:TE-4324

Conversation

@sushobhit-lt
Copy link
Copy Markdown
Collaborator

Summary

  • Adds `testIdTestNameMap` (Map<testId, testName>) cache parallel to existing `sessionTestIdMap`, so that `testName` is restored on subsequent LTMS-fallback cache hits without re-calling LSRS.
  • Populates `snapshot.options.testName` from the LSRS `getSmartUICapabilities` response across all 3 resolution paths: Redis-success, `sessionCapabilitiesMap` cache-hit, and LTMS-fallback.
  • Adds optional `testName` to the `Snapshot.options` type.
  • Part of a 3-repo change — `testName` rides on `snapshot.options` (same mechanism as `testId`/`sessionId` today), gets uploaded to S3 with the snapshot, and is later read by DOTUI for the outbound Kafka payload to DES.

Related PRs

  • LSRS: `TE-4324` on `sushobhit-lt/smartui-rendering-service`
  • DOTUI: `TE-4324` on `sushobhit-lt/dotlapse-visual-ui-pixel-private`

Test plan

  • `npm run build` passes
  • With a real Selenium/Playwright session, log `snapshot.options.testName` before S3 upload — confirm populated
  • Exercise all 3 caps-resolution paths (Redis-success, cache-hit, LTMS-fallback) and verify testName is set in each
  • Confirm `testIdTestNameMap` gets populated on first resolve and is used on subsequent snapshots with same sessionId
  • Backward compat: snapshot without `sessionId` (pure CLI path) — `testName` stays empty, no errors

🤖 Generated with Claude Code

parthlambdatest and others added 6 commits April 15, 2026 17:50
…ot options

Add testIdTestNameMap cache parallel to sessionTestIdMap so that testName
is restored on subsequent LTMS-fallback cache hits. Populate
snapshot.options.testName from LSRS getSmartUICapabilities response
across all 3 resolution paths (Redis-success, sessionCapabilitiesMap
cache-hit, LTMS-fallback).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The option-processing step built processedOptions from an explicit
allowlist that only forwarded sessionId and testId, silently dropping
testName. Add testName propagation in both prepareSnapshot and
processSnapshot, mirroring the testId resolution order: inline option,
then testIdTestNameMap lookup, then sessionCapabilitiesMap.name
fallback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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