diff --git a/README.md b/README.md index c34c2e3..d301e04 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,9 @@ The agent binds `/tmp/coverage_control.sock` before the application's `main` run ### 1. Download the Keploy Java Agent -Download the `keploy-sdk` jar and keep it outside your application dependencies. The jar is a Java agent and should be attached only when you run Keploy dynamic deduplication. +Download `io.keploy:keploy-sdk` **`>= 2.3.0`** (current release: **`2.4.0`**) and keep it outside your application dependencies. The jar is a Java agent and should be attached only when you run Keploy dynamic deduplication. + +It works with apps that serve HTTP through Tomcat (8.5 to 11), Jetty (9.4 to 12.1), or Undertow (2.2 and 2.3), such as Spring Boot MVC and Dropwizard, as an executable jar, from a classpath, or as a WAR. On other servers, such as Netty (Spring WebFlux), gRPC, Vert.x, Micronaut, or JDK `HttpServer`, Keploy keeps every test case. ```xml @@ -68,7 +70,7 @@ Download the `keploy-sdk` jar and keep it outside your application dependencies. io.keploy keploy-sdk - 2.0.5 + 2.4.0 ${project.build.directory} keploy-sdk.jar @@ -114,22 +116,7 @@ SDK starts JaCoCo 0.8.16 whether the app's jar comes before or after `keploy-sdk.jar` on the class path, and the app's `AgentJar` reads the app's own `jacocoagent.jar`, also in a Spring Boot fat jar. -If the command attaches a JaCoCo agent of its own (`-javaagent:jacocoagent.jar`, -before or after keploy-sdk.jar, or in `JAVA_TOOL_OPTIONS`), the SDK starts none -and reads coverage from that one. The SDK reads it through JaCoCo's in-process -runtime API (`org.jacoco.agent.rt.RT.getAgent()`). That JaCoCo instruments -every class its own options take in. If the in-process API is unavailable (for -example because the JaCoCo agent is loaded into an isolated classloader), the -SDK falls back to JaCoCo's TCP server mode. To use the fallback explicitly, -start JaCoCo in `tcpserver` mode and set `KEPLOY_JACOCO_HOST` / -`KEPLOY_JACOCO_PORT`: - -```bash -java \ - -javaagent:/path/to/jacocoagent.jar=address=127.0.0.1,port=36320,output=tcpserver \ - -javaagent:/path/to/keploy-sdk.jar \ - -jar your-app.jar -``` +> **Important:** Attach **only** `-javaagent:/path/to/keploy-sdk.jar`. Do **not** attach a separate `-javaagent:/path/to/jacocoagent.jar` alongside it — adding a separate JaCoCo agent prevents the SDK from starting its scoped embedded JaCoCo agent, can mismatch JaCoCo versions, and breaks per-test code-path and code-coverage collection. ### 3. Replay with Keploy Enterprise @@ -141,8 +128,6 @@ keploy test -c "java -javaagent:/path/to/keploy-sdk.jar -jar your-app.jar" \ --language java ``` -When using the TCP fallback, also pass `--pass-through-ports ` so Keploy does not try to mock the JaCoCo control connection. - After replay, run: ```bash