Drill4J Java Agent is using JVMTI interface to analyze and instrument Application Under Test(AUT) in runtime.
Java Agent has two parts two it - JVM in
.jar and native in either
.so depending on the platform.
Pick the platform appropriate release depending on where Application Under Test runs:
- Currently Linux and Windows are supported
- There are caveats to Alpine support
You have to provide the following string to
java command running your Application Under Test:
You can either directly bake it into
java launch like that
But more elegant and handier way is to use JAVA_TOOL_OPTIONS env variable which is picked up by Java automatically
Using JAVA_TOOL_OPTIONS option also allows to add Drill4J Java Agent to any Java app running inside Docker container without alterting the image.
This enables you to easily integrate Drill4J into any testing environment seamlessly - no need to rebuild the image, no need to deploy separate env to collect metrics
You can simply download Drill4J Java Agent from its github releases page and place them next to App Under Test
When running under Docker it can be handier to use our small image, that runs a script to download these files into shared volume:
Drill4J Java Agent is responsible for multiple tasks:
- Analyze application's packages, classes, methods and send metadata (not the actual code) to Drill4J Admin Backend
- Instrument AUT code to enable code execution tracking (in other words, code coverage)
- Analyze incoming requests to extract tests context (supplied, for example, by either Drill4J Java Agent or Browser Extension)
See Data Colletion for a comprehensive in-depth summary