Generation
Getting Started
Getting Started
Load Test
Load Testing
This guide describes generating load tests using the Skyramp CLI. Throughout this guide, we are using Skyramp’s Demo Shop API as an example REST API. You can find all relevant information on the Demo Shop here.
If you haven’t already installed Skyramp, follow the instructions here.
Overview
Load testing assesses a system’s performance by simulating real-world traffic and usage patterns. It helps identify bottlenecks, scalability limits, and stability issues by measuring how the software behaves under expected and peak loads. Ensuring a system can handle demand without degradation is key to maintaining reliability and a smooth user experience.
Unlike other types of Skyramp tests, load testing is asynchronous, and every command in the test is executed without waiting for feedback. This allows for a more accurate understanding of the stresses a system experiences.
Generate Load Test for REST APIs
This section explains how you can use Skyramp to generate load tests for a single method of a REST endpoint. Learn more about generating Load tests from Traces.
To reliably generate single-method test cases, provide at least one of the following inputs:
OpenAPI schema (JSON or YAML file)
Sample request data (JSON blob or JSON file)
While we focus on using an API schema as input for this guide, the examples section outlines how to generate just from sample data - this allows you to have more control over the generated body values.
Load Testing
This guide describes generating load tests using the Skyramp CLI. Throughout this guide, we are using Skyramp’s Demo Shop API as an example REST API. You can find all relevant information on the Demo Shop here.
If you haven’t already installed Skyramp, follow the instructions here.
Overview
Load testing assesses a system’s performance by simulating real-world traffic and usage patterns. It helps identify bottlenecks, scalability limits, and stability issues by measuring how the software behaves under expected and peak loads. Ensuring a system can handle demand without degradation is key to maintaining reliability and a smooth user experience.
Unlike other types of Skyramp tests, load testing is asynchronous, and every command in the test is executed without waiting for feedback. This allows for a more accurate understanding of the stresses a system experiences.
Generate Load Test for REST APIs
This section explains how you can use Skyramp to generate load tests for a single method of a REST endpoint. Learn more about generating Load tests from Traces.
To reliably generate single-method test cases, provide at least one of the following inputs:
OpenAPI schema (JSON or YAML file)
Sample request data (JSON blob or JSON file)
While we focus on using an API schema as input for this guide, the examples section outlines how to generate just from sample data - this allows you to have more control over the generated body values.
Load Testing
This guide describes generating load tests using the Skyramp CLI. Throughout this guide, we are using Skyramp’s Demo Shop API as an example REST API. You can find all relevant information on the Demo Shop here.
If you haven’t already installed Skyramp, follow the instructions here.
Overview
Load testing assesses a system’s performance by simulating real-world traffic and usage patterns. It helps identify bottlenecks, scalability limits, and stability issues by measuring how the software behaves under expected and peak loads. Ensuring a system can handle demand without degradation is key to maintaining reliability and a smooth user experience.
Unlike other types of Skyramp tests, load testing is asynchronous, and every command in the test is executed without waiting for feedback. This allows for a more accurate understanding of the stresses a system experiences.
Generate Load Test for REST APIs
This section explains how you can use Skyramp to generate load tests for a single method of a REST endpoint. Learn more about generating Load tests from Traces.
To reliably generate single-method test cases, provide at least one of the following inputs:
OpenAPI schema (JSON or YAML file)
Sample request data (JSON blob or JSON file)
While we focus on using an API schema as input for this guide, the examples section outlines how to generate just from sample data - this allows you to have more control over the generated body values.
Python
Java
Generate Load Tests for a Single Method
In this example, we are using https://demoshop.skyramp.dev/api
as URL to our service. When testing your service, replace it with the URL to the endpoint you want to test.
You can find the used API specification here.
skyramp generate load rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema
This command generates a load test file: products_POST_load_test.py
.
The contents of this file are explained in the Skyramp Test File section.
Explanation of Command
https://demoshop.skyramp.dev/api/v1/products
: Defines the URL to the endpoint we aim to test.--language
: Specifies the test output language. We currently support Python, Java, and TypeScript.--framework
: Specify the test execution framework of choice.--api-schema
: Points to the OpenAPI schema used to generate the test. We also support sample data and traces as inputs for load test generation.
Generation Adjustments
Below are a few flags to customize the test generation. Additional flags are explained here.
Load Flags:
--default-count
: Number of times Skyramp executes the defined request [default=None]; this flag needs to be set ifload-duration
is set to 0.--default-duration
: Duration of the load test execution in seconds; this flag cannot be used in combination withdefault-load-count
[default=5]--default-num-threads
: Number of concurrent threads for load test [default=1]. Concurrent threads represent virtual users enabling you to test the vertical scalability of the service.--default-rampup-duration
: Specify the duration that Skyramp incrementally increases the requests per second (RPS) until the target RPS are reached [default=None]--default-rampup-interval
: Specify how often Skyramp increases the RPS until target RPS are reached [default=None]--default-target-rps
: Specify the maximum RPS of the load test [default=None]
Output Flags:
--output
: Specify the name of the generated test file.--output-dir
: Specify the directory to store the generated test file.
Execute the Load Test
You can execute the generated tests without any additional adjustments to the code.
Asynch Test Execution Behavior
Unlike other types of Skyramp tests, load testing is asynchronous, and every command in the test is executed without waiting for feedback. This allows for a more accurate understanding of the stresses a system experiences.
If a load duration rather than a count is provided, the Skyramp worker tries to maximize RPS for the specified load test duration while collecting the latency and failure rate of those requests
Set Authentication (if applicable)
Skyramp’s sample application doesn't require any authentication.
To test against an application that does require authentication, pass your token using an environment variable. By default, Skyramp expects a Bearer Token but we support additional authentication methods.
export SKYRAMP_TEST_TOKEN=$your_auth_token
Run the Test
For load testing, we run the test using Python directly, which allows us to display more meaningful test results. You can also run the test using the specified framework in the generation command; however, only the default result output of that framework will be displayed.
python3 products_POST_load_test.py
Based on the load configuration, the test will execute 5 POST requests against the service, collect failure rates and latency metrics, and validate against the expected response status code.
Reviewing Test Results
We can see that all 5 requests have been successfully executed. By default, Skyramp prints out the following metrics for the load test:

