bigbluebutton-Github/bigbluebutton-tests/playwright
Ramón Souza 61cfdd9377
Merge pull request #15725 from germanocaumo/f-t-cursor
fix(cursor): hide cursor for others on mouse leave
2022-09-30 12:58:41 -03:00
..
audio Merge remote-tracking branch 'upstream/v2.6.x-release' into test-update-test-plan-links 2022-08-05 13:55:35 -03:00
breakout test: fix and update test plan links 2022-07-25 16:42:48 -03:00
chat refactor: code smell 2022-09-22 10:06:23 +00:00
connectionStatus Add new 2.5 shared notes tests 2022-07-20 15:44:09 -04:00
core fix: add config to disable emoji sort on click 2022-09-27 15:47:39 -03:00
customparameters Merge branch 'v2.5.x-release' of github.com:bigbluebutton/bigbluebutton into cairosvg 2022-08-19 13:04:00 +00:00
notifications Merge pull request #15598 from ramonlsouza/merge-2526-aug25 2022-08-29 15:58:53 -03:00
options moved help test to options test 2022-09-12 09:33:53 -03:00
polling Merge branch 'v2.6.x-release' of github.com:bigbluebutton/bigbluebutton into cairosvg 2022-08-19 14:25:03 +00:00
presentation confirm whiteboard removed 2022-09-16 17:53:17 -03:00
screenshare Merge pull request #15578 from BrentBaccala/firefox-ci-2.6 2022-08-23 10:54:13 -04:00
sharednotes Add new 2.5 shared notes tests 2022-07-20 15:44:09 -04:00
stress update test usersJoinKeepingConnected 2022-07-22 17:44:46 -04:00
user Merge branch 'v2.5.x-release' of github.com:bigbluebutton/bigbluebutton into cairosvg 2022-08-19 13:04:00 +00:00
virtualizedlist Minor updates to the failing test specs 2022-04-27 08:46:15 -04:00
webcam Merge branch 'v2.5.x-release' of github.com:bigbluebutton/bigbluebutton into cairosvg 2022-08-19 13:04:00 +00:00
whiteboard test: fix all 2.6 tests and temporarily skip inconsistent ones 2022-07-01 17:55:32 -03:00
.env.template add debug features 2022-02-28 18:21:50 -03:00
.gitignore add debug features 2022-02-28 18:21:50 -03:00
package-lock.json fix: upgrade @playwright/test from 1.22.2 to 1.25.0 2022-09-05 05:25:48 +00:00
package.json Merge pull request #15639 from bigbluebutton/snyk-upgrade-46275f7a0dfd4f946e42f058080c6739 2022-09-08 11:27:37 -04:00
playwright.config.js test: update test configs 2022-07-13 17:02:15 -03:00
README.md add documentation on how to record Meteor traffic 2022-06-17 15:47:39 -04: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 --browser=firefox
or
$ npm test chat -- --browser=firefox

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"

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.