pajatopmr
11/08/2018, 9:38 AMpajatopmr
12/18/2018, 1:29 AMpajatopmr
01/29/2019, 12:14 PMSteven
06/13/2019, 4:43 PMJoe
06/21/2019, 5:49 PM?:
elvis operator to provide a default:
If I have code that does something like:
val x = nullableObject?.method() ?: default
JaCoCo tells me I have one of 4 branches uncovered.
If I change that to:
val nullableX = nullableObject?.method()
val x = nullableX ?: default
JaCoCo tells me all branches are covered (2 branches per line).
I'm guessing the "uncovered" branch is when nullableObject
is non-null, but method()
returns null -- is there a way to get JaCoCo to realize that branch is not possible based on method()
not being nullable? Or is there a better practice here?fada21
07/17/2019, 3:49 PMmiqbaldc
10/28/2019, 2:57 PM90% -> ci / build success rate
90% -> code coverage
under 10mins -> execution time
I came accross it, when attending a local meetup, but I’m forgot to get the presentation slide, and after a while researching the web, the result seems not relevant.Antoine Gagnon
03/09/2020, 3:22 PMJessica Barns
03/30/2020, 7:40 PMpajatopmr
07/28/2020, 10:36 AMpajatopmr
07/28/2020, 5:41 PMlateinit
was marked in yellow. Hovering revealed both cases were missed. I seem to recall not seeing this behavior in less experimental code. Two questions:
1) is Jacoco doing the right thing for your uses of lateinit
statements?
2) should the code coverage tool even care about lateinit
? I think not because it is the accesses that are relevant and important to execute. Note that code coverage is not the right tool to ensure that using un-initialized variables are caught. That state can happen at runtime and be missed by a 100% code coverage run. Therefore knowing that no test tripped an un-initialised execution is not helpful.Evan
02/09/2021, 12:12 AMMark Allanson
05/26/2021, 6:55 PMjava.lang.IllegalStateException: Unexpected SMAP line: *S KotlinDebug
when generating Jacoco coverage reports with Kotlin 1.5.0?glenkpeterson
05/31/2021, 4:02 PMMatthias Geisler
09/08/2021, 7:52 PMRichard Schilling
11/04/2021, 11:40 PMAlejandro Rios
11/17/2021, 8:36 PM./gradlew koverHtmlReport
runs the test for all the variants, how can I run Kover just for my tests in develop variant?Javier
11/20/2021, 1:15 PMTomáš Hubálek
01/19/2022, 11:08 AMkover
for my android project.
For regular jUnit tests it works fine but I don’t see any results for tests run via ./gradlew connectedAndroidTest
Is that supported? Is it necessary to configure it somehow?Landry Norris
03/02/2022, 8:49 PMinterface SingleOutput: LogicGate {
val output: Pin
get() = outputs.first()
}
interface SingleInput: LogicGate {
var input
get() = inputs.first()
set(value) { inputs[0] = value }
}
I generally implement Input first, then Output, but when I do that, kover shows that the line that says interface SingleOutput: LogicGate
is not run. I had to switch the order of imports for one of my classes in order for the line to show as Green in kover's report. Is this expected, or a bug in kover?Andrew O Hart
03/09/2022, 10:54 AMKlitos Kyriacou
03/10/2022, 10:38 AM@Serializable
classes? I see several StackOverflow questions and answers that are 3+ years old, and there is a still outstanding issue 961. Has anyone solved the problem satisfactorily?Klitos Kyriacou
03/13/2022, 7:57 PMwriter().buffered()
which are both also inline, and the call boils down to something similar to this:
val x = OutputStreamWriter(this)
return if (x is BufferedWriter) x else BufferedWriter(x)
Now we know that the if
true branch will never be called in this case, so there is nothing we can do in our own code to test this branch. Is there a way to silence JaCoCo from outputing this false positive?kenkyee
03/16/2022, 6:04 PMAlina Dolgikh [JB]
05/12/2022, 2:31 PMGopal S Akshintala
05/14/2022, 12:35 PMsonar.coverage.jacoco.xmlReportPaths
) ?darkmoon_uk
06/18/2022, 4:24 AMErick Sanchez
06/29/2022, 6:25 PMVivek Modi
07/12/2022, 10:12 AMinternal fun getPendingStatusAction(
status: XYZ
): (() -> Unit)? {
var action: (() -> Unit)? = null
this.yo = yo
if (isAwaitingIdVerification(status)) {
action = {
<http://router.xyz|router.xyz>()
}
} else if (status == XYZ.PURCHASE) {
action = {
<http://router.xyz|router.xyz>()
}
}
return action
}
When I run single unit test it complete fine, but when I run whole file unit test it failed.Didier Villevalois
08/11/2022, 12:29 PMDidier Villevalois
08/11/2022, 12:29 PMSam
08/14/2022, 3:23 PMMichael Kaserer
08/20/2022, 7:43 PM