Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 263970b

Browse files
authored
Merge branch 'master' into master
2 parents 49cef3e + 062678d commit 263970b

8 files changed

+317
-172
lines changed

_posts/2017-07-20-html5-tests.md

Lines changed: 34 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -5,97 +5,73 @@ category: labs
55
date: 2017-07-20 23:37:51
66
---
77

8-
# Acceptance Testing in HTML Client. Getting Started
8+
## BigBlueButton Puppeteer Tests
99

10-
The test suite for HTML5 client is currently under active development. The following instructions will help you install all the necessary tools and libraries to run the exiting specs and start writing your own tests.
10+
Tests for BigBlueButton using Puppeteer, Chromium and Jest.
1111

12-
## Run Selenium Server
12+
## Get BBB URL and Secret and configure .env file
1313

14-
Assuming that you installed HTML5 client already, you should have all `npm` packages including `webdriver-manager` installed at this stage. We use `webdriver-manager` tool to keep track of the latest Selenium Server and Chrome / Firefox WebDrivers.
14+
To run these tests with an existing BigBlueButton server, make sure you have a server set up, and that you have the server's URL and secret. These will be the same URL and secret you would use to make API calls to the server. If you do not have these, you can find them by running `bbb-conf --secret` from the terminal in the server.
1515

16-
From the `bigbluebutton/bigbluebutton-html5` run:
16+
Copy the `.env-template` file to a new file, and name it `.env`. In the `.env` file, add your BigBlueButton server URL and secret, so the tests will know which server to connect to.
1717

18-
```bash
19-
$ ./node_modules/.bin/webdriver-manager update
20-
```
21-
22-
This command will download the latest versions of the WebDrivers and Selenium.
18+
## Setup
2319

24-
Along with the Selenium and WebDrivers, you need to install the browsers itself.
20+
To run these tests, you will need the following:
21+
* Ubuntu 16.04 or later
22+
* Node.js 8.11.4 or later
23+
* Docker
2524

26-
### How to install Chrome:
25+
These instructions assume you have the BigBlueButton repository cloned into a directory named `bigbluebutton`.
2726

28-
```bash
29-
$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
30-
$ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
31-
$ sudo apt-get update
32-
$ sudo apt-get install google-chrome-stable
33-
```
27+
First, you need to have the dependencies installed with `meteor npm install`, from the `bigbluebutton-html5` directory. When Puppeteer installs, it will automatically install the Chromium browser in which the tests will run.
3428

35-
### How to install Firefox:
29+
To run individual tests, you can also optionally install Jest globally with `sudo npm install jest -g`.
3630

3731
```bash
38-
$ sudo apt-get install firefox
32+
$ cd tests/puppeteer
33+
$ npm install
3934
```
4035

41-
There are 3 browsers currently used in the test specs (multiremote mode): Chrome Stable/Mobile, Firefox Stable.
36+
## Running the tests with an existing BigBlueButton server (All in one)
4237

43-
In order to run headless browser, we will use Xvfb display server:
38+
To run all the tests at once, run `npm test`.
4439

45-
```bash
46-
$ sudo apt-get install xvfb
47-
```
40+
## Running a single test with an existing BigBlueButton server (Specific test)
4841

49-
At this point, you can run the Selenium server (from under `bigbluebutton/bigbluebutton-html5`):
42+
To run a specific test from `bash`:
5043

5144
```bash
52-
$ xvfb-run ./node_modules/.bin/webdriver-manager start
45+
$ ./tests/puppeteer/run.sh -t testcase
5346
```
5447

55-
If you get an error `Xvfb failed to start`, run it with an `-a` option (Xvfb will use another display if the current one is already in use):
48+
Test cases list: `webcamlayout/whiteboard/webcam/virtualizedlist/user/sharednotes/screenshare/presentation/notifications/customparameters/chat/breakout/audio`.
5649

57-
```bash
58-
$ xvfb-run -a ./node_modules/.bin/webdriver-manager start
59-
```
50+
If you have Jest installed globally, you can run individual tests with `jest TEST [TEST...]`. The tests are found in the `.test.js` files, but you may choose to omit file extensions when running the tests.
6051

61-
Congratulations! You have Selenium server up and running. It is ready to handle your test cases. Now, keep the `xvfb-run` process running and continue in a new terminal session.
52+
## Debugging, Metrics and Evidences
6253

63-
## Run the test specs
54+
### Debugging
6455