Additional information on how to adjust the output of the results will be added soon!
Skyramp Test File
This section explains the key elements of the generated test file. This will enable you to make adjustments when needed quickly.
The header of each test file shows when the test was generated and what command was used to generate it.
The body of the test file imports all relevant libraries and specifies the URL for all test requests.
Below, the load test configuration is specified.
The method being tested has a function that consists of:
Invocation of Skyramp Client
Definition of the authentication header
Creation of a Skyramp scenario
The scenario serves as an encapsulation of all relevant requests
Definition of the request body (based on API schema or sample data)
Formation of the request that can be executed asynchronously
Collection and print statement of the load test results
# Generated by Skyramp v0.5.12 on 2025-04-08 18:48:55.495212 -0400 EDT m=+3.977690167
# Command: skyramp generate load rest https://demoshop.skyramp.dev/api/v1/products \
# --api-schema https://demoshop.skyramp.dev/openapi.json \
# --framework pytest \
# --language python \
# --method POST \
# Import of required libraries
import skyramp
import os
import time
# URL for test requests
URL = "https://demoshop.skyramp.dev"
load_config = skyramp.LoadTestConfig(
load_duration=None,
load_num_threads=None,
load_target_rps=None,
load_count=5,
load_rampup_duration=None,
load_rampup_interval=None
)
def test_products_post(load_test_config:skyramp.LoadTestConfig=load_config):
# Invocation of Skyramp Client
client = skyramp.Client()
headers = {}
if os.getenv("SKYRAMP_TEST_TOKEN") is not None:
headers["Authorization"] = "Bearer " + os.getenv("SKYRAMP_TEST_TOKEN")
scenario = skyramp.AsyncScenario(name="scenario")
# Request Body
products_POST_request_body = r'''{
"category": "string",
"description": "string",
"image_url": "string",
"in_stock": false,
"name": "string",
"price": 0
}'''
products_POST_response = scenario.add_async_request(
name="products_POST_mUTn",
url=URL,
path="/api/v1/products",
method="POST",
body=products_POST_request_body,
headers=headers,
expected_code="201"
)
result = client.send_scenario(
scenario,
load_test_config=load_test_config
)
print(
f"result: {result.get_overall_status()}"
)
if __name__ == "__main__":
test_products_post()
Related topics
Python
Java
Generate Load Tests for a Single Method
In this example, we are using https://demoshop.skyramp.dev/api
as URL to our service. When testing your service, replace it with the URL to the endpoint you want to test.
You can find the used API specification here.
skyramp generate load rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema
This command generates a load test file: products_POST_load_test.py
.
The contents of this file are explained in the Skyramp Test File section.
Explanation of Command
https://demoshop.skyramp.dev/api/v1/products
: Defines the URL to the endpoint we aim to test.--language
: Specifies the test output language. We currently support Python, Java, and TypeScript.--framework
: Specify the test execution framework of choice.--api-schema
: Points to the OpenAPI schema used to generate the test. We also support sample data and traces as inputs for load test generation.
Generation Adjustments
Below are a few flags to customize the test generation. Additional flags are explained here.
Load Flags:
--default-count
: Number of times Skyramp executes the defined request [default=None]; this flag needs to be set ifload-duration
is set to 0.--default-duration
: Duration of the load test execution in seconds; this flag cannot be used in combination withdefault-load-count
[default=5]--default-num-threads
: Number of concurrent threads for load test [default=1]. Concurrent threads represent virtual users enabling you to test the vertical scalability of the service.--default-rampup-duration
: Specify the duration that Skyramp incrementally increases the requests per second (RPS) until the target RPS are reached [default=None]--default-rampup-interval
: Specify how often Skyramp increases the RPS until target RPS are reached [default=None]--default-target-rps
: Specify the maximum RPS of the load test [default=None]
Output Flags:
--output
: Specify the name of the generated test file.--output-dir
: Specify the directory to store the generated test file.
Execute the Load Test
You can execute the generated tests without any additional adjustments to the code.
Asynch Test Execution Behavior
Unlike other types of Skyramp tests, load testing is asynchronous, and every command in the test is executed without waiting for feedback. This allows for a more accurate understanding of the stresses a system experiences.
If a load duration rather than a count is provided, the Skyramp worker tries to maximize RPS for the specified load test duration while collecting the latency and failure rate of those requests
Set Authentication (if applicable)
Skyramp’s sample application doesn't require any authentication.
To test against an application that does require authentication, pass your token using an environment variable. By default, Skyramp expects a Bearer Token but we support additional authentication methods.
export SKYRAMP_TEST_TOKEN=$your_auth_token
Run the Test
For load testing, we run the test using Python directly, which allows us to display more meaningful test results. You can also run the test using the specified framework in the generation command; however, only the default result output of that framework will be displayed.
python3 products_POST_load_test.py
Based on the load configuration, the test will execute 5 POST requests against the service, collect failure rates and latency metrics, and validate against the expected response status code.
Reviewing Test Results
We can see that all 5 requests have been successfully executed. By default, Skyramp prints out the following metrics for the load test:

