0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Docker+Laravel+Codeception

Posted at

LaravelでCodeceptionを使用した時の記録

Codeceptionの準備

下のコマンドでインストール

composer require codeception/codeception --dev

下のコマンドでテストに必要なファイルを作成

composer exec codecept bootstrap

seleniumサーバー用意

Acceptionテストに使用するseleniumサーバーを用意する
docker-compose.ymlに下の4行を追加する

    selenium:
...
      depends_on:
        - nginx
      links:
        - nginx:localhost

サーバー起動

docker-compose up -d selenium

その他の準備

envファイルのコピー

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

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?