Skip to content

test: add nightly tests for recorded media, playback content, pause/resume and breakout recording - #26157

Merged
ramonlsouza merged 1 commit into
bigbluebutton:v4.0.x-developfrom
antobinary:test-400-nightly-recording-tests
Oct 22, 2026
Merged

ramonlsouza merged 1 commit into
bigbluebutton:v4.0.x-developfrom
antobinary:test-400-nightly-recording-tests

Conversation

@antobinary

@antobinary antobinary commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Adds the first Playwright tests that look inside a recording, under a new @nightly tag for tests that wait on recording processing or on timers. They are not tagged @ci, so neither the per-PR gate nor the legacy bridge job selects them; npm run test-nightly runs them on Chromium.

  • Each recording is made once in a beforeAll and serves several playback tests, and every assertion names the record ID it failed on.
  • Recorded media (@nightly @media, passes on both bridges): the moderator talks through the fake microphone with the camera on for about 20 seconds and shares the screen from 8 seconds in. The presentation playback must have a webcams video as long as the recording ran, whose frames show the camera: a recording without webcams also gets a webcams video, a black 640x480 one, so its size alone proves nothing. The screenshare must be hidden before its start and shown once the playback is seeked past it. The recorded audio is decoded in the page and must not be silent: the fake speech comes out at about -21 dBFS, a recording without a microphone at -91 dBFS.
  • Recorded content: a chat message, a rectangle and a published poll, then a 15 second pause during which a chat message is sent, then a chat message and shared notes after resuming. The rectangle must appear in the playback only past the time it was drawn, the poll result with its one vote must be in the playback chat, and the playback must be as long as the two recorded segments, without the message sent while paused and with the other two. A recorded length may be 4 seconds off the time the moderator's client saw the recording run (each state change shows there a round trip after the server took it, and the end is timed at the click); measured, they differed by under a second, and the 15 second pause is far outside that.
  • Which formats besides presentation a server publishes is its configuration, so RECORDING_FORMATS lists them and the podcast, video, screenshare and notes tests skip for a format it does not list. A listed format must be listed for the recording and its media must be retrievable with the recording's length; Playwright's Chromium cannot decode the H.264 of the video format, so its length is read from the MP4 movie header. The wait for processing is bounded by RECORDING_PROCESSING_WAIT_TIME, 10 minutes scaled by the timeout multiplier, because one rap worker processes every format of every ended meeting in turn.
  • Breakout recording: a breakout room created with the record option records once a moderator starts it there, and its recording is published as a breakout recording of the parent's first room. Create.joinFirstBreakoutRoomAsModerator becomes protected so the Join helper can start the room's recording from inside it.
  • "Generate a recording that captures microphone audio" took the first playback format getRecordings returned, which on a server with more formats was the podcast, and failed. It now selects the presentation format by type, through the helper the other recording tests use.

Why

Recordings are processed minutes after a meeting ends, so no test looked inside one: the per-PR gate only checked that a playback URL came back. A nightly tier can afford the wait and catches regressions in what the processing scripts actually produce.

Recording formats

The server under test says which formats it publishes through RECORDING_FORMATS (default presentation); the podcast, video, screenshare and notes tests skip, naming the format, when it is not listed. To cover all five, install and enable the formats on the server first:

sudo apt-get install -y bbb-playback-notes bbb-playback-podcast bbb-playback-screenshare bbb-playback-video
sudo mkdir -p /etc/bigbluebutton/recording
sudo tee /etc/bigbluebutton/recording/recording.yml > /dev/null <<'YAML'
steps:
  archive: "sanity"
  sanity: "captions"
  captions:
    - "process:presentation"
    - "process:podcast"
    - "process:video"
    - "process:screenshare"
    - "process:notes"
  "process:presentation": "publish:presentation"
  "process:podcast": "publish:podcast"
  "process:video": "publish:video"
  "process:screenshare": "publish:screenshare"
  "process:notes": "publish:notes"
YAML
sudo systemctl restart bbb-rap-resque-worker bbb-rap-starter

(the worker caches recording.yml at start, so the restart is needed). Then:

cd bigbluebutton-tests/playwright
RECORDING_FORMATS=presentation,podcast,video,screenshare,notes npm run test-nightly

Each listed format must then be listed for the recording by getRecordings and its media retrievable with the recording's length: podcast audio and screenshare video are decoded in the page; the video format is H.264, which Playwright's Chromium cannot decode, so its length is read from the MP4 movie header; the notes format must contain the shared notes text.

How to test

cd bigbluebutton-tests/playwright
npm run test-nightly

On a server that publishes only the presentation format, the podcast, video, screenshare and notes tests skip and say which format is missing; see above for all five.

Scope

This PR adds the tests, the @nightly tag and the test-nightly script only. Nothing runs them on a schedule yet, and their reports go wherever the local run puts them (the usual playwright-report/ of the html reporter). The scheduled "Nightly tests" workflow that installs every recording format on a fresh server, runs the @nightly tests once per bridge, and merges the results into a nightly-test-reports artifact is a separate change that this PR is a prerequisite for.

