I have an android library project. We are using Robolectric to run the unit tests. Unit Tests are working fine from the IDE as well as Ant build.xml file. I am able to get the code coverage using the eclEmma plugin in Eclipse. But I am facing problems while getting coverage report from ant build. Tried using Jacoco for coverage report generation but getting 0% code coverage in spite of the fact that all tests are passing and code coverage from the plugin is 85%. Could anybody suggest what would be right framework for getting code coverage for unit tests while I am using Robolectric for unit tests and ant for build purposes.
Code Coverage for Android Library Project while using Robolectric
219 Views Asked by Prateek At
1
There are 1 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in ANT
- Ant build should wait for a child process to complete
- Can Apache Ant be told to cache its XML files?
- How to run FindBugs off of Ivy downloaded JARs
- NoSuchMethodError after cleaning the project
- How do you specify a fop config file for fop.bat in ant script
- Multiple browser execution of sahi scripts at the same time
- Eclipse Auto-build eternal loop
- Getting error when running pig: Cannot locate pig-core-h2.jar. do 'ant -Dhadoopversion=23 jar', and try again
- Keep getting No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'
- How to import / reference a gradle application in android application using command line (ant)
- TestNG ANT: disable ONLY the html reporter
- Cannot compile Java adapter using adapter-builder task (ANT) in MFP v7
- Create checksum and pom for maven repo
- How can I install Apache Ant 1.9.5 and connect it to Android Studio 1.2.1.1 in Windows 8.1?
- Compiling Java with Ant - keep getting error JNI error has occurred
Related Questions in CODE-COVERAGE
- Properties file exclude multiple paths
- Which code coverage tool will be helpful in Xcode for Swift projects?
- Visual studio does not exist in the namespace, but reference is added
- Sonar, Multiple Coverage Tools overwriting each other
- How to generate Code Coverage report of Instrumentation test cases in Android Studio
- Running flask server, nosetests and coverage
- Is it possible to merge coverage data from two executables with gcov/gcovr?
- How to check code coverage with JaCoCo agent?
- Getting jacoco report from cucumber tests with gradle
- PHPStorm exclude Tests from coverage percentage
- Coverage of NodeJS using Karma
- OpenCover missing PDBs exception
- GCOV Cross Profiling: __gcov_flush() does not flush coverage data for shared libraries
- How could I get code coverage for individual tests in Java
- Roslyn - dynamic (runtime) flow
Related Questions in ROBOLECTRIC
- Empty test suite: /InstrumentationResultParser: test run failed: 'Instrumentation run failed due to 'java.lang.NullPointerException''
- Robolectric: how to test class which use application instance inside?
- Using Robolectric, how to init and finalize stuff before and after all test methods in a test class is ran
- Difference between preference fragment and "regular" fragment
- Make Robolectric run test for the current build type only
- "Activity has been destroyed" error on Fragment testing with Robolectric
- Adding intent to activity in Robolectric before onCreate
- initializationError while executing Robolectric JUnit 4 test case
- Accessing a list of preferenceFragment views
- Robolectric issue with appcompat-v7:22.2.0
- How to unit test the GPS location in android using Robolectric?
- shadowOf() undefined in Robolectric-3.0-rc3.jar
- How to unit test Content provider and DB calls in robolectric which has native dependencies
- How verify the call to an interface with Mockito?
- Robolectric says "AndroidManifest.xml not found"
Related Questions in ECLEMMA
- How does assert groupType != null contain 4 branches
- Eclemma: Invalid Input Url Error in Eclipse
- Eclipse Kelper EclEmma code covarage exclude
- Using Jmockit with Eclemma
- Code coverage in Android Studio
- jUnit and DateFormat (EclEmma code coverage)
- eclipse + m2e + junit + infinitest + eclemma?
- How to launch unit tests under EclEmma without using the VisualVM launcher with that launcher installed
- Why code coverage is different when measured by eCobertura and EclEmma?
- ByteBuddy reset fails when running with Eclipse (EclEmma/JaCoCo) Code Coverage
- Aggregated Coverage or Coverage in the dependent modules not shown in SonarQube + Reports are generated by Jacoco
- jacoco:check failing due to invalid parameters
- Code coverage of single test file using eclemma?
- Using JaCoCo API programmatically
- Trying to refer a project not mentioned in .classpath
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This was a problem with configuration only. I changed the configuration and updated my build.xml . Now it works like a charm. I am able to get code coverage easily through Jacoco