teamneusta / codeception-docker-chrome
Codeception extension to start automatically an docker chrome instance
Installs: 19 934
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: >=7.0.0
- codeception/codeception: ^2.2
- monolog/monolog: *
- symfony/process: *
Requires (Dev)
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^5.7
This package is not auto-updated.
Last update: 2020-08-04 08:46:56 UTC
README
Docker Selenium Chrome for Codeception Extension
What's Docker Selenium Chrome for Codeception?
Docker Selenium Chrome for Codeception is a extension to integrate automatic selenium with chrome in your codeception tests.
Minimum Requirements
- Unix System
- Codeception 2.2.0
- PHP 7.0 >
- docker 1.12.0
- docker-compose 1.11.0
Installing
Simply add the following dependency to your project’s composer.json file:
"require": { "teamneusta/codeception-docker-chrome": "^1.0" }
Finally you can use Docker Selenium Chrome for Codeception in your codeception.yml
extensions: enabled: - Codeception\Extension\DockerChrome config: Codeception\Extension\DockerChrome: suites: ['acceptance'] debug: true extra_hosts: ['foo.loc:192.168.0.123']
Available options
Basic
path: {path}
- Full path to the docker-compose binary.
- Default:
/usr/local/bin/docker-compose
port: {port}
- Webdriver port to start chrome with.
- Default:
4444
debug: {true|false}
- Display debug output
- Default:
false
extra_hosts: ['domain:ip', 'domain:ip']
- set extra hosts for docker container to connect to local environment over network (not 127.0.0.1)
- Default:
null
suites: {array|string}
- If omitted, Chrome is started for all suites.
- Specify an array of suites or a single suite name.
- If you're using an environment (
--env
), Codeception appends the environment name to the suite name in brackets. You need to include each suite/environment combination separately in the array.suites: ['acceptance', 'acceptance (staging)', 'acceptance (prod)']
- If you're using an environment (
Proxy Support
http_proxy: {address:port}
- Sets the http proxy server.
https_proxy: {address:port}
- Sets the https proxy server.
no_proxy: address1.local,adress2.de
- Sets the no proxy for specific domains.
Registry Support
private-registry: {address:port}
Suite configuration example
this configuration override the codeception.yml configuration
class_name: AcceptanceTester modules: enabled: - WebDriver: port: 5555 browser: chrome url: https://www.example.de/ capabilities: proxyType: 'manual' httpProxy: 'http-proxy.example.de:3128' sslProxy: 'https-proxy.example.de:3128' noProxy: 'address1.local,adress2.de'
Usage
Once installed and enabled, running your tests with php codecept run
will
automatically start the chrome and wait for it to be accessible before
proceeding with the tests.
be patient on first start. It could take a while
Docker server now accessible
Once the tests are complete, Docker Server will be shut down.
Stopping Docker Server