db_test_coverage

Creator: coderz1093

Last updated:

0 purchases

db_test_coverage Image
db_test_coverage Images

Languages

Categories

Add to Cart

Description:

db test coverage

db_test_coverage #
test coverage tool for dart, flutter.
Overview #
A command-line tool that run tests with coverage on a project.
It’s help you automate verification that your project code coverage meet your expected standard.
license.

Installation #
db_test_coverage is dependent on lcov being installed.
So first install lcov.
MacOS #
brew install lcov
copied to clipboard
Linux #
apt install lcov
copied to clipboard
After, installing lcov you can run.
pub global activate db_test_coverage
copied to clipboard


Usage #
test_coverage --package-name example <local project directory>
copied to clipboard
Options:
--project-type Specify the type of project the script is run on

[flutter] (default) Test coverage for flutter project

--package-name (mandatory) Specify the package name of this project
--src-dir Specify the src directory of this project
(defaults to "lib/src")
--test-dir Specify the test directory of this project
(defaults to "test")
--coverage-dir-path Specify the test coverage directory of this project
(defaults to ".test_coverage")
--coverage-exclude=<lib/**.g.dart> Specify the file pattern from the coverage report

--min-cov Specify the minimum coverage percentage of code coverage allowed, from 0.0 to 1.0
(defaults to "0.0")
--[no-]help Print help message
copied to clipboard
Run db_test_coverage and check if code coverage is at least 70% #
test_coverage --package-name example --min-cov 0.7 <local project directory>
copied to clipboard
Run db_test_coverage but removed unneeded files from the code coverage report. #
test_coverage --package-name example --coverage-exclude 'lib/src/*.g.dar', 'lib/generated_plugin_registrant.dart' <local project directory>
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.