Skip to content

Commit 0ea9ba3

Browse files
authored
Merge pull request #816 from EMResearch/issue-813
issue #813: better info if getPackagePrefixesToCover() is misconfigured
2 parents fe0fa02 + 82d7402 commit 0ea9ba3

File tree

1 file changed

+7
-1
lines changed
  • core/src/main/kotlin/org/evomaster/core

1 file changed

+7
-1
lines changed

core/src/main/kotlin/org/evomaster/core/Main.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,13 @@ class Main {
222222

223223
info("Covered targets (lines, branches, faults, etc.): ${targetsInfo.total}")
224224
info("Potential faults: ${faults.size}")
225-
info("Bytecode line coverage: $percentage% (${linesInfo.total} out of $totalLines in $units units/classes)")
225+
226+
if(totalLines == 0 || units == 0){
227+
logError("Detected $totalLines lines to cover, for a total of $units units/classes." +
228+
" Are you sure you did setup getPackagePrefixesToCover() correctly?")
229+
} else {
230+
info("Bytecode line coverage: $percentage% (${linesInfo.total} out of $totalLines in $units units/classes)")
231+
}
226232
} else {
227233
warn("Failed to retrieve SUT info")
228234
}

0 commit comments

Comments
 (0)