Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Add coverage report #123

Open
thelittlefireman opened this issue Feb 1, 2018 · 4 comments
Open

Add coverage report #123

thelittlefireman opened this issue Feb 1, 2018 · 4 comments

Comments

@thelittlefireman
Copy link

hi,
Could it be possible to add coverage report on tests ?
https://developer.android.com/studio/test/command-line.html See "Emma"

Huge Thanks

@trevjonez
Copy link

You should be able to pass in the instrumentation arg already. The thing that is lacking is pulling the ec file. It might be helpful if composer would pull and rename the ec files for you. But I am concerned about what might happen if you try invoking the instrumentation with the emma argument against an apk that did not get the coverage byte code injected in the build process. maybe some way to parse and detect that?

@artem-zinnatullin
Copy link
Collaborator

Yo, yep that's a good feature. However @trevjonez pointed at a valid concern that we should know maybe upfront whether to expect coverage files or not

On one hand we want Composer to be abstract enough to support different test runners, screenshoters and so on. On the other hand we already support Spoon-styled file structure for pulling screenshots and files produced by individual test cases.

So if we add support for pulling codecoverage files in the same manner, that should be relatively fine from design view. Sounds like a valid balance between having "ideal design" and being pragmatic

@yunikkk what do you think?

@yunikkk
Copy link
Contributor

yunikkk commented Feb 2, 2018

I think its fine. We can have default coverage report pulling and an option to customize it somehow for flexibility.

@artem-zinnatullin
Copy link
Collaborator

Great, I'm all in for initial support then!

PRs welcome, I believe coverage could be very interesting for Juno as well, maybe @yunikkk or @ming13 could work on it?

We can start just with pulling the coverage report files from devices/emulators so then they could be piped into systems like Codecov, later we could integrate with Jacoco's HTML report and generate it pretty much the same way Gradle Jacoco plugin does it and make a link to Jacoco HTML report from Composer HTML report

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants