-
Notifications
You must be signed in to change notification settings - Fork 475
Add code coverage #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
How would you envision it looking? Wouldn't the code coverage be almost exactly the same for all devices? |
Couldn't code coverage be different if there are tests that are specific to different form factors (phone vs. tablet)? |
In our case the code coverage would be different for phone vs tablet. |
Does using the Spoon test runner mean that we cannot use a code coverage tool? From other examples I've seen, it seems if you want to get code coverage from Instrumentation tests running on an Android device, you have to use com.jayway.maven.plugins.android.generation2 to run the tests and the pull the coverage files and generate then report. |
Spoon doesn't do anything differently than any other instrumentation test runner. We simply end up invoking I'm happy to pull whatever reports are generated into the output folder for later analysis by other tools. That seems very useful at the least. |
I see what you are saying about invoking that command. My question was more directed to the the Spoon plugin for Maven. I was able to get code coverage working with android-maven-plugin (see below). I specified arguments for coverage, createReport, and coverageFile -- these all get passed as parameters to am instrument. You would be planning on adding similar paramters to spoon-maven-plugin to accomplish the same thing? Basically turn on coverage through am, tell it where to put the ec file, then pull it off and stick it somewhere on my hard drive when it is done.
|
Yeah I think we can definitely support that. Like I said I'm not sure an actual code coverage display itself belongs in the Spoon output but we definitely should be supporting the generation of the files for external tools. |
I have this working on a branch. The current problem is that the file generated on the device has stupid permissions so you can't just pull it off. There's tricks around this, but I was too lazy to do them now. I'll hopefully circle back in the next week or two and get this finalized. |
I ran into that problem with emma regarding the permissions on the device and not being able to pull it off the folder with restricted access. I solved it by changing the location where the .ec file is generated:
and then later in the execution, the pull source matches this location to get the ec file, which works because this folder isn't restricted:
|
Not all of our devices have an SD card and I don't want to require it. It's not that hard to work around, just unfortunate. |
This seems fixed way back in 44c52c9. |
I would love to see the ability to add code coverage to these views.
The text was updated successfully, but these errors were encountered: