パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.0

full_coverage

カバレッジテストツールがすべてのDartファイルを確認できるようにするパッケージスクリプト。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
1.2万
いいね数
24
Pub ポイント
155

パッケージをインストール

flutter pub add full_coverage

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

full_coverage パッケージは、Flutter プロジェクト内のすべての Dart ファイルを検出および分析できるようにするスクリプトツールです。テストランナーがソースファイルを発見する方法によって、特定のファイルがカバレッジレポートから除外されるという一般的な問題に対処します。このパッケージを統合することで、開発者はコードベース全体でより正確なコードカバレッジメトリクスを得ることができ、テストの信頼性が向上します。Android、iOS、macOS、Windows、Linux を含む複数のプラットフォームをサポートしています。

用途

  • CI/CDパイプラインにおける完全なコードカバレッジの確保
  • テストレポートの正確性の向上
  • 特定のファイルに対するカバレッジが欠落している原因のデバッグ
  • 包括的なテストワークフローをサポートする
  • カバレッジ分析ツールとの統合

主な機能

  • カバレッジスキャンですべてのDartファイルを自動的に含む
  • Flutter pub add を通じた簡単な統合
  • クロスプラットフォーム互換性
  • テストされていないコードの可視性を向上させる
  • 既存のテストスイートとシームレスに連携します

適している対象

  • 高いテストカバレッジに注力するFlutterチーム
  • 信頼できるカバレッジデータを必要とするCI/CD環境
  • 開発者がカバレッジのギャップをトラブルシューティングしています
  • `coverage` や `dart test --coverage` のようなカバレッジツールを使用するプロジェクト
  • テスト基準の遵守を目指すチーム

注意事項

  • テストスクリプトでの適切な設定が必要です
  • カスタムファイル検出が使用されている場合、調整が必要になる可能性があります
  • 単体のテストツールではなく、補足です
  • 構造化されたテスト手法と併用するのが最適です
  • テストを生成しない。カバレッジの可視性のみ向上

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

full_coverage

Coverage tools like codecov only see the files that were actually triggered by tests. This means that a coverage of 100% can easily be a lie, e.g. you can just write a dummy test that does not import any files and a coverage tool will ignore all the code base.

Luckily, this package resolves this problem.

How it works

The full_coverage package harvests the power of Bash to find all files in specified directory, by default it is lib directory, where all Flutter files are. It then creates a dummy test file test/full_coverage_test.dart that imports all the Dart files that were found and has an empty void main() {} function so that it actually starts.

Install

Use this command:

dart pub global activate full_coverage

Execute

Use the command:

dart pub global run full_coverage

Or add the cache-system to your PATH environment variable for run directly. Check documentation for more;

full_coverage

Other commands

-i, --ignore       Ignore files. ex (*_widget.dart,*_page.dart).
-h, --[no-]help    usage doc.

For more details Telegram Group Flutterando.

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト