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
221 Views Asked by Prateek At
1
There are 1 best solutions below
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in ANT
- How to build using Eclipse Tycho
- Ant Junit ForkMode with Suites
- Apache Ant - How to handle the target error?
- Ant dont upload file
- Eclipse Ant Javadoc - warning of no comment on private field
- Code coverage is not getting generated. Previously I used to get it properly, now they upgraded to rhel 8. Now, no code coverage is coming at all
- Extract *.jar from *.aar and import; Failed resolution of: Lcom/xxx/xxx/xxx/R$layout when APK running
- Ant continues to add the wrong jar file to the classpath even after I've changed it
- How to exclude Kotlin from OkHttp?
- Jetty Error: I' starting my web aap and all of sudden Getting this Error
- Can ant break upon encountering an undefined property?
- ZipException opening "xalan.jar"
- Using ResourceBundle and jar files with ant
- how can we invoke custom ant task from junit
- How do I configure VS Code to debug an opensource project written in Java that uses ANT as its build command?
Related Questions in CODE-COVERAGE
- oss-fuzz does not cover the code after if - else in C code
- How to correctly generate an HTML report of coverage with grcov
- Getting a total line, branch, statement and function count per file in a TypeScript project
- xcbuild didn't run tests even though it can be run from XCode
- pytest command used in gitlab CICD pipeline does not automatically pick test_* script and throws error "CoverageWarning: No data was collected."
- How to check branch coverage in Bullseye Coverage?
- Dotnet solution: Code coverage cannot exclude modules/assemblies
- codecov doesn't find any reports
- VSTest branch coverage missing on fixed statement
- Pytest-cov: How can I increase coverage?
- system-verilog - cross cover between generate-loop instances
- Sonar showing condition always false error though it is not
- Multiple instances of covergroup based on parameter
- Code Coverage not working in CLion for linux
- For each java class, output the contributing tests (which cover that class) to a JSON report
Related Questions in ROBOLECTRIC
- Problem using BeforeClass with Robolectric
- Unable to advance time with ShadowSystemClock robolectric
- What causes intermittent Robolectric exception (warning) Explicit termination method 'close' not called
- Robolectric Fails to Instantiate Class, But Basic Tests Pass Individually
- Jacoco code coverage report is showing zero in AOSP junit testing
- How to exclude this library 'im.zego:express-video:3.4.0' in JUnit RobolectricTestRunner?
- Robolectric Test Looping without getting finish
- Receiver class org.robolectric.shadows.multidex.Shadows does not define or inherit an implementation of getShadows() of interface ShadowProvider
- Injecting NavBackStackEntry to composable in tests of NavHost
- Jacoco Not Showing Coverage for Robolectric Tests in Android Studio
- Test case failing: ClassCastException: androidx.lifecycle.ViewModel$Subclass1 cannot be cast to class SecondChildViewModel
- java.lang.OutOfMemoryError: Failed to load XXX.jar
- Use of robolectric's `shadowOf` causes a runtime error in androidTest module code
- Test case getting failed after robolectric library updatded to 4.9.0 getting status code 403 from server: Forbidden
- Difference between ShadowLooper.idle() and ShadowLooper.runToEndOfTasks()
Related Questions in ECLEMMA
- How to include custom ClassLoader coverage in EclEmma reports?
- Method not covered during JUnit code coverage (Eclemma code coverage testing); It says "All 2 branches missed"
- understanding Eclemma results
- Using JaCoCo API programmatically
- Getting a "no coverage data has been collected" message using EclEmma and Eclipse
- can't use Eclemma coverage tool with eclipse
- Can EclEmma for Eclipse show code coverage by test?
- Start in coverage mode for Visual Studio
- How to properly run Eclemma coverage with Java
- Error while loading coverage session (code 5001) in eclemma plugin
- Code Coverage resulting in following issue
- How to resolve 'Launching ServiceTest has encountered a problem' in EclEmma plugin in Eclipse IDE
- Eclipse PowerMock coverage with ECLEmma
- is there any way to exclude classes to attain coverage %?
- Why EclEmma don't allow to ignore a class from the total percentage of the coverage?
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 # Hahtags
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