Generation
Smoke Test
Smoke Testing
This guide explains how to generate smoke tests using the Skyramp CLI. 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.
If you haven’t already installed Skyramp, refer to the instructions in the Installation Guide.
Overview
Smoke testing is a preliminary check used to verify that an endpoint is accessible and returns a valid response. Smoke tests are useful for quickly identifying critical defects after significant changes.
Generate a smoke test for a single method
This section explains how you can use Skyramp to generate a smoke test for a specific method of a REST API.
To reliably generate test cases, we require at least one of the following inputs:
An OpenAPI schema file (JSON/YAML)
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).
Smoke Testing
This guide explains how to generate smoke tests using the Skyramp CLI. 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.
If you haven’t already installed Skyramp, refer to the instructions in the Installation Guide.
Overview
Smoke testing is a preliminary check used to verify that an endpoint is accessible and returns a valid response. Smoke tests are useful for quickly identifying critical defects after significant changes.
Generate a smoke test for a single method
This section explains how you can use Skyramp to generate a smoke test for a specific method of a REST API.
To reliably generate test cases, we require at least one of the following inputs:
An OpenAPI schema file (JSON/YAML)
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).
Smoke Testing
This guide explains how to generate smoke tests using the Skyramp CLI. 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.
If you haven’t already installed Skyramp, refer to the instructions in the Installation Guide.
Overview
Smoke testing is a preliminary check used to verify that an endpoint is accessible and returns a valid response. Smoke tests are useful for quickly identifying critical defects after significant changes.
Generate a smoke test for a single method
This section explains how you can use Skyramp to generate a smoke test for a specific method of a REST API.
To reliably generate test cases, we require at least one of the following inputs:
An OpenAPI schema file (JSON/YAML)
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).
Python
Java
Typescript
To create a smoke 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.
skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema
This command generates a fully executable Python file (products_POST_smoke_test.py
). You can find additional information on the anatomy of Skyramp-generated tests here.
Explanation of Command
https://demoshop.skyramp.dev/api/v1/products
: Defines the URL to the endpoint we aim to test.-X
(OR--method
): Specifies the API method to test.--language
: Specifies the test output language. For smoke testing, we currently support Python, Typescript, and Java.--framework
: Specifies the test execution framework of choice.--api-schema
: Points to the OpenAPI schema used to generate the test.
Adjustments
These flags will help you tune the basic smoke test. Additional flags are explained here.
--request-data
: Specify a sample JSON blob to use as the request body. This flag can be used without requiring an OpenAPI spec.--response-status-code
: Specify the expected status code. By default, Skyramp either asserts against the defined status code in the API specification or defaults to20X
.--output
: Specify the name of the generated test file.--output-dir
: Specify the directory to store the generated test file in.
Execute the Smoke Test
You can execute the generated tests without any additional adjustments to the code. However, based on the application you want to test, you can pass your authentication token to Skyramp Tests via an environment variable.
Set environment variable for authentication
To test against an application that requires authentication, pass your token using our environment variable. By default, Skyramp expects a Bearer Token but we support additional authentication methods (Example 3). If your API does not require any authentication, you can skip this step and just run the test.
Skyramp’s sample application requires a session identifier. Quickly obtain your session_id via the Demo Shop UI and set it as your authentication header. Additional information and ways to obtain the session_id can be found here.
export SKYRAMP_TEST_TOKEN=$your_auth_token
Run the Test
Run the test using Pytest. If you don’t have Pytest, refer to the Installation Guide for setup instructions:
python3 -m
Review Test Results
We are using Pytest’s default test output in this guide, printing a line for each test that is being run and listing all failures at the end. You can adjust the output behavior by following this documentation.
Using the single POST method example for the /v1/products
endpoint, the test passes.

Next Steps
Congratulations, you have just generated your first smoke test! To learn more about how to adjust the test file, please go to the Test File Anatomy page.
Related topics
Python
Java
Typescript
To create a smoke 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.
skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema
This command generates a fully executable Python file (products_POST_smoke_test.py
). You can find additional information on the anatomy of Skyramp-generated tests here.
Explanation of Command
https://demoshop.skyramp.dev/api/v1/products
: Defines the URL to the endpoint we aim to test.-X
(OR--method
): Specifies the API method to test.--language
: Specifies the test output language. For smoke testing, we currently support Python, Typescript, and Java.--framework
: Specifies the test execution framework of choice.--api-schema
: Points to the OpenAPI schema used to generate the test.
Adjustments
These flags will help you tune the basic smoke test. Additional flags are explained here.
--request-data
: Specify a sample JSON blob to use as the request body. This flag can be used without requiring an OpenAPI spec.--response-status-code
: Specify the expected status code. By default, Skyramp either asserts against the defined status code in the API specification or defaults to20X
.--output
: Specify the name of the generated test file.--output-dir
: Specify the directory to store the generated test file in.
Execute the Smoke Test
You can execute the generated tests without any additional adjustments to the code. However, based on the application you want to test, you can pass your authentication token to Skyramp Tests via an environment variable.
Set environment variable for authentication
To test against an application that requires authentication, pass your token using our environment variable. By default, Skyramp expects a Bearer Token but we support additional authentication methods (Example 3). If your API does not require any authentication, you can skip this step and just run the test.
Skyramp’s sample application requires a session identifier. Quickly obtain your session_id via the Demo Shop UI and set it as your authentication header. Additional information and ways to obtain the session_id can be found here.
export SKYRAMP_TEST_TOKEN=$your_auth_token
Run the Test
Run the test using Pytest. If you don’t have Pytest, refer to the Installation Guide for setup instructions:
python3 -m
Review Test Results
We are using Pytest’s default test output in this guide, printing a line for each test that is being run and listing all failures at the end. You can adjust the output behavior by following this documentation.
Using the single POST method example for the /v1/products
endpoint, the test passes.

Next Steps
Congratulations, you have just generated your first smoke test! To learn more about how to adjust the test file, please go to the Test File Anatomy page.
Related topics
Python
Java
Typescript
To create a smoke 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.
skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema
This command generates a fully executable Python file (products_POST_smoke_test.py
). You can find additional information on the anatomy of Skyramp-generated tests here.
Explanation of Command
https://demoshop.skyramp.dev/api/v1/products
: Defines the URL to the endpoint we aim to test.-X
(OR--method
): Specifies the API method to test.--language
: Specifies the test output language. For smoke testing, we currently support Python, Typescript, and Java.--framework
: Specifies the test execution framework of choice.--api-schema
: Points to the OpenAPI schema used to generate the test.
Adjustments
These flags will help you tune the basic smoke test. Additional flags are explained here.
--request-data
: Specify a sample JSON blob to use as the request body. This flag can be used without requiring an OpenAPI spec.--response-status-code
: Specify the expected status code. By default, Skyramp either asserts against the defined status code in the API specification or defaults to20X
.--output
: Specify the name of the generated test file.--output-dir
: Specify the directory to store the generated test file in.
Execute the Smoke Test
You can execute the generated tests without any additional adjustments to the code. However, based on the application you want to test, you can pass your authentication token to Skyramp Tests via an environment variable.
Set environment variable for authentication
To test against an application that requires authentication, pass your token using our environment variable. By default, Skyramp expects a Bearer Token but we support additional authentication methods (Example 3). If your API does not require any authentication, you can skip this step and just run the test.
Skyramp’s sample application requires a session identifier. Quickly obtain your session_id via the Demo Shop UI and set it as your authentication header. Additional information and ways to obtain the session_id can be found here.
export SKYRAMP_TEST_TOKEN=$your_auth_token
Run the Test
Run the test using Pytest. If you don’t have Pytest, refer to the Installation Guide for setup instructions:
python3 -m
Review Test Results
We are using Pytest’s default test output in this guide, printing a line for each test that is being run and listing all failures at the end. You can adjust the output behavior by following this documentation.
Using the single POST method example for the /v1/products
endpoint, the test passes.

Next Steps
Congratulations, you have just generated your first smoke test! To learn more about how to adjust the test file, please go to the Test File Anatomy page.