test_report_parser 1.2.1 copy "test_report_parser: ^1.2.1" to clipboard
test_report_parser: ^1.2.1 copied to clipboard

This library contains an auto-generated Dart Model representing the events emitted by the Dart Tests JSON reporter.

test_report_parser #

Dartle CI pub package

This library contains an auto-generated Dart Model representing the events emitted by the Dart Tests JSON reporter.

It can be used to parse the Dart Test JSON report into typed Dart objects for further processing.

The model is generated by parsing the json_reporter.md page, which documents the Dart Test JSON reporter output.

Using test_report_parser #

Add test_report_parser to your pubspec dependencies:

dependencies:
  test_report_parser:

Basically, call the function parseJsonToEvent(String) for each line of output from the JSON Test Reporter:

import 'package:test_report_parser/test_report_parser.dart';

void main() {
  final event = parseJsonToEvent('{"success":true,"type":"done","time":36361}');
  print(event);

  if (event is DoneEvent) {
    if (event.success) {
      print('!!!!!! Tests were successful !!!!!!');
    } else {
      print('XXXXXX There were failures. XXXXXX');
    }
  }
}

Check test_report_parser_example.dart for a full example.

See also the generated Dart Model.

Building #

This project relies on Dartle to run the build.

If you have dartle installed, run dartle at the project root directory to generate the model locally and execute the tests.

Otherwise, run the build using standard dart tools as following:

dart pub get
dart dartle.dart generate
dart test
0
likes
150
pub points
64%
popularity

Publisher

unverified uploader

This library contains an auto-generated Dart Model representing the events emitted by the Dart Tests JSON reporter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

path

More

Packages that depend on test_report_parser