분류, 패키지 및 저장소 검색

패키지 상세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로 변환합니다
  • 모든 플러터 플랫폼을 지원합니다
  • CI 시스템과의 간편한 통합
  • 경량화되고 보고에 집중
  • 구조화되고 기계가 읽을 수 있는 출력을 생성합니다

적합한 대상

  • CI/CD 파이프라인을 사용하는 팀
  • 테스트 자동화 엔지니어
  • 표준화된 테스트 보고서가 필요한 프로젝트
  • Jenkins 또는 GitHub Actions와 통합하는 개발자
  • 크로스플랫폼 플러터 애플리케이션

고려 사항

  • 테스트 러너에서 수동 설정이 필요합니다
  • 테스트를 실행하지 않음—출력만 형식화함
  • 복잡한 테스트 세트를 위해 추가 구성이 필요할 수 있습니다
  • 실시간 테스트 디버깅을 위한 것이 아님
  • 테스트 실행 후 출력은 정적입니다

원본 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 개

소스 저장소

이 패키지를 사용하는 프로젝트