Skip to content

Instantly share code, notes, and snippets.

@tasaquino
Created May 21, 2023 10:47
Show Gist options
  • Save tasaquino/b8267d27fc2e71c9ca2890bef524d138 to your computer and use it in GitHub Desktop.
Save tasaquino/b8267d27fc2e71c9ca2890bef524d138 to your computer and use it in GitHub Desktop.
Script to run flutter tests with code coverage and generate html report from lcov file
# allow the script to be executed chmod +x ./flutter_coverage_script.sh
echo '========== Executing tests...'
cd flutter test --coverage # `coverage/lcov.info` file
echo '========== Converting cov.info into html...'
genhtml coverage/lcov.info -o coverage/html # converts coverage report in html
echo '========== Opening html coverage report...'
open coverage/html/index.html
echo '========== Report is complete :)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment