GithubHelp home page GithubHelp logo

Comments (1)

Godin avatar Godin commented on June 18, 2024

After the clone of https://github.com/sdeleuze/spring-boot-kotlin-demo/ at commit 1d441fe508fe82e831e2ebeabefa4765edd4e803

execution of

cat <<END > build.gradle.kts
val bootRun: org.springframework.boot.gradle.tasks.run.BootRun by tasks
bootRun.apply {
    jvmArgs = listOf(
        "-javaagent:${project.projectDir.absolutePath}/jacoco-0.8.10/lib/jacocoagent.jar=output=tcpserver,port=6300"
    )
}
END

wget "https://repo1.maven.org/maven2/org/jacoco/jacoco/0.8.10/jacoco-0.8.10.zip"

unzip -d jacoco-0.8.10 jacoco-0.8.10.zip

./gradlew bootRun

and then in another terminal

java -jar jacoco-0.8.10/lib/jacococli.jar dump --port 6300 --reset --destfile test
java -jar jacoco-0.8.10/lib/jacococli.jar report test --html test.html --classfiles build/classes/kotlin/main/

produces the following output

[INFO] Connecting to localhost/127.0.0.1:6300.
[INFO] Writing execution data to /private/tmp/spring-boot-kotlin-demo/test.
[INFO] Loading execution data file /private/tmp/spring-boot-kotlin-demo/test.
[INFO] Analyzing 5 classes.

and the following report

Screenshot 2023-10-12 at 12 03 12

from jacoco.

Related Issues (20)

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.