Skip to content

tldev-de/nextcloud-talk-load-test

Repository files navigation

nextcloud-talk-load-test

Playwright-based load testing tool for Nextcloud Talk guest calls. Spawns N headless Chromium instances, each joining the same public call link as a guest with fake audio/video, then stays for a configurable duration.

Use it to benchmark your Nextcloud Talk High Performance Backend (HPB), signaling server, or TURN setup under realistic WebRTC load.

Requirements

  • Node.js 18+
  • Linux/macOS (Windows works via WSL)
  • ~250 MB free disk for the bundled Chromium build
  • A Nextcloud Talk room with guest access enabled and its public call link

System dependencies for Chromium are installed automatically by Playwright on most distros. On minimal servers you may additionally need:

npx playwright install-deps chromium
# For the optional non-headless mode (start-headless.sh):
sudo apt-get install -y xvfb xauth

Install

git clone https://github.com/tldev-de/nextcloud-talk-load-test.git
cd nextcloud-talk-load-test
npm install

The postinstall hook downloads the bundled Chromium build (~170 MB).

Configuration

All scripts read configuration from environment variables. Only CALL_URL is required. A .env file in the project root is loaded automatically – copy .env.example to .env and adjust:

cp .env.example .env
$EDITOR .env

CLI overrides take precedence over .env, e.g. NUMBER_OF_USERS=25 npm run stress.

Variable Default Description
CALL_URL – (required) Full Nextcloud Talk call URL (e.g. https://nc.example.com/call/abc123).
NUMBER_OF_USERS 10 How many simulated guests to spawn.
DELAY_BETWEEN_USERS_MS 2000 Delay between starting each guest, to avoid thundering-herd login.
CALL_DURATION_SECONDS 600 (stress) / 60 (smoke) How long each guest stays in the call.
HEADLESS true Boolean (true/false/1/0/yes/no). false requires Xvfb on servers.
JOIN_TIMEOUT_MS 120000 Per-step Playwright timeout for the stress test join flow.
USER_NAME Playwright Test User Only used by testJoin.js.

Usage

Single-user smoke test

Verifies that the join flow works against your Nextcloud instance.

CALL_URL=https://nc.example.com/call/abc123 npm run smoke

Stress test

10 guests, each with fake video + fake audio, staying 10 minutes:

CALL_URL=https://nc.example.com/call/abc123 npm run stress

Override defaults:

CALL_URL=https://nc.example.com/call/abc123 \
NUMBER_OF_USERS=25 \
CALL_DURATION_SECONDS=120 \
npm run stress

Non-headless mode (visible browser windows)

On a server without a display, wrap any of the scripts with Xvfb via the included helper:

CALL_URL=https://nc.example.com/call/abc123 ./start-headless.sh
# or pass a specific script:
CALL_URL=https://nc.example.com/call/abc123 ./start-headless.sh testJoin.js

Docker

A Dockerfile based on the official Playwright image (Chromium and all system deps preinstalled) is included.

docker build -t nextcloud-talk-load-test .

# Stress test, config via --env-file:
docker run --rm --shm-size=2g --env-file .env nextcloud-talk-load-test

# Override individual vars at runtime:
docker run --rm --shm-size=2g \
  -e CALL_URL=https://nc.example.com/call/abc123 \
  -e NUMBER_OF_USERS=25 \
  nextcloud-talk-load-test

# Run the smoke test instead of the stress test:
docker run --rm --shm-size=2g --env-file .env nextcloud-talk-load-test testJoin.js

--shm-size=2g (or --ipc=host) prevents Chromium from crashing on the default 64 MB /dev/shm.

How the join flow works

Each guest:

  1. Opens the call URL.
  2. Fills the guest name in the input[placeholder="Guest"] field.
  3. Clicks the Join call button inside the media-settings modal (.media-settings button.join-call).
  4. Stays in the call for CALL_DURATION_SECONDS.

The browser context is locked to en-US so the selectors match regardless of server locale. Fake media is provided via Chromium's --use-fake-device-for-media-stream.

Caveats

  • Tested against Nextcloud Talk on Nextcloud 33 (May 2026). UI selectors may break with future Talk releases – inspect the join modal and update the selectors in the .js files if needed.
  • Each headless Chromium instance consumes ~150 MB RAM and roughly half a CPU core under active video. Plan capacity for the load generator accordingly.
  • The tool only exercises the guest join path. Authenticated joins, lobby/waiting room, end-to-end encryption, and screen sharing are not covered.
  • This is a load generator, not an automated test. There are no assertions on call quality – measure that on the server side (HPB logs, TURN metrics, Grafana, etc.).

Related

Developed alongside server.camp - managed hosting for open-source tools (Nextcloud, Talk, and others), operated in Germany, GDPR-compliant, no lock-in.

server.camp

License

ISC – see LICENSE.

About

Simple Nextcloud Talk Stress / Load Test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors