GithubHelp home page GithubHelp logo

j256 / eclemma-failure Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 26 KB

Small test program that demonstrates a strange issue with Junit, Easymock, Commons Logging, and EclEmma/Jacoco.

Home Page: https://stackoverflow.com/questions/65511268/getting-a-no-coverage-data-has-been-collected-message-using-eclemma-and-eclips

Java 100.00%
emma eclipse junit commons-logging

eclemma-failure's Introduction

This project demonstrates a strange issue with Junit, Commons Logging, and EclEmma/Jacoco. EclEmma is a (usually awesome) coverage tool that runs under eclipse and maven via jacoco plugin.

See: https://stackoverflow.com/questions/65511268/getting-a-no-coverage-data-has-been-collected-using-emma-and-eclipse

When I run junit tests with EclEmma coverage I get the following error:

No coverage data has been collected during this coverage Session.
Please do not terminate the Java process manually from Eclipse.

If you do any of the following the problem goes away:

  • Comment out the LogFactory.getLog(getClass()) call.
  • Remove the junit @Test timeout field.
  • Downgrade Junit from 4.13.1 to 4.12.

Running the Tests Using Maven

Running mvn clean test should run junit and then cause jacoco to produce coverage information in target/site/jacoco. If the createMock(...) line is commented out then it should show Foo has 100% coverage. If if it is not commented then it should show Foo as completely uncovered although the "hello" message is emitted.

Dependencies

  • Eclemma 3.1.3 or jacoco-maven-plugin 0.8.6
  • apache commons-logging version 1.2
  • junit version 4.13.1 (4.12 doesn't exhibit this issue)

eclemma-failure's People

Contributors

j256 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.