https://kotlinlang.org logo
#code-coverage
Title
# code-coverage
j

Jessica Barns

03/30/2020, 7:40 PM
Hi everyone, I’m currently doing research on which Code Coverage tool to use in a Kotlin Multiplatform Project (Android + iOS) to generate a Code Coverage report, but I don’t seem to find anything besides Jacoco, which would only work for the JVM. I want to be able to have the coverage for commonMain, androidMain and iosMain. Do you have any suggestion on how I could achieve that? Thank you!
a

Antoine Gagnon

04/03/2020, 6:06 PM
I think you might have to stick with Jacoco for the Android side of things and use the iOS equivalent for the iOS side? Since the code is being compiled to something else in the end you might want to look into that
👍 1
You could also just assume that if your Unit tests work for the JVM, they would work for iOS (instrumented tests would be another story)
4 Views