Skip to content

test(webclient): Adds e2e web client test#418

Open
yanziz-nvidia wants to merge 2 commits intomainfrom
yanziz/ci-for-web
Open

test(webclient): Adds e2e web client test#418
yanziz-nvidia wants to merge 2 commits intomainfrom
yanziz/ci-for-web

Conversation

@yanziz-nvidia
Copy link
Copy Markdown
Contributor

@yanziz-nvidia yanziz-nvidia commented Apr 25, 2026

Example run: https://github.com/NVIDIA/IsaacTeleop/actions/runs/24949804846/job/73058257235

Note we don't have an IL or other app connected. So it shows empty frames. Also it's odd react control panel isn't shown. But at least we can get a connected session, a video recording (from artifacts), and some logs for e2e.

Download artifact https://github.com/NVIDIA/IsaacTeleop/actions/runs/24949804846/artifacts/6645351244 and see.

Summary by CodeRabbit

  • Tests

    • Added comprehensive end-to-end testing for the web client, validating SDK initialization, UI state transitions, runtime connectivity, and frame delivery.
  • Chores

    • Updated CI/CD pipeline to build web client artifacts and execute E2E tests as a release gate.
    • Updated project ignore patterns for test-generated artifacts.
  • Documentation

    • Added E2E test suite documentation with local execution guidelines and environment variable configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7b7cdb28-2054-48c8-b5ff-b707e84879c3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This pull request introduces a comprehensive end-to-end testing pipeline for the CloudXR web client. It adds a new GitHub Actions workflow job that builds the web application, followed by a self-hosted GPU-based E2E test job that uses Docker Compose to orchestrate a CloudXR runtime and Playwright test container. The test validates SDK initialization, UI state transitions, WebSocket connectivity, and user input handling via hand controller simulation. The publishing workflow is gated on successful E2E test completion. Supporting infrastructure includes Docker Compose configuration, test runner script, Playwright test suite with configuration, and documentation.

Sequence Diagram(s)

sequenceDiagram
    participant GHA as GitHub Actions
    participant Build as build-webapp job
    participant Artifact as Artifact Storage
    participant E2E as test-cloudxr-web-e2e job
    participant Docker as Docker Compose
    participant CXR as CloudXR Runtime
    participant PW as Playwright
    participant Publish as publish-wheel job

    GHA->>Build: trigger
    Build->>Build: npm install & build
    Build->>Artifact: upload webxr-client-build
    GHA->>E2E: trigger (on build success)
    E2E->>Artifact: download webxr-client-build
    E2E->>E2E: prepare environment
    E2E->>Docker: docker compose up
    Docker->>CXR: start cloudxr-runtime service
    CXR->>CXR: health check polling
    Docker->>PW: start playwright service
    PW->>CXR: connect to runtime (ws://)
    PW->>PW: run cloudxr-connect.spec.ts
    PW->>CXR: validate WebSocket frames
    PW->>Artifact: upload test-results
    E2E->>Docker: docker compose down
    GHA->>Publish: trigger (on E2E success)
    Publish->>Publish: publish Python wheel
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding end-to-end web client tests. It directly reflects the primary objective of the pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yanziz/ci-for-web

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread .github/workflows/build-ubuntu.yml Fixed
@yanziz-nvidia yanziz-nvidia force-pushed the yanziz/ci-for-web branch 3 times, most recently from 5bc5dd9 to b48546a Compare April 26, 2026 06:21
@yanziz-nvidia yanziz-nvidia marked this pull request as ready for review April 26, 2026 06:22
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
deps/cloudxr/docker-compose.test-e2e.yaml (1)

87-90: Keep Playwright image tag in sync with package.json.

The image tag v1.59.1-noble (line 90) must match @playwright/test: 1.59.1 in tests/web_e2e/package.json. A mismatch breaks browser path resolution. Consider documenting this coupling or adding a CI check.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deps/cloudxr/docker-compose.test-e2e.yaml` around lines 87 - 90, The
Playwright Docker image tag (image: mcr.microsoft.com/playwright:v1.59.1-noble)
must be kept identical to the `@playwright/test` version declared in
tests/web_e2e/package.json; update the image tag to match the `@playwright/test`
version (e.g., 1.59.1) or parameterize the tag so both are driven from a single
source, and add a short comment or CI validation that compares the Docker image
tag against the `@playwright/test` entry to prevent future mismatches.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/run_test_e2e_with_web.sh`:
- Around line 92-104: The case pattern "*healthy*" currently matches "unhealthy"
making the unhealthy branch unreachable; update the case in the loop that
inspects the variable status to either check the "*unhealthy*" pattern first or
replace the glob patterns with exact matches like "healthy") and "unhealthy") so
that the unhealthy check in the case block for status triggers correctly; locate
the case statement handling variable status in the script (the patterns
"*healthy*" and "*unhealthy*" inside the loop) and apply one of these fixes.

---

Nitpick comments:
In `@deps/cloudxr/docker-compose.test-e2e.yaml`:
- Around line 87-90: The Playwright Docker image tag (image:
mcr.microsoft.com/playwright:v1.59.1-noble) must be kept identical to the
`@playwright/test` version declared in tests/web_e2e/package.json; update the
image tag to match the `@playwright/test` version (e.g., 1.59.1) or parameterize
the tag so both are driven from a single source, and add a short comment or CI
validation that compares the Docker image tag against the `@playwright/test` entry
to prevent future mismatches.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b6b6315e-b44c-4c4f-aa40-8700036508bc

📥 Commits

Reviewing files that changed from the base of the PR and between 256f76f and b48546a.

📒 Files selected for processing (8)
  • .github/workflows/build-ubuntu.yml
  • .gitignore
  • deps/cloudxr/docker-compose.test-e2e.yaml
  • scripts/run_test_e2e_with_web.sh
  • tests/web_e2e/README.md
  • tests/web_e2e/cloudxr-connect.spec.ts
  • tests/web_e2e/package.json
  • tests/web_e2e/playwright.config.ts

Comment thread scripts/run_test_e2e_with_web.sh
Copy link
Copy Markdown
Contributor

@gareth-morgan-nv gareth-morgan-nv left a comment

Choose a reason for hiding this comment

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

Wouldn't it be better to start with a simple playwright test that assumes no server?

@@ -0,0 +1,113 @@
#!/bin/bash
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need the script? Could the logic be contained in Playwright?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's useful to run it locally imo.

@yanziz-nvidia
Copy link
Copy Markdown
Contributor Author

Wouldn't it be better to start with a simple playwright test that assumes no server?

then that wouldn't be called e2e right? I would want to make sure it actually connects. This PR also lacks an actual server running. Open for ideas what to run.

Comment thread deps/cloudxr/docker-compose.test-e2e.yaml
@yanziz-nvidia yanziz-nvidia force-pushed the yanziz/ci-for-web branch 2 times, most recently from 9791623 to 725ae5b Compare April 29, 2026 23:52
Comment thread .github/workflows/build-ubuntu.yml Outdated
# GPU runner required: the CloudXR runtime needs an NVIDIA GPU even when
# only one E2E spec is running. Single matrix entry — the web client
# behavior is independent of the matrix dims used by other test jobs.
runs-on: [self-hosted, linux, gpu, x64]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

may skip the arch tag so it'd use any available runner

Comment thread .github/workflows/build-ubuntu.yml
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.

5 participants