Commands Usage
Practical examples of CLI commands for building and running test plans.
1. Create a Test Plan
lps create tests/my_test_plan.yaml --name myTestPlan
Creates a test plan file my_test_plan.yaml.
2. Creating a New Round
lps round tests/my_test_plan.yaml --name LoadTestRound --baseUrl https://api.example.com --numberofclients 10 --arrivalDelay 5000 --runinparallel
Creates a new round named LoadTestRound targeting https://api.example.com with 10 clients executing iterations in parallel.
3. Adding an HTTP Iteration
lps iteration tests/my_test_plan.yaml --roundName LoadTestRound --name GetEndpoint --url https://api.example.com/resource --method GET --iterationMode D --duration 60
Adds an iteration named GetEndpoint that sends GET requests to the specified URL for 60 seconds.
4. Capturing HTTP Response
lps capture tests/my_test_plan.yaml --iterationname CaptureAuthToken --roundName LoginRound --to authToken --regex "\bBearer\s.+\b"
Captures an authorization token from the response of the LoginRound iteration using a regex and saves it in the variable authToken.
5. Setting Global Variables
lps variable tests/my_test_plan.yaml --name baseUrl --value https://api.example.com
Sets a global variable baseUrl with the value https://api.example.com.
6. Running a Test Plan
lps run tests/my_test_plan.yaml
Runs the test plan defined in my_test_plan.yaml.
7. Configuring Watchdog
lps watchdog --maxMemoryMB 1000 --maxCPUPercentage 70 --coolDownRetryTimeInSeconds 2
Sets a watchdog configuration to monitor memory and CPU usage during test execution.
8. Configuring Logger
lps logger -ecl -lfp "/path/to/logfile.log"
Enables console logging and sets the log file path.