カテゴリー・パッケージ・リポジトリを検索

パッケージ詳細v2.0.1

testreport

このライブラリは、Dart テストの結果を処理するために使用できます。Dart テストランナーが出力する `json` 出力データを処理し、テスト結果への API を提供します。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
34.7万
いいね数
3
Pub ポイント
160

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

flutter pub add testreport

パッケージ概要

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

testreport パッケージは、Dart テストランナーによって生成された JSON 出力から Dart テスト結果を処理します。このパッケージは、テストの成功/失敗状態、実行時間、エラーなどの意味のある情報を解析・分析・抽出するための構造化 API を提供します。これは、CI/CD パイプラインにテスト結果を統合したり、レポートを作成したり、複数プラットフォーム間でのテストパフォーマンスを可視化する場合に特に役立ちます。このライブラリはすべての主要な Flutter プラットフォームをサポートしており、クロスプラットフォームのテストワークフローに最適です。

用途

  • CI/CD統合
  • テスト結果の分析
  • 自動レポート
  • クロスプラットフォームテスト
  • テストダッシュボード

主な機能

  • JSON 結果のパース
  • Platform-agnostic
  • エラーと期間の抽出
  • 構造化データ API
  • すべての Flutter プラットフォームをサポートしています

適している対象

  • CI/CD システム
  • テスト自動化チーム
  • 品質保証エンジニア
  • Flutter を使用する開発者
  • レポートツール

注意事項

  • dart テストランナーからの JSON 出力が必要です
  • テスト後の処理に限定
  • リアルタイムのテストモニタリングなし
  • テストランナーの出力形式に依存
  • テストを直接実行するためのものではありません

元の README

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

Test Report

Introduction

This library can be used to process the results of dart tests.

The goal of this library is to process the data from the json output emitted by the dart test runner and provide an API to the interpreted test results.

Purpose

By running

pub run test simple_test.dart --reporter json

and the contents of simple_test.dart is

import 'package:test/test.dart';

main() {
  test('simple', () {
    expect(true, true);
  });
}

the dart test runner will output the results of the test in json format as a stream of events:

{"protocolVersion":"0.1.0","runnerVersion":"0.12.13+1","type":"start","time":0}
{"count":1,"type":"allSuites","time":0}
{"suite":{"id":0,"platform":"vm","path":"simple_test.dart"},"type":"suite","time":0}
{"test":{"id":1,"name":"loading simple_test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null}},"type":"testStart","time":0}
{"testID":1,"result":"success","hidden":true,"type":"testDone","time":237}
{"group":{"id":2,"suiteID":0,"parentID":null,"name":null,"metadata":{"skip":false,"skipReason":null},"testCount":1},"type":"group","time":241}
{"test":{"id":3,"name":"simple","suiteID":0,"groupIDs":[2],"metadata":{"skip":false,"skipReason":null}},"type":"testStart","time":242}
{"testID":3,"result":"success","hidden":false,"type":"testDone","time":268}
{"success":true,"type":"done","time":271}

From this json output, it is not easy to see how many tests were executed, how many failed and how much time was spent in each test.

The Processor in this project takes the json events, and turns them into a Report, that is suitable for further processing.

License and contributors

カテゴリー

ソースリポジトリ

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