You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 22, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: _posts/2017-07-20-html5-tests.md
+34-58Lines changed: 34 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,97 +5,73 @@ category: labs
5
5
date: 2017-07-20 23:37:51
6
6
---
7
7
8
-
#Acceptance Testing in HTML Client. Getting Started
8
+
## BigBlueButton Puppeteer Tests
9
9
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.
11
11
12
-
## Run Selenium Server
12
+
## Get BBB URL and Secret and configure .env file
13
13
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.
15
15
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.
17
17
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
23
19
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
25
24
26
-
### How to install Chrome:
25
+
These instructions assume you have the BigBlueButton repository cloned into a directory named `bigbluebutton`.
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.
34
28
35
-
### How to install Firefox:
29
+
To run individual tests, you can also optionally install Jest globally with `sudo npm install jest -g`.
36
30
37
31
```bash
38
-
$ sudo apt-get install firefox
32
+
$ cd tests/puppeteer
33
+
$ npm install
39
34
```
40
35
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)
42
37
43
-
In order to run headless browser, we will use Xvfb display server:
38
+
To run all the tests at once, run `npm test`.
44
39
45
-
```bash
46
-
$ sudo apt-get install xvfb
47
-
```
40
+
## Running a single test with an existing BigBlueButton server (Specific test)
48
41
49
-
At this point, you can run the Selenium server (from under `bigbluebutton/bigbluebutton-html5`):
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`.
56
49
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.
60
51
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
62
53
63
-
##Run the test specs
54
+
### Debugging
64
55
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.
66
57
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:
69
59
70
-
```bash
71
-
$ sudo apt-get install nodejs-legacy
72
60
```
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
79
63
```
80
64
81
-
### Test suites
65
+
### Getting Metrics
82
66
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:
To run a single test suite, you need to pass its name to the npm script:
70
+
### Getting Evidences
86
71
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`.
96
73
97
74
## Visual Regression
98
75
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__`.
100
77
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`.
@@ -949,7 +950,7 @@ Kurento uses the range 24577 - 32768, which is defined in `/etc/kurento/modules/
949
950
950
951
### Apply custom settings for TURN server
951
952
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.
953
954
954
955
```bash
955
956
echo" - Update TURN server configuration turn-stun-servers.xml"
@@ -1131,7 +1132,8 @@ Useful tools for development:
1131
1132
| `userdata-bbb_client_title=` | Specifies a string to set as the HTML5 client title | BigBlueButton |
1132
1133
| `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` |
1133
1134
| `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` |
1135
1137
| `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` |
1136
1138
1137
1139
### Branding parameters
@@ -1155,7 +1157,8 @@ Useful tools for development:
1155
1157
| `userdata-bbb_enable_screen_sharing=` | If set to `false`, the client will display the screen sharing button if they are the current presenter | `true` |
1156
1158
| `userdata-bbb_enable_video=` | If set to `false`, the client will display the webcam sharing button (in effect disabling/enabling webcams) | `true` |
1157
1159
| `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` |
1159
1162
| `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` |
Copy file name to clipboardExpand all lines: _posts/2019-02-14-dev.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -255,7 +255,7 @@ Install Meteor.js.
255
255
$ curl https://install.meteor.com/ | sh
256
256
```
257
257
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.
259
259
260
260
```
261
261
meteor update --allow-superuser --release 1.8
@@ -365,7 +365,7 @@ vi ~/.sbt/1.0/global.sbt
365
365
Add the following into it
366
366
367
367
```scala
368
-
resolvers +="Artima Maven Repository" at "http://repo.artima.com/releases"
368
+
resolvers +="Artima Maven Repository" at "https://repo.artima.com/releases"
0 commit comments