LoginSignup
46
39

More than 3 years have passed since last update.

テストカバレッジの読み方

Posted at

以下はJestのカバレッジレポートの内容です。
各箇所がどんな内容であるかをまとめました。

-------------|----------|----------|----------|----------|-------------------|
File         |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
-------------|----------|----------|----------|----------|-------------------|
All files    |       50 |        0 |       20 |       50 |                   |
 handler.ts  |       50 |        0 |       25 |       50 |... 39,41,44,47,55 |
 slackBot.ts |       50 |      100 |        0 |       50 |            6,7,13 |
-------------|----------|----------|----------|----------|-------------------|
Test Suites: 1 failed, 1 passed, 2 total
Tests:       1 failed, 2 passed, 3 total
Snapshots:   0 total
Time:        1.952s, estimated 2s
  • File
    • テスト対象のファイル
  • Stmts
    • Statement coverage
    • プログラム内の各命令が実行されたかの網羅率(命令網羅率)
  • Branch
    • Branch coverage
    • ifやcaseなどの全ての分岐の処理が実行されたかの網羅率
  • Funcs
    • Function coverage
    • プログラム内の各関数が呼び出されたかの網羅率
  • Lines
    • ソースファイルの各実行可能行が実行されたかの網羅率
  • Uncoverd Line
    • 実行されてない行
  • Test Suites
    • テストファイルごとの結果
  • Tests
    • テストケースごとの結果
  • Snapshots
    • 取ったSnapshotの数
  • Time
    • 実行にかかった時間

参考URL

46
39
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
46
39