How can we test rooms that are created within a si...
# ask-ai
s
How can we test rooms that are created within a single LiveKit pod?
t
Thanks for reaching out, Nouman. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You can test rooms created within a single LiveKit pod using several approaches: • Local Server Testing: Run a local LiveKit server instance (e.g., at `ws://localhost:7880`) and use SDKs to connect, generate test tokens, and create rooms for your scenarios. This allows you to simulate participant joins, track publishing/subscribing, and data transmission in a controlled environment. • Single Node Test Setup: Use test utilities provided by the server or SDKs (such as Go’s
setupSingleNodeTest
or Swift’s
withRooms
) to automate room creation, participant management, and feature testing within one pod. • Token-Based Authentication: Generate tokens with specific permissions for each test participant and room, enabling you to test different roles and access levels. • Room Service API Testing: Use the Room Service API to create, list, update, and manage rooms and participants programmatically for integration and functional tests. • Mock-Based Unit Testing: For SDK-level tests, use mock objects to isolate and test room logic without requiring a live server. • End-to-End Integration Testing: Simulate real-world scenarios by connecting multiple clients, verifying connection states, participant events, and room properties. These methods allow you to thoroughly test room creation, participant interactions, and LiveKit features within a single pod before scaling to multi-node environments. Sources: Tests/LiveKitTests/Room/RoomTests.swift | test/agent_test.go | src/main/kotlin/io/livekit/server/RoomServiceClient.kt | livekit-android-test/src/test/java/io/livekit/android/room/RoomTest.kt | Tests/PlayMode/RoomTests.cs
s
just give me the command to run the test
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!