Generation
Load Test
Load Testing
This guide explores Skyramp Core Library capabilities to generate load tests. We will be using CLI to access functionality but the same features can be activated in the Agentic Experience by including a reference in the natural language prompt. Throughout this guide, we will demonstrate key capabilities using Skyramp’s Demo Shop API, a simple e-commerce API for product and order management. Learn more about the Demo Shop API.
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 tests are run asynchronously. This means that all requests are packaged in a scenario, sent to a worker (component responsible for executing the test), and executed without any individual responses being communicated back to the program runtime.
Why would I want to execute a test async?
For load testing scenarios with multiple chained API calls and simulations of high volume traffic, async test execution enables significantly higher test performance and simulate more realistic load on the system through concurrent requests and defining varying degrees of load on the system.
Generate a load test for a single method
This section explains how you can use Skyramp to generate load tests for a single method of a REST endpoint.
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)
In this guide, we'll use the OpenAPI schema approach. If you want more control over the generated body values, you can also do test generation from sample data (Example 1).
Generate Load Test for a Single Method
To create a load test for a single method, specify the method and URL you want to test against in the command. In this example, we are using https://demoshop.skyramp.dev as the base 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.