65-
We use WebdriverIO interface to write the acceptance test cases. In order to execute the existing tests, you need to use `wdio` test runner. By default, it will look into any `*.spec.js` file inside the `/home/firstuser/dev/bigbluebutton/bigbluebutton-html5/tests/webdriverio/specs` directory. You can change the location of the test specs by modifying the `wdio` config file: `wdio.conf.js` (inside the `webdriverio` directory).
56+
To debug the tests, you will need to set `DEBUG=true`; if `DEBUG` receives `true`, the logs will show in the console from which we start the tests.
6657

67-
Before proceeding any further, make sure HTML5 client is up and running.
68-
Node.js installation is also required:
58+
Debugging output will look like below:
6959

70-
```bash
71-
$ sudo apt-get install nodejs-legacy
7260
```
73-
74-
You can run all of the existing test specs with a single npm command:
75-
76-
```bash
77-
$ cd /home/firstuser/dev/bigbluebutton/bigbluebutton-html5
78-
$ npm test
61+
console.log
62+
19-Jan-2021 13:03:30 Meeting ID: random-6850458
7963
```
8064

81-
### Test suites
65+
### Getting Metrics
8266

83-
To make it easier to run a single specific set of tests, we group the specs into test suits. All the suits are defined in `wdio.conf.js`.
67+
To run the tests and get their metrics, you will need to set `BBB_COLLECT_METRICS=true`; if `BBB_COLLECT_METRICS` receives `true`, the metrics will be generated at the end of the test inside `/data/test-date-testName/metrics` folder; for example:
68+
`data/test-19-01-2021-pollResultsChatMessage/metrics`.
8469

85-
To run a single test suite, you need to pass its name to the npm script:
70+
### Getting Evidences
8671

87-
```bash
88-
$ npm test -- --suite login
89-
```
90-
91-
If you want to run a single spec (test file), `--spec` option can be used:
92-
93-
```bash
94-
$ npm test -- --spec ./tests/webdriverio/specs/login.spec.js
95-
```
72+
Generating evidences is about to take screenshots of the client during testing. And to realize this, assigning `GENERATE_EVIDENCES` in `.env` to `true`. This will take screenshots and save them in `data/test-date-testName/screenshots`; for example: `data/test-19-01-2021-pollResultsChatMessage/screenshots`.
9673

9774
## Visual Regression
9875

99-
Our test suite includes visual regression specs that can be execute separately with `npm run test-visual-regression` (desktop + mobile) or `npm run test-visual-regression-desktop` (desktop only). It will take screenshots of various views and components of the client, save them inside the `/screenshots` folder and put the failed cases into `/screenshots/diff`. The pictures will be put into subfolders sorted by browser name and screen resolution. By default, we use desktop Firefox, desktop Chrome and mobile Chrome (via mobile emulation). The screenshots are taken in 960x1200 and 1920x1200 resolutions.
76+
Our test suite includes visual regression specs that can be execute separately with `npm run test-visual-regression` (desktop only). It will take screenshots of various views and components of the client, save them inside the `tests/puppeteer/__image_snapshots__` folder and put the failed cases into `tests/puppeteer/__image_snapshots__/__diff_output__`.
10077

101-
The pictures inside `/screenshots/reference` are reference images the test runner uses to detect potential visual regressions. If there's a big UI change in the client, the images can be regenerated any time using `npm run generate-refs-visual-regression` or `npm run generate-refs-visual-regression-desktop`.

_posts/2018-06-03-install.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,6 +1440,7 @@ To create the dialplan, use the XML below and save it to `/opt/freeswitch/conf/d
14401440
```xml
14411441
<extension name="from_my_provider">
14421442
<condition field="destination_number" expression="^EXTERNALDID">
1443+
<action application="start_dtmf" />
14431444
<action application="answer"/>
14441445
<action application="sleep" data="500"/>
14451446
<action application="play_and_get_digits" data="5 5 3 7000 # conference/conf-pin.wav ivr/ivr-that_was_an_invalid_entry.wav pin \d+"/>

