Skip to content

E2E Test: basic tests.#641

Open
cloudwebrtc wants to merge 4 commits intomainfrom
duan/e2e-test-basic
Open

E2E Test: basic tests.#641
cloudwebrtc wants to merge 4 commits intomainfrom
duan/e2e-test-basic

Conversation

@cloudwebrtc
Copy link
Copy Markdown
Contributor

@cloudwebrtc cloudwebrtc commented Apr 27, 2026

Summary

Adds an end-to-end test (test_connection_basics) to livekit-rtc/tests/test_basic.py. The test exercises the full connect/disconnect/reconnect lifecycle and track publish/subscribe flow across four rtc.Room instances against a live LiveKit server.

What the test covers

Four participants (p1p4) join a uniquely-named room, then walk through:

  1. Visibilityp1 and p2 connect; both reach CONN_CONNECTED.
  2. Disconnect propagationp1 disconnects; p2 receives participant_disconnected for p1.
  3. State convergencep1 then p2 reach CONN_DISCONNECTED.
  4. Reconnect cyclep3 joins → disconnects → reconnects with the same token → disconnects, asserting connection_state after each step.
  5. Late joiner sees publishesp4 joins, p3 reconnects, then publishes a camera track and a mic track. p4 receives track_published for each (the audio future filters by SID so the prior video event doesn't satisfy it) and subscribes to both.
  6. Cleanupp3 and p4 disconnect cleanly.

Requirements

  • A reachable LiveKit server (LIVEKIT_URL).
  • LIVEKIT_API_KEY / LIVEKIT_API_SECRET for token minting.
  • pytest + pytest-asyncio (test is @pytest.mark.asyncio).

Test plan

  • Run pytest livekit-rtc/tests/test_basic.py against a local or staging LiveKit deployment with all three env vars set — expect a single passing test.
  • Run the same command with the env vars unset — expect a clean skip whose reason names every missing variable.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@cloudwebrtc cloudwebrtc changed the title e2e: basic tests. E2E Test: basic tests. Apr 27, 2026
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.

1 participant