We're starting to test with WebDriver and Codeception to run Selenium Server.
git clone from develop branch
git clone https://github.com/user/repo.git
To install simply require the package in the composer.json file.
Run composer in plugin directory.
composer install
First thing we need to configure /tests/acceptance.suite.yml. We need to create .env file in our plugin directory. Already shared a .env.example sample file so just copy & past source code .env.example to .env and update the configuration.
We export our database and place it into the _data directory. we rename the databse like dump.sql.
Selenium Server Local Testing
To run Selenium Server we need Java as well as Chrome or Firefox browser installed.
-
Download Selenium Standalone Server
-Example: Download and place it in local directory. -
To use Chrome, install ChromeDriver or To use Firefox, install GeckoDriver.
-Example: Download and place it in test directory. -
Launch the Selenium Server:
java -jar "/path/to/selenium-server-standalone-xxx.jar"-Example: In local directory launch java -jar "/e/selenium-server/selenium-server-standalone-3.13.0.jar"
Launch Selenium Server before executing tests.
Run The following command:
vendor/bin/codecept run acceptance