Files
Jonathan Lennox a19f89487f feat(tests): port malleus, the load tester, from jitsi-meet-torture (#17846)
* refactor(tests): share the grid setup and room name assembly

Factor the Selenium Grid handling out of wdio.grid.conf.ts into helpers/grid.ts so
that the Firefox grid config and other configs can reuse it (the Firefox one was
missing the remote fake-audio path rewrite), split generateRoomName into a
buildRoomName helper that applies the prefix/suffix convention to any base name,
and export the shared Chrome settings from wdio.conf.ts.

* feat(tests): let Participant drive any session and the load-test client

Participant names are no longer limited to p1..p6 and a browser session can be
injected instead of being looked up on the multiremote object, so participants can
be created for sessions (or tabs) outside the fixed multiremote setup. A loadTest
flag skips the UI-only parts of joining and hanging up (prejoin, styling, dialog
checks, toolbar hangup) for the lib-jitsi-meet only load-test client, which exposes
the conference as APP.room. Existing tests are unaffected.

* feat(load-test): bring the load-test client into the repository

The lib-jitsi-meet only client used for load testing lived in
jitsi/jitsi-meet-load-test since it was split out in 0b57bcb20. Port it back as
TypeScript, reusing the URL helpers it had copied, so the load tester (malleus)
can build and inject it into the browsers it drives. It is a separate webpack
entry (`npm run build:load-test`, config name load-test) written to build/ and is
deliberately not deployed: it is not in the Makefile or the Debian install.

Changes from the original: the room can be given as a room hash parameter and
protocol-relative XMPP URLs are absolutized (the page runs from file://), the
bare `room` references in getConnectionState and the stage view participant
selection are fixed, and jQuery/lodash are dropped in favor of DOM APIs.

* feat(tests): port malleus, the load tester, from jitsi-meet-torture

Malleus Jitsificus fills conferences on a deployment with browser-driven
participants and reports whether they all made it. It reuses the WebdriverIO suite
(Chrome setup, grid support, Participant, browser logs) but runs through its own
wdio config, which generates one browser session per participant (or per group of
tabs) from the MALLEUS_* settings, and a single spec kept out of specs/.

Ported: conferences x participants with video/audio sender counts, staggered
joins, duration, regions, extra URL params, stage view, P2P toggle, JWT; load-test
mode with several clients per tab and several tabs per browser; lite mode; P.59
speaker switching; bridge disruption via a site-specific blip script with health
checks; requesting typed grid nodes (nodename:applicationName) for senders and
receivers. The script that re-typed Grid 3 nodes over SSH is not carried over: it
does not apply to a Selenium 4 grid, where the node stereotypes declare the types.

Differences from the Java version: the entry point is a Node CLI
(`npm run malleus -- --flag=value`, scripts/malleus.sh forwards to it, the
positional form is gone); the load-test client is uploaded into the browsers
together with resources/loadTest.html rather than served by the deployment; room
names are prefix, conference index, suffix, reusing ROOM_NAME_SUFFIX (which may be
a comma-separated list spread over the conferences) so a shard name at the end of
the name keeps working; tabs per browser require load-test mode.

* fix(load-test): match jitsi-meet's current receiver constraints

The client's emulation of the receiver video constraints had drifted from what
jitsi-meet sends (react/features/video-quality/subscriber.ts):

- It set one maxHeight in defaultConstraints, i.e. for every source in the
  conference, where jitsi-meet sets defaultConstraints to 0 and constrains only
  the sources visible in the filmstrip (one page of tiles, 25 by default). In
  large conferences that made a load-test receiver ask for every video.
- The tile quality came from a participant-count table (720/360/180); jitsi-meet
  derives it from the tile height for the window size, capped at 360 beyond
  maxFullResolutionParticipants. Port the tile grid selection
  (calculateResponsiveTileViewDimensions) for a configurable virtual window,
  1280x1024 by default like the test suite's Chrome.
- Stage view asked 2160 from everyone; it now asks the large-video quality for
  the on-stage source and 180 for the first filmstrip page, like jitsi-meet.
- lastN still applied lastNLimits, which jitsi-meet dropped in 6efa4f247; send
  startLastN ?? channelLastN ?? -1 instead.
- Stage view is also used below 3 participants, as in jitsi-meet, the on-stage
  participant is re-elected when they leave, and no constraints are sent while
  leaving.
2026-09-18 10:58:08 -04:00
..