I'm trying to get the cucumber test coverage report in Android Studio, apparently coverage.ec is not generated by the instrumentation. However, normal espresso test seems working fine and I can successfully get the coverage report. cucumber tests are mostly written in Espresso test as well. So i'm just wondering is there any extra configuration that I need to do to get the coverage.ec?
Thanks.
I just found the answer myself, so basically CoverageDumper is doing the generation of coverage.ec file, all you need to is to add below lines in the instrumentation class. It's not documented anywhere as far as I know, you need to dig into the sourcecode to find these out.
arguments.putString("coverage", "true");
arguments.putString("coverageFile", "/data/data/YOURPACKAGENAME/coverage.ec");
mInstrumentationCore.create(arguments);