Skip to content
pubscout

junitreport

2.0.2, released 5 years ago by an unverified publisher

Converts dart test JSON output to JUnit XML reports

WASM-ready
$ flutter pub add junitreport
Source repository

What it does

This package reads the JSON or machine output from dart or flutter test runs and produces JUnit‑style XML files. The XML can be consumed by CI tools such as Jenkins.

AI-written summary of version 2.0.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need JUnit XML reports for CI pipelines
  • You are running dart or flutter tests and want to integrate with tools that consume JUnit format
  • You prefer a simple command‑line tool over writing custom parsing code

Skip it when

  • You are not using CI or JUnit reports
  • You need a Dart API to generate reports programmatically

Strengths

  • Easy to install via dart pub global activate
  • Supports both dart test JSON and flutter test machine output
  • Handles control characters and pretty‑prints XML
  • Compatible with null‑safe Dart 2.14+

Weaknesses

  • Only a command‑line tool, no Dart API
  • Requires global activation which may conflict with path settings
  • Limited to JUnit XML format

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
4

Run `dart pub global activate junitreport` and ensure `<dart-cache>/bin` is on your PATH.

```bash
dart test simple_test.dart --reporter json | tojunit
```

Works with

Packages commonly used together with junitreport: ones it builds on, ones built on it, and its own family.