A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 引数 | 概要 | ||||||||||||||||||||||||
2 | UnitTest | UnitTest という名前のクラスで定義されている テストを実行します。このクラスは、UnitTest.php という名前のファイルの中に定義されているものとします。 UnitTest は、PHPUnit\Framework\TestCase を継承したクラスであるか、あるいは PHPUnit\Framework\Test オブジェクト、例えば PHPUnit\Framework\TestSuite のインスタンスを返す public static suite() というメソッドを保持するクラスでなければなりません。 | ||||||||||||||||||||||||
3 | UnitTest UnitTest.php | UnitTest という名前のクラスで定義されているテストを実行します。 このクラスは、指定したファイルの中で定義されているものとします。 | ||||||||||||||||||||||||
4 | ||||||||||||||||||||||||||
5 | オプション | 概要 | ||||||||||||||||||||||||
6 | 【コードカバレッジ】 | |||||||||||||||||||||||||
7 | --coverage-clover <file> | テスト結果から XML 形式のログファイルを作成し、 コードカバレッジ情報もそこに含めます。 | ||||||||||||||||||||||||
8 | --coverage-cobertura <file> | Generate code coverage report in Cobertura XML format | ||||||||||||||||||||||||
9 | --coverage-crap4j <file> | コードカバレッジレポートを Crap4j 形式で作成します。 | ||||||||||||||||||||||||
10 | --coverage-html <dir> | コードカバレッジレポートを HTML 形式で作成します。 | ||||||||||||||||||||||||
11 | --coverage-php <file> | シリアライズした PHP_CodeCoverage オブジェクトを生成し、 コードカバレッジ情報もそこに含めます。 | ||||||||||||||||||||||||
12 | --coverage-text=<file> | テストを実行したときに、ログファイルあるいはコマンドライン出力で 可読形式のコードカバレッジ情報を生成します。 [default: standard output] | ||||||||||||||||||||||||
13 | --coverage-xml <dir> | Generate code coverage report in PHPUnit XML format. | ||||||||||||||||||||||||
14 | --coverage-cache <dir> | Cache static analysis results | ||||||||||||||||||||||||
15 | --warm-coverage-cache | Warm static analysis cache | ||||||||||||||||||||||||
16 | --coverage-filter <dir> | Include <dir> in code coverage analysis | ||||||||||||||||||||||||
17 | --path-coverage | Perform path coverage analysis | ||||||||||||||||||||||||
18 | --disable-coverage-ignore | Disable annotations for ignoring code coverage | ||||||||||||||||||||||||
19 | --no-coverage | Ignore code coverage configuration | ||||||||||||||||||||||||
20 | 【ロギング】 | |||||||||||||||||||||||||
21 | --log-junit <file> | JUnit XML フォーマットを使用して、テストの実行結果のログを作成します。 | ||||||||||||||||||||||||
22 | --log-teamcity <file> | Log test execution in TeamCity format to file | ||||||||||||||||||||||||
23 | --testdox-html <file> | 実行したテストについて、HTML 形式のドキュメントを生成します ( TestDox を参照ください)。 | ||||||||||||||||||||||||
24 | --testdox-text <file> | 実行したテストについて、プレーンテキスト形式のドキュメントを生成します ( TestDox を参照ください)。 | ||||||||||||||||||||||||
25 | --testdox-xml <file> | Write agile documentation in XML format to file | ||||||||||||||||||||||||
26 | --reverse-list | Print defects in reverse order | ||||||||||||||||||||||||
27 | --no-logging | Ignore logging configuration | ||||||||||||||||||||||||
28 | 【テスト対象の選択】 | |||||||||||||||||||||||||
29 | --list-suites | List available test suites | ||||||||||||||||||||||||
30 | --testsuite <name> | 指定したパターンにマッチする名前のテストスイートのみを実行します。 | ||||||||||||||||||||||||
31 | --list-groups | 使用可能なテストグループの一覧を表示します。 | ||||||||||||||||||||||||
32 | --group <name> | 指定したグループのテストのみを実行します。 あるテストを特定のグループに所属させるには、 @group アノテーションを使用します。 @author アノテーションおよび @ticket アノテーションは @group のエイリアスで、 それぞれテストの作者およびチケットIDに基づいてテストをフィルタリングします | ||||||||||||||||||||||||
33 | --exclude-group <name> | 指定したグループをテストの対象外とします。 あるテストを特定のグループに所属させるには、 @group アノテーションを使用します。 | ||||||||||||||||||||||||
34 | --covers <name> | Only runs tests annotated with "@covers <name>" | ||||||||||||||||||||||||
35 | --uses <name> | Only runs tests annotated with "@uses <name>" | ||||||||||||||||||||||||
36 | --list-tests | List available tests | ||||||||||||||||||||||||
37 | --list-tests-xml <file> | List available tests in XML format | ||||||||||||||||||||||||
38 | --filter <pattern> | 指定した正規表現パターンにマッチする名前のテストのみを実行します。 パターンがデリミタで囲まれていない場合は、PHPUnit はパターンをデリミタ / で囲みます。 --filter 'TestNamespace\\TestCaseClass::testMethod' --filter 'TestNamespace\\TestCaseClass' --filter TestNamespace --filter TestCaseClase --filter testMethod --filter '/::testMethod .*"my named data"/' --filter '/::testMethod .*#5$/' --filter '/::testMethod .*#(5|6|7)$/' --filter 'testMethod#2' --filter 'testMethod#2-4' --filter '#2' --filter '#2-4' --filter 'testMethod@my named data' --filter 'testMethod@my.*data' --filter '@my named data' --filter '@my.*data' | ||||||||||||||||||||||||
39 | --test-suffix <suffixes> | 指定したサフィックスのテストファイルだけを探します。Default: Test.php,.phpt | ||||||||||||||||||||||||
40 | 【テストの実行】 | |||||||||||||||||||||||||
41 | --dont-report-useless-tests | 何もテストをしないテストについて報告しません。 | ||||||||||||||||||||||||
42 | --strict-coverage | 意図せずカバーしているコードについて厳格にチェックします。 | ||||||||||||||||||||||||
43 | --strict-global-state | グローバルな状態の変更について厳格にチェックします。 | ||||||||||||||||||||||||
44 | --disallow-test-output | 実行中に何かを出力するテストについて厳格にチェックします。 | ||||||||||||||||||||||||
45 | --disallow-resource-usage | Be strict about resource usage during small tests | ||||||||||||||||||||||||
46 | --enforce-time-limit | テストのサイズに応じて、制限時間を設定します。 | ||||||||||||||||||||||||
47 | --default-time-limit <sec> | Timeout in seconds for tests without @small, @medium or @large | ||||||||||||||||||||||||
48 | --disallow-todo-tests | docblock に @todo アノテーションが指定されているテストを実行しません。 | ||||||||||||||||||||||||
49 | --process-isolation | 各テストを個別の PHP プロセスで実行します。 | ||||||||||||||||||||||||
50 | --globals-backup | $GLOBALS のバックアップ・リストアを行います。 | ||||||||||||||||||||||||
51 | --static-backup | ユーザ定義クラスの静的属性のバックアップ・リストアを行います。 | ||||||||||||||||||||||||
52 | --colors <flag> | 出力に色を使用します("never", "auto" or "always") | ||||||||||||||||||||||||
53 | --columns <n> | Number of columns to use for progress output | ||||||||||||||||||||||||
54 | --columns max | Use maximum number of columns for progress output | ||||||||||||||||||||||||
55 | --stderr | 出力先を STDOUT ではなく STDERR にします。 | ||||||||||||||||||||||||
56 | --stop-on-defect | Stop execution upon first not-passed test | ||||||||||||||||||||||||
57 | --stop-on-error | 最初にエラーが発生した時点で実行を停止します。 | ||||||||||||||||||||||||
58 | --stop-on-failure | 最初にエラーあるいは失敗が発生した時点で実行を停止します。 | ||||||||||||||||||||||||
59 | --stop-on-warning | Stop execution upon first warning | ||||||||||||||||||||||||
60 | --stop-on-risky | 最初に危険なテストがあらわれた時点で実行を停止します。 | ||||||||||||||||||||||||
61 | --stop-on-skipped | 最初にテストのスキップが発生した時点で実行を停止します。 | ||||||||||||||||||||||||
62 | --stop-on-incomplete | 最初に不完全なテストがあらわれた時点で実行を停止します。 | ||||||||||||||||||||||||
63 | --fail-on-incomplete | Treat incomplete tests as failures | ||||||||||||||||||||||||
64 | --fail-on-risky | Treat risky tests as failures | ||||||||||||||||||||||||
65 | --fail-on-skipped | Treat skipped tests as failures | ||||||||||||||||||||||||
66 | --fail-on-warning | Treat tests with warnings as failures | ||||||||||||||||||||||||
67 | -v|--verbose | より詳細な情報を出力します。例えば、 未完成のテストや省略したテストの名前が表示されます。 | ||||||||||||||||||||||||
68 | --debug | テスト名などのデバッグ情報を、テストの実行開始時に出力します。 | ||||||||||||||||||||||||
69 | --repeat <times> | 指定された回数だけ、繰り返しテストを実行します。 | ||||||||||||||||||||||||
70 | --teamcity | Report test execution progress in TeamCity format | ||||||||||||||||||||||||
71 | --testdox | テストの進行状況を、アジャイルな文書として報告します。 | ||||||||||||||||||||||||
72 | --testdox-group | Only include tests from the specified group(s) | ||||||||||||||||||||||||
73 | --testdox-exclude-group | Exclude tests from the specified group(s) | ||||||||||||||||||||||||
74 | --no-interaction | Disable TestDox progress animation | ||||||||||||||||||||||||
75 | --printer <printer> | 結果を表示するために使うプリンタクラスを指定します。このプリンタクラスは PHPUnit\Util\Printer を継承し、かつ PHPUnit\Framework\TestListener インターフェイスを実装したものでなければなりません。 | ||||||||||||||||||||||||
76 | --order-by <order> | Run tests in order: default|defects|duration|no-depends|random|reverse|size | ||||||||||||||||||||||||
77 | --random-order-seed <N> | Use a specific random seed <N> for random order | ||||||||||||||||||||||||
78 | --cache-result | Write test results to cache file | ||||||||||||||||||||||||
79 | --do-not-cache-result | Do not write test results to cache file | ||||||||||||||||||||||||
80 | ||||||||||||||||||||||||||
81 | ||||||||||||||||||||||||||
82 | ||||||||||||||||||||||||||
83 | ||||||||||||||||||||||||||
84 | ||||||||||||||||||||||||||
85 | ||||||||||||||||||||||||||
86 | ||||||||||||||||||||||||||
87 | ||||||||||||||||||||||||||
88 | ||||||||||||||||||||||||||
89 | ||||||||||||||||||||||||||
90 | ||||||||||||||||||||||||||
91 | ||||||||||||||||||||||||||
92 | ||||||||||||||||||||||||||
93 | ||||||||||||||||||||||||||
94 | ||||||||||||||||||||||||||
95 | ||||||||||||||||||||||||||
96 | ||||||||||||||||||||||||||
97 | ||||||||||||||||||||||||||
98 | ||||||||||||||||||||||||||
99 | ||||||||||||||||||||||||||
100 |