Commit afcede3b authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

Changed "" to parse new output format of Maven's JaCoCo plugin.

Maven's JaCoCo plugin version 0.8.3 newly uses a whitespace character to separate numbers and percentage sign.
Therefore, adapted regular expression.
parent cac6f3f9
# Extract line and branch coverage (in percentage) from HTML coverage reports
# which are created by Maven's jacoco plugin.
# which are created by Maven's JaCoCo plugin.
# Use top-level pom.xml to search in correct subdirectories.
# Wach out: call this script from root directory of project. E.g.
......@@ -33,15 +33,15 @@ def extract_line_and_branch_coverage(module_names):
module_to_coverage = dict()
default_coverage_file = "target/site/coverage-reports/index.html"
default_coverage_file = os.path.join("target", "coverage-reports", "index.html")
for module in module_names:
coverage_path = os.path.join(module, default_coverage_file)
with open(coverage_path, "r") as file:
coverage_report =
regex_pattern = re.compile(r"Total.*?([0-9]{1,3})%.*?([0-9]{1,3})%")
regex_pattern = re.compile(r"Total.*?([0-9]{1,3})\s?%.*?([0-9]{1,3})\s?%")
match =
if match:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment