Calculate coverage of your dart scripts, format it to LCOV and send it to coveralls.io.
NOTE: as of version 0.6.0 dart-coveralls, requires a Dart 2 SDK.
This package consists of a single command line tool dart_coveralls with
the three commands calc, report, upload.
To activate the program for global use, run pub global activate dart_coveralls.
This command calculates the coverage of a given package. Use the tool like this:
dart_coveralls calc [--output, --package-root] test.dart
# or
dart_coveralls calc [--output, --packages] test.dart
--output: The output file path, if not given stdout--packages: Specifies the path to the package resolution configuration file. This option cannot be used with --package-root. Defaults to ".packages".--package-root: Specifies where to find imported libraries. This option cannot be used with --packages. Defaults to null.test.dart: The path of the test file on which coverage will be collected
This command calculates and then sends the coverage data to coveralls.io. Usage of the tool is as follows:
dart_coveralls report <options> <test file>
--help– Displays all options--token–Token for coveralls--packages: Specifies the path to the package resolution configuration file. This option cannot be used with --package-root. Defaults to ".packages".--package-root: Specifies where to find imported libraries. This option cannot be used with --packages. Defaults to null.--debugPrints debug information--retryNumber of retries (defaults to "10")--dry-runIf this flag is enabled, data won't be sent to coveralls-C, --throw-on-connectivity-errorShould this throw an exception, if the upload to coveralls fails?-E, --throw-on-errorShould this throw if an error in the dart_coveralls implementation happens?-T, --exclude-test-filesShould test files be included in the coveralls report?-p, --print-jsonPretty-print the json that will be sent to coveralls.
This command uploads a coverage report.
dart_coveralls upload <options> <directory containing coverage reports from the VM>
--help– Displays all options--token–Token for coveralls--packages: Specifies the path to the package resolution configuration file. This option cannot be used with --package-root. Defaults to ".packages".--package-root: Specifies where to find imported libraries. This option cannot be used with --packages. Defaults to null.--debugPrints debug information--retryNumber of retries (defaults to "10")--dry-runIf this flag is enabled, data won't be sent to coveralls-C, --throw-on-connectivity-errorShould this throw an exception, if the upload to coveralls fails?-E, --throw-on-errorShould this throw if an error in the dart_coveralls implementation happens?-T, --exclude-test-filesShould test files be included in the coveralls report?-p, --print-jsonPretty-print the json that will be sent to coveralls.
Help and Pull Requests are highly appreciated :)