test_report_parser

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

test report parser

test_report_parser #


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:
copied to clipboard
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');
}
}
}
copied to clipboard
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
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.