Skip to content

A livekit tester to simulate a subscriber in a room, uses headless Chromium

Notifications You must be signed in to change notification settings

10XScale-in/chrometester

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LiveKit ChromeTester

A headless chrome image for simulating LiveKit subscribers.

Usage

It's designed to be used as a Docker image, by passing a few environment variables, ChromeTester will load https://example.livekit.io with parameters that will let it join a room as a subscriber.

The following environment vars are supported:

  • LIVEKIT_API_KEY: API key that matches server config
  • LIVEKIT_API_SECRET: API secret that matches server config
  • LIVEKIT_HOST: hostname of the LiveKit installation (e.g. wss://mylivekithost.com)
  • LIVEKIT_ROOM: the room to join
  • DURATION: (optional) amount of time to stay in the room before existing
  • LIVEKIT_IDENTITY_PREFIX: (optional) custom name prefix for the simulated subscriber
  • ENABLE_PUBLISH: (optional) enables a simulated publisher with audio and video
  • TABS: (optional) number of simultanious room connections

Kubernetes Example

To use it on Kubernetes, you'll need a deployment like the following. Note, each instance of the load tester uses approximately 200-500m CPU units and 100MB memory.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: livekit-chrome-tester
  labels:
    app: chrome-tester
spec:
  replicas: 5
  selector:
    matchLabels:
      app: chrome-tester
  template:
    metadata:
      labels:
        app: chrome-tester
    spec:
      containers:
      - name: chrome-tester
        image: livekit/chrometester
        imagePullPolicy: IfNotPresent
        env:
        - name: LIVEKIT_API_KEY
          value: <yourkey>
        - name: LIVEKIT_API_SECRET
          value: <yoursecret>
        - name: LIVEKIT_HOST
          value: <yourhost>
        - name: LIVEKIT_ROOM
          value: <roomname>
        - name: ENABLE_PUBLISH
          value: "true"
        - name: TABS
          value: "1"

About

A livekit tester to simulate a subscriber in a room, uses headless Chromium

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 58.2%
  • Shell 28.6%
  • Dockerfile 13.2%