Skip to content

Latest commit

 

History

History
35 lines (31 loc) · 724 Bytes

testing.md

File metadata and controls

35 lines (31 loc) · 724 Bytes

Testing

Automated

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