Create Application
Step 1: Create application
- Go to Traffic and click "+" in the top left corner to create a new application. Enter the application name.
- After successfully creating a new application, as shown below, the startup parameters for the Agent and the download link for the Agent will be automatically generated. Click to download the latest version of Softprobe Agent Java.
The parameters:
</path/to/sp-agent.jar>
:sp-agent.jar
is the name of the Softprobe Agent JAR package. Replace</path/to/sp-agent.jar>
with the actual directory path where the Softprobe Agent JAR file is stored.<your-application.jar>
: Please modifyyour-application
to the name of the service you want to record.- If you encounter conflicts between the Softprobe Agent and other agents (such as the OpenTelemetry Agent), you can resolve this issue by adding specific parameters to the startup arguments:
In the event of conflicts with other agents, you can add multiple prefixes to the corresponding parameters separated by a comma (,):
- To view the Agent's logs, add the debug parameter:
-Dsp.enable.debug=true
Please modify the parameters within the "< >" according to the situation, and then you need to paste the Agent parameters into the service where you want to start recording the application.
Step2: Segmenting Traffic based on varying environments
In Softprobe, you can add different environment labels for the recorded traffic. This is to help users flexibly filter and replay traffic according to the labels to meet the test scenarios of specific environments or requirements. For example, users can select the corresponding traffic for replay based on different environment labels to verify the performance and stability of the system in different environments.
To do this, you need to add the parameter: -Dsp.tags.env=<xxx>
to the Agent startup parameters, after which the recorded traffic will be automatically tagged with env:<xxx>
.
Step 3: Deploy Softprobe Agent
The Softprobe Agent can be deployed using various methods, including:
Configure Java Parameters
Paste the startup parameters of the Agent you just generated and run it to start the Agent to run the application:
Deployment Configuration File
You can create a new configuration file sp.agent.conf
as shown below:
Then configure Agent:
Set the Java options by using the JAVA_OPTS environment variable
You can deploy the Softprobe Agent on Tomcat by configuring the catalina.sh
file or setting the JAVA_OPTS
environment variable directly. Here’s an example of how to do this on Linux:
You can then run Tomcat as usual. The Softprobe Agent will be automatically injected into the JVM and run when Tomcat starts.
Once configured, Softprobe will automatically records all online traffic by default.
View recording details
After recording the real requests to your application, navigate to the Traffic section and click on the corresponding application to view the list of recordings. The recorded test cases are grouped by the API path. Expand the API path to see all the test cases recorded under that path
Click on the Test Case Record ID to view the details of that test case.
A complete recorded test case should include the following parts:
- Servlet: The request and response messages of the main interface.
- DynamicClass: If there are dynamic class invocations, their request and response messages are displayed.
- Database, Redis: If there are third-party dependencies such as Redis and DB calls, their request and response messages are also presented."
By default, only recording test cases from the past 4 days are saved, and cases beyond this period will be automatically deleted.