Sign inSign up

cqse/teamscale-java-profiler

By cqse

•Updated 7 days ago

Teamscale Java Profiler

Image
0

2.4K

cqse/teamscale-java-profiler repository overview

⁠Teamscale Java Profiler

The Teamscale Java Profiler is a JVM agent designed to record and upload test coverage from Java applications (or any JVM-based language like Kotlin or Scala) directly to Teamscale⁠.

It is the core component for enabling Test Gap Analysis (TGA) and Test Impact Analysis (TIA) in modern CI/CD pipelines, especially for long-running deployments in Docker and Kubernetes.

⁠Key Features
  • Real-Time Coverage: Automatically records which lines of code are executed during manual or automated tests.
  • Automatic Uploads: Coverage is uploaded to Teamscale at regular intervals or upon JVM shutdown, ensuring no data is lost.
  • Testwise Coverage: Enables granular tracking of coverage per individual test case.
  • Centralized Configuration: Manage profiler settings (includes/excludes, project mapping) directly within the Teamscale UI.
  • Lightweight Deployment: Built on top of JaCoCo, it adds minimal overhead to your application.
⁠How to Use in Docker

This image is designed to be used as a sidecar or init container. It provides the profiler JAR file via a shared volume so you don't have to bundle the agent inside your application image.

  1. Mount the Agent: Use a shared volume to copy the agent from /transfer in this image to your application container.
  2. Activate via Environment Variable: Add the agent to your JVM startup using JAVA_TOOL_OPTIONS:
    JAVA_TOOL_OPTIONS="-javaagent:/path/to/teamscale-jacoco-agent.jar=teamscale-server-url=https://your.teamscale.url,teamscale-user=user,teamscale-access-token=token,config-id=your-config-id"
    
  3. Ensure Proper Shutdown: Use exec in your Docker CMD or ENTRYPOINT (e.g., CMD exec java -jar app.jar) so the JVM receives the SIGTERM signal and can perform a final coverage upload.
⁠Documentation & Support

Tag summary

Content type

Image

Digest

sha256:72030c9d6…

Size

16.4 MB

Last updated

7 days ago

docker pull cqse/teamscale-java-profiler