Record when using Codeception with Laravel
Install with the command below
composer require codeception/codeception --dev
Create the necessary files for the test with the command below
composer exec codecept bootstrap
Prepare a selenium server to use for Acception test Add the following 4 lines to docker-compose.yml
selenium:
...
depends_on:
- nginx
links:
- nginx:localhost
Server startup
docker-compose up -d selenium
Copy env file
cp .env .env.testing
/tests/functional.suite.yml
actor: FunctionalTester
modules:
enabled:
- Laravel5:
environment_file: .env.testing
- \Helper\Functional
/tests/unit.suite.yml
actor: UnitTester
modules:
enabled:
- Asserts
- Laravel5:
environment_file: .env.testing
- \Helper\Unit
/tests/acceptance.suite.yml
actor: AcceptanceTester
modules:
enabled:
- WebDriver:
url: http://localhost/
browser: chrome
host: selenium
- \Helper\Acceptance
https://codeception.com/for/laravel
Recommended Posts