mirror of
https://github.com/SigNoz/signoz.git
synced 2026-08-13 16:30:36 +01:00
## Pull Request --- ### 📄 Summary This is PR ads basic happy flow E2E for our LLM observability flow. Since most of the cases are covered by the integration test itself, we have added happy path here. We have also added test for Test tab here. So we have added an integration test for a test endpoint here. #### Issues closed by this PR Closes - https://github.com/SigNoz/engineering-pod/issues/5764 --- ### ✅ Change Type _Select all that apply_ - [x] 🧪 Test-only — E2E + integration coverage for LLM Observability - [x] 🛠️ Infra / Tooling — E2E helpers + e2e-scoped feature-flag conftest --- ### 🧪 Testing Strategy - **Tests added:** - **E2E (Playwright):** `tests/e2e/tests/llm-o11y/attribute-mapping.spec.ts`, `tests/e2e/tests/llm-o11y/llm-pricing.spec.ts` + `tests/e2e/helpers/{attribute-mapping,llm-pricing}.ts`. Both specs are `test.describe.configure({ mode: 'serial' })` and tear down what they create via the API. - **Integration (Jest/RTL/MSW):** `TestTab/__tests__/TestTab.test.tsx` — 4 cases: | Case | Time | |---|---| | runs the sample span through the mappers and renders the populated result | 447 ms | | surfaces a backend error and renders no results | 122 ms | | persists an edited span to local storage and restores it on remount | 657 ms | | resets to the sample span and clears the persisted input | 70 ms | - **Manual verification:** full LLM Observability Jest suite is green locally — **7 suites / 70 tests passed in 24.3 s** (`npx jest --verbose src/container/LLMObservability`), including the 4 new Test-tab cases. - **Edge cases covered:** Test-tab backend 500 → error surfaced and no results rendered; span input persisted across remount and cleared on reset; E2E fixture cleanup is failure-tolerant (`.catch()` on list/delete so a broken run doesn't mask the real assertion failure). - **Not yet captured:** a fully-green E2E run in CI — the e2e workflow only fires on PRs carrying the `safe-to-e2e` label (see Notes). --- ### ⚠️ Risk & Impact Assessment - **Blast radius:** none in product code. No `frontend/src` runtime file, no Go package, and no shared pytest fixture is modified — the only non-test-file change is the new `tests/e2e/conftest.py`, scoped to the `e2e` package. - **Potential regressions:** limited to CI surface. `tests/e2e/conftest.py` overrides the package-scoped `signoz` fixture with a distinct `cache_key`, so it brings up **one additional container set** for the e2e package rather than mutating the shared one — integration suites keep the stock feature set. - **Rollback plan:** revert the PR. No schema/migration changes, no runtime behaviour to unwind. --- ### 📝 Changelog | Field | Value | |------|-------| | Deployment Type | N/A | | Change Type | Maintenance | | Description | N/A — test-only, no user-facing change. | --- ### 📋 Checklist - [x] Tests added or explicitly not required - [x] Manually tested (LLM Observability Jest suite green: 7 suites / 70 tests; E2E specs exercised against a local flag-enabled stack) - [x] Breaking changes documented (none) - [x] Backward compatibility considered --- ## Notes for Reviewers --------- Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>