Skip to content

Commit

Permalink
Add helper to generate coverage report from CLI and IDE
Browse files Browse the repository at this point in the history
  • Loading branch information
yeradis committed Oct 15, 2017
1 parent fd6cd20 commit caeab80
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions coverage.sh
@@ -0,0 +1,9 @@
#!/bin/bash

pub get
pub global activate coverage
dart --pause-isolates-on-exit --enable-vm-service=8111 test/test_all.dart & sleep 5
pub global run coverage:collect_coverage --port=8111 -o coverage.json --resume-isolates
pub global run coverage:format_coverage --packages=.packages -i coverage.json -o coverage.lcov --lcov --report-on=lib/
genhtml coverage.lcov --title "coverage report" --output-directory coverage_report
open coverage_report/index.html

0 comments on commit caeab80

Please sign in to comment.