Testing

  • npm run test-nightly lists exactly the 11 @nightly tests (4 recorded content, 6 recorded media, 1 breakout recording); none of them carries @ci, so the gate listing is unchanged.
  • The suite's typecheck, eslint and prettier pass on the changed files (the pre-existing exportedAnnotationsOverlap.ts typecheck error aside).
  • CI: one shard failed, on "Open Help Button" only (bigbluebutton.org answers 404 during its maintenance); the @nightly tests are not in the gate, so CI does not run them.
  • Not run end to end on this branch today: the dev server available for the re-check could not process recordings (its bbb-rap-starter fails at start on an exhausted inotify watch budget shared with the host). The results in the commit message are from the original 4.0.0-rc.4 runs.

@antobinary antobinary added this to the Release 4.0 milestone Oct 21, 2026
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b9552da9-d354-456b-a67d-b72ececf0610
📥 Commits

Reviewing files that changed from the base of the PR and between 539216b and 73850a3.

📒 Files selected for processing: 4
  • bigbluebutton-tests/playwright/breakout/breakout.spec.ts
  • bigbluebutton-tests/playwright/breakout/join.ts
  • bigbluebutton-tests/playwright/core/elements.ts
  • bigbluebutton-tests/playwright/recording/recording.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The pull request adds nightly Playwright tests for recorded meeting content, media, and breakout-room recordings. It adds helpers to record meetings, wait for recording publication, locate playback formats, and validate playback output and recording metadata. It also adds a Chromium test command and documents nightly test selection and recording-format configuration.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant NightlyTest
  participant RecordedPlayback
  participant Meeting
  participant PublishedRecording
  participant PlaybackChecks
  NightlyTest->>RecordedPlayback: record meeting content or media
  RecordedPlayback->>Meeting: perform recording actions and end meeting
  RecordedPlayback->>PublishedRecording: wait for recording publication
  PublishedRecording->>PlaybackChecks: provide recording for playback validation
Loading

Possibly related issues

Suggested reviewers: imdt-claudiop, ramonlsouza

Merge Risk: ⚪ Minimal · up to 73850

No merge-blocking issue was identified in the nightly recording tests. They remain outside the per-PR test gate as intended.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description clearly explains the new nightly recording tests, supported coverage, test command, format handling, breakout recording, and reported testing status.
Title check Passed The title clearly summarizes the main change: adding nightly tests for recorded media, playback content, pause/resume behavior, and breakout recording.
Docstring Coverage Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 9 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@antobinary
antobinary force-pushed the test-400-nightly-recording-tests branch from b922214 to 539216b Compare October 22, 2026 17:02
@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

…esume and breakout recording

Recordings are processed minutes after a meeting ends, so no test looked
inside one: the per-PR gate only checked that a playback URL came back. This
adds a @nightly tag for tests that wait on recording processing or on
timers. They are not tagged @ci, so neither the per-PR gate nor the legacy
bridge job selects them, and npm run test-nightly runs them on Chromium.

Each recording is made once in a beforeAll and serves several playback
tests, and every assertion names the record ID it failed on. In the first,
the moderator talks through the fake microphone with the camera on for about
20 seconds and shares the screen from 8 seconds in. The presentation
playback must have a webcams video as long as the recording ran, whose
frames show the camera: a recording without webcams also gets a webcams
video, a black 640x480 one, so its size alone proves nothing. The screenshare
must be hidden before its start and shown once the playback is seeked past
it. The recorded audio is decoded in the page and must not be silent: the
fake speech comes out at about -21 dBFS, a recording without a microphone
at -91 dBFS. These tests are also tagged @media and pass on both bridges.

The second recording has a chat message, a rectangle and a published poll,
then a 15 second pause during which a chat message is sent, then a chat
message and shared notes after resuming. The rectangle must appear in the
playback only past the time it was drawn, the poll result with its one vote
must be in the playback chat, and the playback must be as long as the two
recorded segments, without the message sent while paused and with the other
two. A recorded length may be 4 seconds off the time the moderator's client
saw the recording run (each state change shows there a round trip after the
server took it, and the end is timed at the click); measured, they differed by
under a second, and the 15 second pause is far outside that.

Which formats besides presentation a server publishes is its configuration,
so RECORDING_FORMATS lists them and the podcast, video, screenshare and
notes tests skip for a format it does not list. A listed format must be
listed for the recording and its media must be retrievable with the
recording's length; Playwright's Chromium cannot decode the H.264 of the
video format, so its length is read from the MP4 movie header. The wait for
processing is bounded by RECORDING_PROCESSING_WAIT_TIME, 10 minutes scaled by
the timeout multiplier, because one rap worker processes every format of
every ended meeting in turn.

A breakout room created with the record option records once a moderator
starts it there, and its recording is published as a breakout recording of
the parent's first room. Create.joinFirstBreakoutRoomAsModerator becomes
protected so the Join helper can start the room's recording from inside
it.

"Generate a recording that captures microphone audio" took the first
playback format getRecordings returned, which on a server with more formats
was the podcast, and failed. It now selects the presentation format by type,
through the helper the other recording tests use.
@antobinary
antobinary force-pushed the test-400-nightly-recording-tests branch from 539216b to 73850a3 Compare October 22, 2026 18:19
@github-actions

Copy link
Copy Markdown

⏳ Automated tests are running...

@ramonlsouza
ramonlsouza merged commit eb3e4a7 into bigbluebutton:v4.0.x-develop Oct 22, 2026
30 of 32 checks passed
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.

2 participants