You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
roundcubemail/tests/Browser
Aleksander Machniak 31b33c0f39 Don't require config.inc.php when only config-<env>.inc.php exists 5 years ago
..
Addressbook Rewrite Selenium tests with use of laravel/dusk 5 years ago
Mail Rewrite Selenium tests with use of laravel/dusk 5 years ago
Settings Add more in-browser tests 5 years ago
data Rewrite Selenium tests with use of laravel/dusk 5 years ago
DuskTestCase.php Travis: Fix in-browser tests setup 5 years ago
Login.php Add more in-browser tests 5 years ago
Logout.php Rewrite Selenium tests with use of laravel/dusk 5 years ago
README.md Rewrite Selenium tests with use of laravel/dusk 5 years ago
bootstrap.php Don't require config.inc.php when only config-<env>.inc.php exists 5 years ago
install.php Rewrite Selenium tests with use of laravel/dusk 5 years ago
phpunit.xml Add more in-browser tests 5 years ago

README.md

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 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]`
  1. 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:

  // 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.

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