Additional information on how to adjust the output of the results will be added soon!
Skyramp Test File
This section explains the key elements of the generated test file. This will enable you to make adjustments when needed quickly.
The header of each test file shows when the test was generated and what command was used to generate it.
The body of the test file imports all relevant libraries and specifies the URL for all test requests.
Below, the load test configuration is specified.
The method being tested has a function that consists of:
Invocation of Skyramp Client
Definition of the authentication header
Creation of a Skyramp scenario
The scenario serves as an encapsulation of all relevant requests
Definition of the request body (based on API schema or sample data)
Formation of the request that can be executed asynchronously
Collection and print statement of the load test results
# Generated by Skyramp v0.5.12 on 2025-04-08 18:48:55.495212 -0400 EDT m=+3.977690167
# Command: skyramp generate load rest https://demoshop.skyramp.dev/api/v1/products \
# --api-schema https://demoshop.skyramp.dev/openapi.json \
# --framework pytest \
# --language python \
# --method POST \
# Import of required libraries
import skyramp
import os
import time
# URL for test requests
URL = "https://demoshop.skyramp.dev"
load_config = skyramp.LoadTestConfig(
load_duration=None,
load_num_threads=None,
load_target_rps=None,
load_count=5,
load_rampup_duration=None,
load_rampup_interval=None
)
def test_products_post(load_test_config:skyramp.LoadTestConfig=load_config):
# Invocation of Skyramp Client
client = skyramp.Client()
headers = {}
if os.getenv("SKYRAMP_TEST_TOKEN") is not None:
headers["Authorization"] = "Bearer " + os.getenv("SKYRAMP_TEST_TOKEN")
scenario = skyramp.AsyncScenario(name="scenario")
# Request Body
products_POST_request_body = r'''{
"category": "string",
"description": "string",
"image_url": "string",
"in_stock": false,
"name": "string",
"price": 0
}'''
products_POST_response = scenario.add_async_request(
name="products_POST_mUTn",
url=URL,
path="/api/v1/products",
method="POST",
body=products_POST_request_body,
headers=headers,
expected_code="201"
)
result = client.send_scenario(
scenario,
load_test_config=load_test_config
)
print(
f"result: {result.get_overall_status()}"
)
if __name__ == "__main__":
test_products_post()
Related topics
Python
Java
Generate Load Tests for a Single Method
In this example, we are using https://demoshop.skyramp.dev/api
as URL to our service. When testing your service, replace it with the URL to the endpoint you want to test.
You can find the used API specification here.
skyramp generate load rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema
This command generates a load test file: products_POST_load_test.py
.
The contents of this file are explained in the Skyramp Test File section.
Explanation of Command
https://demoshop.skyramp.dev/api/v1/products
: Defines the URL to the endpoint we aim to test.--language
: Specifies the test output language. We currently support Python, Java, and TypeScript.--framework
: Specify the test execution framework of choice.--api-schema
: Points to the OpenAPI schema used to generate the test. We also support sample data and traces as inputs for load test generation.
Generation Adjustments
Below are a few flags to customize the test generation. Additional flags are explained here.
Load Flags:
--default-count
: Number of times Skyramp executes the defined request [default=None]; this flag needs to be set ifload-duration
is set to 0.--default-duration
: Duration of the load test execution in seconds; this flag cannot be used in combination withdefault-load-count
[default=5]--default-num-threads
: Number of concurrent threads for load test [default=1]. Concurrent threads represent virtual users enabling you to test the vertical scalability of the service.--default-rampup-duration
: Specify the duration that Skyramp incrementally increases the requests per second (RPS) until the target RPS are reached [default=None]--default-rampup-interval
: Specify how often Skyramp increases the RPS until target RPS are reached [default=None]--default-target-rps
: Specify the maximum RPS of the load test [default=None]
Output Flags:
--output
: Specify the name of the generated test file.--output-dir
: Specify the directory to store the generated test file.
Execute the Load Test
You can execute the generated tests without any additional adjustments to the code.
Asynch Test Execution Behavior
Unlike other types of Skyramp tests, load testing is asynchronous, and every command in the test is executed without waiting for feedback. This allows for a more accurate understanding of the stresses a system experiences.
If a load duration rather than a count is provided, the Skyramp worker tries to maximize RPS for the specified load test duration while collecting the latency and failure rate of those requests
Set Authentication (if applicable)
Skyramp’s sample application doesn't require any authentication.
To test against an application that does require authentication, pass your token using an environment variable. By default, Skyramp expects a Bearer Token but we support additional authentication methods.
export SKYRAMP_TEST_TOKEN=$your_auth_token
Run the Test
For load testing, we run the test using Python directly, which allows us to display more meaningful test results. You can also run the test using the specified framework in the generation command; however, only the default result output of that framework will be displayed.
python3 products_POST_load_test.py
Based on the load configuration, the test will execute 5 POST requests against the service, collect failure rates and latency metrics, and validate against the expected response status code.
Reviewing Test Results
We can see that all 5 requests have been successfully executed. By default, Skyramp prints out the following metrics for the load test:

