Skip to content

Instantly share code, notes, and snippets.

@maks
Created March 18, 2021 04:11
Show Gist options
  • Save maks/60dec37e0060d39115f0e650f6294073 to your computer and use it in GitHub Desktop.
Save maks/60dec37e0060d39115f0e650f6294073 to your computer and use it in GitHub Desktop.
shell script to generate and display test coverage report for a Flutter project
#!/bin/sh
flutter test --coverage ./lib
pub global run clean_coverage clean --exclusions 'lib/**/*.freezed.dart' coverage/lcov.info
genhtml -o coverage coverage/lcov.info
xdg-open coverage/index-sort-l.html &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment