From 5c9bbe2244941664378df8b4eb2be529bb8be843 Mon Sep 17 00:00:00 2001 From: domohuhn <46851472+domohuhn@users.noreply.github.com> Date: Sun, 24 Mar 2024 17:48:30 +0100 Subject: [PATCH] Lines marked as covered will be displayed in the html report --- CHANGELOG.md | 4 + doc/output/example/source.dart.html | 64 +++++++------ doc/output/example/source2.dart.html | 114 +++++++++++++----------- doc/output/example/source3.dart.html | 18 +++- doc/output/mutation-test-report.html | 26 ++++-- example/lcov.info | 53 +++++++++++ lib/src/configuration/coverage.dart | 31 ++++++- lib/src/mutation_test.dart | 2 +- lib/src/reports/create_report.dart | 10 ++- lib/src/reports/html_report.dart | 46 ++++++++-- lib/src/version.dart | 2 +- pubspec.yaml | 2 +- test/core/system_interactions_test.dart | 2 +- test/reports/create_report_test.dart | 4 +- test/reports/report_data_test.dart | 4 +- 15 files changed, 273 insertions(+), 109 deletions(-) create mode 100644 example/lcov.info diff --git a/CHANGELOG.md b/CHANGELOG.md index a6d4ba9..412475a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.0 + - Added new builtin rules that remove lines of code (void function calls and contents of arrays) + - Coverage information is provided in the html report: line numbers of instrumented lines are displayed in red and executed lines are displayed in green + ## 1.6.0 - Added the option to exclude lines not covered by tests. You can pass a file with coverage information in the lcov format via the command line flag "--coverage". diff --git a/doc/output/example/source.dart.html b/doc/output/example/source.dart.html index ea865b9..1527b8d 100644 --- a/doc/output/example/source.dart.html +++ b/doc/output/example/source.dart.html @@ -17,6 +17,13 @@ background-color: #DAE7FE; } +.covered { + background-color: #9EFF83; +} +.instrumented { + background-color: #FF8983; +} + .hit:hover { color: white; background-color: #6688D4; @@ -308,6 +315,12 @@ .hit { background-color: #26334F; } + .covered { + background-color: #0A3302; + } + .instrumented { + background-color: #391D1D; + } .addedLine { background-color: rgb(37, 83, 37); } @@ -320,7 +333,6 @@ a:link, a:visited { color: #58a6ff; } - .match .tooltip { background-color: black; color: #fff; @@ -348,7 +360,7 @@