Additional information on how to adjust the output of the results will be added soon!
Skyramp Test File
This section explains the key elements of the generated test file. This will enable you to make adjustments when needed quickly.
The header of each test file shows when the test was generated and what command was used to generate it.
The body of the test file imports all relevant libraries and specifies the URL for all test requests.
Below, the load test configuration is specified.
The method being tested has a function that consists of:
Invocation of Skyramp Client
Definition of the authentication header
Creation of a Skyramp scenario
The scenario serves as an encapsulation of all relevant requests
Definition of the request body (based on API schema or sample data)
Formation of the request that can be executed asynchronously
Collection and print statement of the load test results
# Generated by Skyramp v0.5.12 on 2025-04-08 18:48:55.495212 -0400 EDT m=+3.977690167
# Command: skyramp generate load rest https://demoshop.skyramp.dev/api/v1/products \
# --api-schema https://demoshop.skyramp.dev/openapi.json \
# --framework pytest \
# --language python \
# --method POST \
# Import of required libraries
import skyramp
import os
import time
# URL for test requests
URL = "https://demoshop.skyramp.dev"
load_config = skyramp.LoadTestConfig(
load_duration=None,
load_num_threads=None,
load_target_rps=None,
load_count=5,
load_rampup_duration=None,
load_rampup_interval=None
)
def test_products_post(load_test_config:skyramp.LoadTestConfig=load_config):
# Invocation of Skyramp Client
client = skyramp.Client()
headers = {}
if os.getenv("SKYRAMP_TEST_TOKEN") is not None:
headers["Authorization"] = "Bearer " + os.getenv("SKYRAMP_TEST_TOKEN")
scenario = skyramp.AsyncScenario(name="scenario")
# Request Body
products_POST_request_body = r'''{
"category": "string",
"description": "string",
"image_url": "string",
"in_stock": false,
"name": "string",
"price": 0
}'''
products_POST_response = scenario.add_async_request(
name="products_POST_mUTn",
url=URL,
path="/api/v1/products",
method="POST",
body=products_POST_request_body,
headers=headers,
expected_code="201"
)
result = client.send_scenario(
scenario,
load_test_config=load_test_config
)
print(
f"result: {result.get_overall_status()}"
)
if __name__ == "__main__":
test_products_post()