Skip to content

jacoco code coverage #2448

Closed
Closed
@bootstraponline

Description

@bootstraponline
Member

Google has integrated jacoco code coverage support into the Gradle build system for Android. This should enable appium to easily capture code coverage.

http://tools.android.com/tech-docs/new-build-system

Activity

added this to the Appium 1.3 milestone on Jun 17, 2014
bootstraponline

bootstraponline commented on Aug 10, 2014

@bootstraponline
MemberAuthor

I think the easy way to do this is:

  • Create a new simple Android app that's built using gradle
  • Activate jacoco integration via the gradle plugin
  • Add a test to the appium suite that exercises this feature
sunhao111999

sunhao111999 commented on Aug 15, 2014

@sunhao111999

@bootstraponline have a Demo?

bootstraponline

bootstraponline commented on Aug 15, 2014

@bootstraponline
MemberAuthor

not yet, it's on the to do list though.

404-

404- commented on Feb 24, 2015

@404-

any progress on this?

bootstraponline

bootstraponline commented on Feb 24, 2015

@bootstraponline
MemberAuthor

I'm hoping to set this up with one of the droiddriver examples at some point this year. I know some teams have already figured it out, I haven't seen any examples though.

modified the milestones: Appium 1.4, Features on Mar 23, 2015
bootstraponline

bootstraponline commented on Apr 16, 2015

@bootstraponline
MemberAuthor

Enabling code coverage can be done in a single line of code with the new Android Studio + gradle:

buildTypes { debug { testCoverageEnabled true } }

There's an example in the droiddriver samples repo. The code I added to the appium server for emma should work the same with jacoco. I think the tasks for this issue are verifying the code works and then updating the doc.

bootstraponline

bootstraponline commented on Jul 25, 2015

@bootstraponline
MemberAuthor

Google broke jacoco so we'd need a custom instrumentation runner using the code provided in that issue. I've set one up for my Espresso tests at work.

nikhil969

nikhil969 commented on Jan 4, 2016

@nikhil969

Do we have any proper documentation for the usage of Jacoco with TestNG. Pleas can you point it or provide some steps over here.

nikhil969

nikhil969 commented on Feb 4, 2016

@nikhil969

Any progress on this..

bootstraponline

bootstraponline commented on Feb 4, 2016

@bootstraponline
MemberAuthor

I don't think anyone is actively working on it.

SrinivasanTarget

SrinivasanTarget commented on Apr 29, 2016

@SrinivasanTarget
Member

@triager please close

ghost

ghost commented on Nov 14, 2016

@ghost

Hi,

I am trying to generate code coverage for my android application.

  1. The developers code uses grade and it's a studio project.
  2. There are no code coverage tools implemented from the developers end.

Let me know the possibilities so I can give a try .

Thanks,
Thiru

ghost

ghost commented on Sep 28, 2017

@ghost

Hi,
Can anything be done to get code coverage without source code.

lock

lock commented on Apr 25, 2019

@lock

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

locked and limited conversation to collaborators on Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidrelated to Android-native driver(s)Enhancementfeature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @404-@jlipps@bootstraponline@Jonahss@nikhil969

        Issue actions

          jacoco code coverage · Issue #2448 · appium/appium