Skip to content

Latest commit

 

History

History
38 lines (35 loc) · 759 Bytes

testing.md

File metadata and controls

38 lines (35 loc) · 759 Bytes

Testing

Automated

taskctl docker:tests

or

composer run-script docker:tests

Manual

To run tests:

  1. Start containers:
docker-compose up -d
  1. Create tests database:
docker-compose exec db mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS \`yii2-starter-kit-test\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"
  1. Build needed files
docker-compose exec app ./vendor/bin/codecept build
  1. Setup application:
docker-compose exec app php tests/bin/yii app/setup --interactive=0
  1. Start web server for acceptance tests (do not close bash session):
docker-compose exec app php -S localhost:8080
  1. Run tests in separate window:
docker-compose exec app vendor/bin/codecept run