_posts/2019-02-14-customize.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ To create the dialplan, use the XML below and save it to `/opt/freeswitch/conf/d
595595
```xml
596596
<extension name="from_my_provider">
597597
<condition field="destination_number" expression="^EXTERNALDID">
598+
<action application="start_dtmf" />
598599
<action application="answer"/>
599600
<action application="sleep" data="1000"/>
600601
<action application="play_and_get_digits" data="5 5 3 7000 # conference/conf-pin.wav ivr/ivr-that_was_an_invalid_entry.wav pin \d+"/>
@@ -949,7 +950,7 @@ Kurento uses the range 24577 - 32768, which is defined in `/etc/kurento/modules/
949950

950951
### Apply custom settings for TURN server
951952

952-
If always want a specific TURN server configuration, the following to `apply-config.sh` and modify `aaa.bbb.ccc.ddd` and `secret` with your values.
953+
If always want a specific TURN server configuration, the following to [apply-config.sh](#apply-confsh) and modify `aaa.bbb.ccc.ddd` and `secret` with your values.
953954

954955
```bash
955956
echo " - Update TURN server configuration turn-stun-servers.xml"
@@ -1131,7 +1132,8 @@ Useful tools for development:
11311132
| `userdata-bbb_client_title=` | Specifies a string to set as the HTML5 client title | BigBlueButton |
11321133
| `userdata-bbb_force_listen_only=` | If set to `true`, the user will be not be able to join with a microphone as an option | `false` |
11331134
| `userdata-bbb_listen_only_mode=` | If set to `false`, the user will not be able to join the audio part of the meeting without a microphone (disables listen-only mode) | `true` |
1134-
| `userdata-bbb_skip_check_audio=` | If set to `true`, the user will not see the "echo test" prompt on login | `false` |
1135+
| `userdata-bbb_skip_check_audio=` | If set to `true`, the user will not see the "echo test" prompt when sharing audio | `false` |
1136+
| `userdata-bbb_skip_check_audio_on_first_join=` | (Introduced in BigBlueButton 2.3) If set to `true`, the user will not see the "echo test" when sharing audio for the first time in the session. If the user stops sharing, next time they try to share audio the echo test window will be displayed, allowing for configuration changes to be made prior to sharing audio again | `false` |
11351137
| `userdata-bbb_override_default_locale=`    | (Introduced in BigBlueButton 2.3) If set to `de`, the user's browser preference will be ignored - the client will be shown in 'de' (i.e. German) regardless of the otherwise preferred locale 'en' (or other)                                                             | `null`       |
11361138

11371139
### Branding parameters
@@ -1155,7 +1157,8 @@ Useful tools for development:
11551157
| `userdata-bbb_enable_screen_sharing=` | If set to `false`, the client will display the screen sharing button if they are the current presenter | `true` |
11561158
| `userdata-bbb_enable_video=` | If set to `false`, the client will display the webcam sharing button (in effect disabling/enabling webcams) | `true` |
11571159
| `userdata-bbb_record_video=` | If set to `false`, the user won't have her/his video stream recorded | `true` |
1158-
| `userdata-bbb_skip_video_preview=` | If set to `true`, the client will not see a preview of their webcam before sharing it | `false` |
1160+
| `userdata-bbb_skip_video_preview=` | If set to `true`, the user will not see a preview of their webcam before sharing it | `false` |
1161+
| `userdata-bbb_skip_video_preview_on_first_join=` | (Introduced in BigBlueButton 2.3) If set to `true`, the user will not see a preview of their webcam before sharing it when sharing for the first time in the session. If the user stops sharing, next time they try to share webcam the video preview will be displayed, allowing for configuration changes to be made prior to sharing | `false` |
11591162
| `userdata-bbb_mirror_own_webcam=` | If set to `true`, the client will see a mirrored version of their webcam. Doesn't affect the incoming video stream for other users. | `false` |
11601163

11611164
### Presentation parameters

_posts/2019-02-14-dev.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Install Meteor.js.
255255
$ curl https://install.meteor.com/ | sh
256256
```
257257

258-
The HTML5 client in BigBlueButton 2.2 depends on Meteor version 1.8.x. Navigate to `bigbluebutton-html5/` and set the appropriate version of Meteor
258+
The HTML5 client in BigBlueButton 2.2 depends on Meteor version 1.8.x. Navigate to `bigbluebutton-html5/` and set the appropriate version of Meteor. Note that 2.3-dev needs version 1.10.2.
259259

260260
```
261261
meteor update --allow-superuser --release 1.8
@@ -365,7 +365,7 @@ vi ~/.sbt/1.0/global.sbt
365365
Add the following into it
366366

367367
```scala
368-
resolvers += "Artima Maven Repository" at "http://repo.artima.com/releases"
368+
resolvers += "Artima Maven Repository" at "https://repo.artima.com/releases"
369369
updateOptions := updateOptions.value.withCachedResolution(true)
370370
```
371371

0 commit comments

Comments
 (0)