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

パッケージ詳細v2.0.2

junitreport

dart テスト実行から JUnit XML レポートを生成します。dart または flutter テストの出力を JUnit 形式の XML に変換します

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
29.7万
いいね数
36
Pub ポイント
150

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

flutter pub add junitreport

パッケージ概要

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

junitreport パッケージは、Dart や Flutter のテスト実行から JUnit XML 形式のテストレポートを生成します。デフォルトのテスト出力を、CI/CD システムやテストダッシュボードと互換性のある標準的な XML 構造に変換します。これにより、Jenkins や GitHub Actions など、JUnit形式のレポートを期待するツールとのシームレスな統合が可能になります。このパッケージは Android、iOS、Web、macOS、Windows、Linux といったすべての主要プラットフォームをサポートしており、クロスプラットフォームのテスト自動化ワークフローに最適です。

用途

  • CI/CD パイプラインレポート
  • テスト結果をJenkinsに統合する
  • GitHub Actions でのテスト結果の可視化
  • 自動テスト結果の集約
  • クロスプラットフォームテストレポート

主な機能

  • Dart テスト出力を JUnit XML に変換します
  • すべての Flutter プラットフォームをサポートしています
  • CIシステムへの簡単な統合
  • 軽量でレポート作成に特化
  • 構造化された機械読み取り可能な出力を生成します

適している対象

  • CI/CD パイプラインを使用するチーム
  • テスト自動化エンジニア
  • 標準化されたテストレポートを必要とするプロジェクト
  • Jenkins や GitHub Actions と統合する開発者
  • クロスプラットフォームのFlutterアプリケーション

注意事項

  • テストランナーで手動設定が必要です
  • テストを実行しない—出力のみ形式設定する
  • 複雑なテストスイートには追加の設定が必要になる場合があります
  • リアルタイムテストデバッグ用ではありません
  • テスト実行後の出力は静的です

元の README

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

JUnit Report

Introduction

This application can be used to convert the results of dart tests to JUnit xml reports. These XML reports can then be used by other tools like Jenkins CI.

By running

dart test simple_test.dart --reporter json > example.jsonl
dart pub global run junitreport:tojunit --input example.jsonl --output TEST-report.xml

and the contents of simple_test.dart is

import 'package:test/test.dart';

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

this program will generate 'TEST-report.xml' containing

<testsuites>
  <testsuite errors="0" failures="0" tests="1" skipped="0" name="simple" timestamp="2016-05-22T21:20:08">
    <properties>
      <property name="platform" value="vm" />
    </properties>
    <testcase classname="simple" name="simple" time="0.026" />
  </testsuite>
</testsuites>

For transforming Flutter tests reports, instead of passing --reporter json, you need to use --machine.

Installation

Run dart pub global activate junitreport to download the program and make a launch script available: <dart-cache>/bin/tojunit.

If the <dart-cache>/bin directory is not on your path, you will get a warning, including tips on how to fix it.

Once the directory is on your path, tojunit --help should be able to run and produce the program help.

Then you can also use the example above much simpler:

dart test simple_test.dart --reporter json | tojunit

And to run all tests for Flutter:

flutter test --machine | tojunit

License and contributors

カテゴリー

依存関係

依存関係一覧 4 件

ソースリポジトリ

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