3
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 5 years have passed since last update.

PhpStormからDockerを使ってカバレッジを取得する

Posted at

はじめに

テストケースの確認用にカバレッジを見ておきたい事もある。

CLI Interpreterの追加

2018-08-05_22h14_53.png

phpunit.xmlの用意

テスト対象ファイルのwhitelistを設定していないとカバレッジ取得時にエラーとなるので下記のような設定ファイルを用意する。

phpunit.xml
<?xml version="1.0" encoding="UTF-8" ?>
<phpunit>
    <filter>
        <whitelist>
            <directory>./App</directory>
        </whitelist>
    </filter>
</phpunit>

テスト設定の追加

2018-08-05_22h29_39.png

テスト実行

エディタでテストケースを開いて右クリックから下記を選択

カバレッジ確認

3
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
3
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?