bigbluebutton-Github/bigbluebutton-tests/playwright
Anton Barboza de Sá 04b86c12a9
test: Update test steps that frequently fail in CI (#21267)
- Share camera: removes unnecessary check for "connecting" element;
- Send presentation with annotation: Removes check for toast notification after sending the file - doesn't show anymore
- Zoom: bug spotted. test flagged as flaky and issue opened + linked
2024-09-26 10:51:00 -03:00
..
api
audio test: Add message to the test expect (#20718) 2024-07-30 18:49:02 -04:00
breakout test: Add message to the test expect (#20718) 2024-07-30 18:49:02 -04:00
chat fix typo 2024-07-31 17:31:59 -03:00
connectionFailure
connectionStatus test: rewrite test tagging 2024-07-08 10:42:57 -03:00
core restore react 18 createRoot render method (#21041) 2024-09-12 14:34:36 -03:00
layouts feat(layout): Add propagate layout toggle (#21027) 2024-09-09 08:48:07 -03:00
learningdashboard fix(whiteboard): First wheel zoom always going to top left corner (#21011) 2024-09-10 14:38:55 -03:00
notifications restore react 18 createRoot render method (#21041) 2024-09-12 14:34:36 -03:00
options test: Add message to the test expect (#20718) 2024-07-30 18:49:02 -04:00
parameters test: Updates whiteboard tests (#20414) 2024-09-12 13:51:26 -03:00
polling test: All param tests on ci (#20878) 2024-08-23 14:32:58 -03:00
presentation test: Update test steps that frequently fail in CI (#21267) 2024-09-26 10:51:00 -03:00
reconnection
screenshare restore react 18 createRoot render method (#21041) 2024-09-12 14:34:36 -03:00
sharednotes test: All param tests on ci (#20878) 2024-08-23 14:32:58 -03:00
stress
user test: All param tests on ci (#20878) 2024-08-23 14:32:58 -03:00
virtualizedlist
webcam [3.0] feat: Accept custom webcamBackgroundURL (#20920) 2024-08-23 09:04:56 -03:00
whiteboard test: Updates whiteboard tests (#20414) 2024-09-12 13:51:26 -03:00
.env.template test: update playwright tests to support sha256 and sha512 algorithms (#19725) 2024-03-17 21:34:46 -04:00
.gitignore test: add blob-report folder to gitignore 2024-05-14 18:15:51 -03:00
custom-reporter.js ci: Introduces custom reporter (automated tests) (#20712) 2024-07-17 22:19:39 -03:00
fixtures.js
package-lock.json build(deps): bump the npm_and_yarn group across 6 directories with 2 updates (#20928) 2024-08-14 08:52:25 -04:00
package.json build(deps): bump the npm_and_yarn group across 6 directories with 2 updates (#20928) 2024-08-14 08:52:25 -04:00
playwright.config.js ci: Introduces custom reporter (automated tests) (#20712) 2024-07-17 22:19:39 -03:00
README.md test: add parallel npm-script 2024-05-14 18:13:32 -03:00

BigBlueButton Playwright Tests

Tests for BigBlueButton using Playwright.

Setup (with an existing BigBlueButton server)

You need to install the dependencies:

$ cd ../bigbluebutton-tests/playwright
$ npm install
$ npx playwright install

You may also need to run the following command:

$ npx playwright install-deps

To run these tests with an existing BigBlueButton server, you need to find the server's URL and secret (can be done with bbb-conf --secret command). You need to put them into the .env file inside bigbluebutton-tests/playwright folder (variables BBB_URL and BBB_SECRET). Note: the value for BBB_URL follows the format of https://<hostname>/bigbluebutton/api.

Run tests

We recommend to use Node version 16 or higher to avoid errors in JavaScript. Tests can be executed using npx and npm test. You can run all tests in each of 3 supported environments (chromium, firefox, webkit) with one of the following commands:

$ npx playwright test
or
$ npm test

You can also run a single test suite and limit the execution to only one browser:

$ npx playwright test chat --project="firefox"
or
$ npm test chat -- --project="firefox" # or "chromium" for example

Npm-scripts parameters

Run fully parallel mode:

$ npm test chat --parallel -- --project chromium

Additional commands

To see the tests running visually, you must run them in headed mode:

$ npm run test:headed chat

If you want to run a specific test or a specific group of tests, you can do so with the following command:

$ npm run test:filter "Send public message"

(note that this filter needs to be passed in "double quotes")

You can also use this also through the test tree, adding the test suite / group of tests before the test filter:

$ npm run test:filter "notifications chat"

If you don't have BBB_URL and BBB_SECRET set, but have ssh access to the test server, you can use the following command to obtain BBB_URL and BBB_SECRET via ssh:

$ npm run test:ssh -- HOSTNAME

Recording Meteor messages

A modified version of websockify can be used to record the Meteor messages exchanged between client and server, by inserted a WebSocket proxy between the client and server, configured to record the sessions.

First, on the server, obtain the modified websockify:

git clone https://github.com/BrentBaccala/websockify.git

Install additional dependencies:

sudo apt install python3-numpy

Then add the following stanza to /usr/share/bigbluebutton/nginx/bbb-html5.nginx:

location ~* /html5client/.*/websocket {
  proxy_pass http://127.0.0.1:4200;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "Upgrade";
}

From the websockify directory, run websockify configured to proxy WebSocket connections from port 4200 to port 4100, recording the sessions to files named bbb.1, bbb.2, etc.:

./run -v --record=bbb --ws-target=ws://localhost:4100{path} 4200

Now reload nginx:

sudo systemctl reload nginx

Meteor messages for Big Blue Button sessions will now be recorded for later review.

It doesn't seem necessary to relay cookies, but that could be done by giving a --ws-relay-header=Cookie argument to websockify.

You can print the browser console log to standard output by setting the environment variable CONSOLE:

$ CONSOLE= npm test chat -- --project=firefox

CONSOLE can be blank (as in the example), or can be a comma-separated list of the following options:

Option Meaning
color (or "colour") colorize the output
label label each line with the BigBlueButton user
norefs remove JavaScript reference URLs
nots remove timestamps
nocl remove "clientLogger:" strings