Skip to content

Getting started with Softprobe Testing

This page is the product lifecycle for Java record-and-replay. Hands-on commands live in the CLI quickstart; read this first for what happens at each step and why replay cannot be step one.

Prerequisites

  • Java service you can start with -javaagent
  • sp-boot running (local Docker/E2E: port 8090; cloud: your tenant API URL)
  • sp CLI installed, or dashboard access for the same backend
  • Network path from agent host to sp-boot

Lifecycle

StepActionDetail
1Setupsp setup doctor, configure SP_API_URL and token — CLI quickstart §1
2Register appsp app create <appName> → save appIdconcepts
3Recording policyBefore traffic: sp policy recording applyRecording policy
4Agentsp agent download + start JVM with -Dsp.app.idJava agent
5RecordGenerate traffic and verify cases — How to record
6Extraction (optional)If you search by business ids (orderId), apply extraction rules before heavy traffic
7Mock + compare policyBefore replay — Mock and compare policies
8Replaysp replay run --env <test-base-url>replay and diff
9Investigatesp replay diff, sp diagnose replay, sp trace find

TIP

Replay is never the first step on a greenfield app. Until step 5 produces cases, sp replay run has nothing meaningful to execute.

Record vs replay environments

EnvironmentAgent recordingRole
Production / stagingOn (per policy)Capture real traffic
Test / CIReplay host: recording off or minimalReceive replay HTTP; mock dependencies

Use -Dsp.tags.env=<label> when you need to filter cases by source environment.

Minimal command cheat sheet

bash
export SP_API_URL=http://127.0.0.1:8090
sp app create order-service --json
sp policy recording apply -f recording.yaml --json
sp agent download --json
# start JVM with sp agent command output
sp record case list --app <appId> --json
sp policy mock apply -f mock.yaml --json
sp policy compare apply -f compare.yaml --json
sp replay run --app <appId> --env http://127.0.0.1:8080 --json

Replace 8080 with the port where your application listens — not sp-boot’s 8090.

GoalLink
How to produce casesHow to record
Understand capture and mock mechanicsHow it works
JVM flags and production safetyJava agent
Framework coverageSupported frameworks
Automate in CI or agentsCLI overview
Istio / frontend observabilityPlatform quick start

Zero code changes · Full-context visibility · Cost optimization