Welcome to mirror list, hosted at ThFree Co, Russian Federation.

README.md « Browser « tests - github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3c7b2c5ef0a40444e18021784073658c74f8d506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
In-Browser Tests
================

The idea of these testing suite is to make it as simple as possible to execute
the tests. So, you don't have to run any additional services, nor download
and install anything manually.

The tests are using [Laravel Dusk][laravel-dusk] and Chrome WebDriver.
PHP server is used to serve Roundcube instance on tests run.


INSTALLATION
------------

Installation:

1. Add `"laravel/dusk": "~5.7.0"` to your composer.json file and run `composer update`.
2. Install Chrome WebDriver for the version of Chrome/Chromium in your system. Yes,
   you have to have Chrome/Chromium installed.
```
php tests/Browser/install.php [version]`
```
3. Configure the test account and Roundcube instance.

Create a config file named `config-test.inc.php` in the Roundcube config dir.
That file should provide specific `db_dsnw` and
`default_host` values for testing purposes as well as the credentials of a
valid IMAP user account used for running the tests with.

Add these config options used by the Browser tests:

```php
  // Unit tests settings
  $config['tests_username'] = 'roundcube.test@example.org';
  $config['tests_password'] = '<test-account-password>';
```

WARNING
-------
Please note that the configured IMAP account as well as the Roundcube database
configred in `db_dsnw` will be wiped and filled with test data in every test
run. Under no circumstances you should use credentials of a production database
or email account!

Please, keep the file as simple as possible, i.e. containing only database
and imap/smtp settings needed for the test user authentication. We would
want to test default configuration. Especially only Elastic skin is supported.

NOTE: See `.ci` directory for sample config and scripts we use for in-browser
tests on Travis.


EXECUTING THE TESTS
-------------------

To run the test suite call `phpunit` from the tests/Browser directory:

```
  cd <roundcube-dir>/tests/Browser
  phpunit                          # or ../../vendor/bin/phpunit
```

[laravel-dusk]: https://github.com/laravel/dusk