Smoke Test

Getting Started

Getting Started

Advanced Generation

Advanced Smoke Testing Generation

This page will detail how you can adjust the generation of Smoke Tests with the Skyramp CLI.

1. Generate Smoke Tests for All Methods of an Endpoint

This section explains how you can use Skyramp to generate a smoke test for an entire endpoint of a REST API. To reliably generate test cases, we require at least one of the following inputs:

  • OpenAPI schema (JSON or YAML file)

Without a method specified, Skyramp generates tests for all methods of the specified endpoint URL and its direct children. If the parent of the specified endpoint has relevant methods, they will also be included in the generated test.
For example:

  • When generating for the endpoint https://demoshop.skyramp.dev/api/v1/products, Skyramp generates test functions for all methods under /v1/products and its direct child /v1/products/{product_id}, but not for the methods under /v1/products/{product_id}/reviews.

  • When generating for the endpoint https://demoshop.skyramp.dev/v1/products/{product_id}, Skyramp will generate test functions for /v1/products/{product_id}, its direct child /v1/products/{product_id}/reviews, and its direct parent/v1/products.

Advanced Smoke Testing Generation

This page will detail how you can adjust the generation of Smoke Tests with the Skyramp CLI.

1. Generate Smoke Tests for All Methods of an Endpoint

This section explains how you can use Skyramp to generate a smoke test for an entire endpoint of a REST API. To reliably generate test cases, we require at least one of the following inputs:

  • OpenAPI schema (JSON or YAML file)

Without a method specified, Skyramp generates tests for all methods of the specified endpoint URL and its direct children. If the parent of the specified endpoint has relevant methods, they will also be included in the generated test.
For example:

  • When generating for the endpoint https://demoshop.skyramp.dev/api/v1/products, Skyramp generates test functions for all methods under /v1/products and its direct child /v1/products/{product_id}, but not for the methods under /v1/products/{product_id}/reviews.

  • When generating for the endpoint https://demoshop.skyramp.dev/v1/products/{product_id}, Skyramp will generate test functions for /v1/products/{product_id}, its direct child /v1/products/{product_id}/reviews, and its direct parent/v1/products.

Advanced Smoke Testing Generation

This page will detail how you can adjust the generation of Smoke Tests with the Skyramp CLI.

1. Generate Smoke Tests for All Methods of an Endpoint

This section explains how you can use Skyramp to generate a smoke test for an entire endpoint of a REST API. To reliably generate test cases, we require at least one of the following inputs:

  • OpenAPI schema (JSON or YAML file)

Without a method specified, Skyramp generates tests for all methods of the specified endpoint URL and its direct children. If the parent of the specified endpoint has relevant methods, they will also be included in the generated test.
For example:

  • When generating for the endpoint https://demoshop.skyramp.dev/api/v1/products, Skyramp generates test functions for all methods under /v1/products and its direct child /v1/products/{product_id}, but not for the methods under /v1/products/{product_id}/reviews.

  • When generating for the endpoint https://demoshop.skyramp.dev/v1/products/{product_id}, Skyramp will generate test functions for /v1/products/{product_id}, its direct child /v1/products/{product_id}/reviews, and its direct parent/v1/products.

Python

Typescript

1.1 Generate Command

To create a smoke test for an endpoint, specify the endpoint you want to test. In this example, we are using the https://demoshop.skyramp.dev/api/v1/products as the URL to our service. When testing your service, replace it with the URL to the endpoint you want to test.

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--api-schema openapi.json

This command generates a smoke test file: products_smoke_test.py.

1.2 Execute 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.

1.2.1 Set environment variables for 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, as you can see in the examples below in Section 2.

export SKYRAMP_TEST_TOKEN=$your_auth_token

1.2.2 Run the test

Run the tests using Pytest. If you don’t have Pytest, install it with pip by running the following command in your terminal:

# Prerequisites 
pip install pytest

# Execution of smoke test for products/POST 
python3 -m pytest products_smoke_test.py

1.2.3 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 following this documentation.

We can see that the test checks 5 methods that all test cases pass.

2. Customize Test Generation

2.1 Generation from Request Data

Instead of using your API spec, Skyramp you can also generate smoke tests based on sample request data. This enables users to quickly generate tests if no API spec is available or test scenarios that depend on specific data.

This requires you to specify the method you want to test.

request.json

{
    "category": "toys",
    "description": "bear",
    "image_url": "picture",
    "in_stock": false,
    "name": "bigbear",
    "price": 10
}

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--request-data @request.json

2.2 Specification of form parameters for POST request

For POST requests, you can also provide form parameters instead of an API schema or sample request data to define the request body.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--form-params category=toys \
--form-params description=bear \
--form-params image_url=picture \
--form-params in_stock=false \
--form-params name=bigbear \
--form-params price=10

2.3 Change the authentication type

By default, Skyramp assumes a Bearer token. You can define the key of your authentication header with the auth-header flag.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--auth-header X-API-KEY \
--api-schema openapi.json

2.4 Specification of path parameters

Skyramp also allows you to define path param in the generation command. The path-param flag will override all relevant path parameters with your specified value.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products/{product_id} \
--language python \
--framework pytest \
--path-params product_id=2 \
--api-schema openapi.json

2.5 Specification of query parameters

You can specify query parameters when generating tests for a specific method.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X GET \
--language python \
--framework pytest \
--query-params limit=5 \
--query-params order=desc \
--api-schema openapi.json

2.6 Specification of test name and directory

If desired, you can override the default test name and specify the directory to save the generated test.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema openapi.json \
--output post_products_smoke_test.py \
--output-dir skyramp_tests

2.7 Test generation for Robot framework

Next to Pytest, Skyramp also supports the Robotframework in Python. This section shows you how to generate and execute tests using it instead of Pytest.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework robot \
--api-schema openapi.json

This command generates two files:

  • products_smoke_test.py

  • products_smoke_test.robot(simple Robot wrapper file)

Execute Test

Run the test using the Robotframework. You can reference the generated Python file either in an existing robot file of yours or leverage the simple wrapper file we generate.

# Prerequisites
pip install robotframework

# Execution of smoke test for products/POST 
python3 -m robot products_smoke_test.robot

The results will be outputted following the typical stdout from Robot. You can find more information on the generated outputs in the Robot documentation.

2.8 Change the test execution runtime to Docker

Instead of using “local” execution, Skyramp also supports seamless support for testing applications in your docker network. This allows you to test your services without worrying about network configurations and port mapping while developing locally.

During test execution, we automatically deploy our Skyramp Worker into the specified Docker network and send the requests from within the network.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--runtime docker \
--docker-network api-insight_default \
--docker-skyramp-port 35142 \
--api-schema openapi.json

2.9 Deploy the Skyramp Dashboard

Next to the stdout of the test frameworks, Skyramp offers a simple dashboard to collect and help you analyze your test results. The Skyramp Dashboard is a lightweight Docker image that will automatically be brought up when executing the test. Please specify the --deploy-dashboard flag in the generation command.

Post execution, the dashboard will be available under http://localhost:3000/tests.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema openapi.json \
--deploy-dashboard

Python

Typescript

1.1 Generate Command

To create a smoke test for an endpoint, specify the endpoint you want to test. In this example, we are using the https://demoshop.skyramp.dev/api/v1/products as the URL to our service. When testing your service, replace it with the URL to the endpoint you want to test.

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--api-schema openapi.json

This command generates a smoke test file: products_smoke_test.py.

1.2 Execute 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.

1.2.1 Set environment variables for 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, as you can see in the examples below in Section 2.

export SKYRAMP_TEST_TOKEN=$your_auth_token

1.2.2 Run the test

Run the tests using Pytest. If you don’t have Pytest, install it with pip by running the following command in your terminal:

# Prerequisites 
pip install pytest

# Execution of smoke test for products/POST 
python3 -m pytest products_smoke_test.py

1.2.3 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 following this documentation.

We can see that the test checks 5 methods that all test cases pass.

2. Customize Test Generation

2.1 Generation from Request Data

Instead of using your API spec, Skyramp you can also generate smoke tests based on sample request data. This enables users to quickly generate tests if no API spec is available or test scenarios that depend on specific data.

This requires you to specify the method you want to test.

request.json

{
    "category": "toys",
    "description": "bear",
    "image_url": "picture",
    "in_stock": false,
    "name": "bigbear",
    "price": 10
}

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--request-data @request.json

2.2 Specification of form parameters for POST request

For POST requests, you can also provide form parameters instead of an API schema or sample request data to define the request body.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--form-params category=toys \
--form-params description=bear \
--form-params image_url=picture \
--form-params in_stock=false \
--form-params name=bigbear \
--form-params price=10

2.3 Change the authentication type

By default, Skyramp assumes a Bearer token. You can define the key of your authentication header with the auth-header flag.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--auth-header X-API-KEY \
--api-schema openapi.json

2.4 Specification of path parameters

Skyramp also allows you to define path param in the generation command. The path-param flag will override all relevant path parameters with your specified value.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products/{product_id} \
--language python \
--framework pytest \
--path-params product_id=2 \
--api-schema openapi.json

2.5 Specification of query parameters

You can specify query parameters when generating tests for a specific method.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X GET \
--language python \
--framework pytest \
--query-params limit=5 \
--query-params order=desc \
--api-schema openapi.json

2.6 Specification of test name and directory

If desired, you can override the default test name and specify the directory to save the generated test.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema openapi.json \
--output post_products_smoke_test.py \
--output-dir skyramp_tests

2.7 Test generation for Robot framework

Next to Pytest, Skyramp also supports the Robotframework in Python. This section shows you how to generate and execute tests using it instead of Pytest.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework robot \
--api-schema openapi.json

This command generates two files:

  • products_smoke_test.py

  • products_smoke_test.robot(simple Robot wrapper file)

Execute Test

Run the test using the Robotframework. You can reference the generated Python file either in an existing robot file of yours or leverage the simple wrapper file we generate.

# Prerequisites
pip install robotframework

# Execution of smoke test for products/POST 
python3 -m robot products_smoke_test.robot

The results will be outputted following the typical stdout from Robot. You can find more information on the generated outputs in the Robot documentation.

2.8 Change the test execution runtime to Docker

Instead of using “local” execution, Skyramp also supports seamless support for testing applications in your docker network. This allows you to test your services without worrying about network configurations and port mapping while developing locally.

During test execution, we automatically deploy our Skyramp Worker into the specified Docker network and send the requests from within the network.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--runtime docker \
--docker-network api-insight_default \
--docker-skyramp-port 35142 \
--api-schema openapi.json

2.9 Deploy the Skyramp Dashboard

Next to the stdout of the test frameworks, Skyramp offers a simple dashboard to collect and help you analyze your test results. The Skyramp Dashboard is a lightweight Docker image that will automatically be brought up when executing the test. Please specify the --deploy-dashboard flag in the generation command.

Post execution, the dashboard will be available under http://localhost:3000/tests.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema openapi.json \
--deploy-dashboard

Python

Typescript

1.1 Generate Command

To create a smoke test for an endpoint, specify the endpoint you want to test. In this example, we are using the https://demoshop.skyramp.dev/api/v1/products as the URL to our service. When testing your service, replace it with the URL to the endpoint you want to test.

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--api-schema openapi.json

This command generates a smoke test file: products_smoke_test.py.

1.2 Execute 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.

1.2.1 Set environment variables for 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, as you can see in the examples below in Section 2.

export SKYRAMP_TEST_TOKEN=$your_auth_token

1.2.2 Run the test

Run the tests using Pytest. If you don’t have Pytest, install it with pip by running the following command in your terminal:

# Prerequisites 
pip install pytest

# Execution of smoke test for products/POST 
python3 -m pytest products_smoke_test.py

1.2.3 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 following this documentation.

We can see that the test checks 5 methods that all test cases pass.

2. Customize Test Generation

2.1 Generation from Request Data

Instead of using your API spec, Skyramp you can also generate smoke tests based on sample request data. This enables users to quickly generate tests if no API spec is available or test scenarios that depend on specific data.

This requires you to specify the method you want to test.

request.json

{
    "category": "toys",
    "description": "bear",
    "image_url": "picture",
    "in_stock": false,
    "name": "bigbear",
    "price": 10
}

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--request-data @request.json

2.2 Specification of form parameters for POST request

For POST requests, you can also provide form parameters instead of an API schema or sample request data to define the request body.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--form-params category=toys \
--form-params description=bear \
--form-params image_url=picture \
--form-params in_stock=false \
--form-params name=bigbear \
--form-params price=10

2.3 Change the authentication type

By default, Skyramp assumes a Bearer token. You can define the key of your authentication header with the auth-header flag.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--auth-header X-API-KEY \
--api-schema openapi.json

2.4 Specification of path parameters

Skyramp also allows you to define path param in the generation command. The path-param flag will override all relevant path parameters with your specified value.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products/{product_id} \
--language python \
--framework pytest \
--path-params product_id=2 \
--api-schema openapi.json

2.5 Specification of query parameters

You can specify query parameters when generating tests for a specific method.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X GET \
--language python \
--framework pytest \
--query-params limit=5 \
--query-params order=desc \
--api-schema openapi.json

2.6 Specification of test name and directory

If desired, you can override the default test name and specify the directory to save the generated test.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema openapi.json \
--output post_products_smoke_test.py \
--output-dir skyramp_tests

2.7 Test generation for Robot framework

Next to Pytest, Skyramp also supports the Robotframework in Python. This section shows you how to generate and execute tests using it instead of Pytest.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework robot \
--api-schema openapi.json

This command generates two files:

  • products_smoke_test.py

  • products_smoke_test.robot(simple Robot wrapper file)

Execute Test

Run the test using the Robotframework. You can reference the generated Python file either in an existing robot file of yours or leverage the simple wrapper file we generate.

# Prerequisites
pip install robotframework

# Execution of smoke test for products/POST 
python3 -m robot products_smoke_test.robot

The results will be outputted following the typical stdout from Robot. You can find more information on the generated outputs in the Robot documentation.

2.8 Change the test execution runtime to Docker

Instead of using “local” execution, Skyramp also supports seamless support for testing applications in your docker network. This allows you to test your services without worrying about network configurations and port mapping while developing locally.

During test execution, we automatically deploy our Skyramp Worker into the specified Docker network and send the requests from within the network.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--runtime docker \
--docker-network api-insight_default \
--docker-skyramp-port 35142 \
--api-schema openapi.json

2.9 Deploy the Skyramp Dashboard

Next to the stdout of the test frameworks, Skyramp offers a simple dashboard to collect and help you analyze your test results. The Skyramp Dashboard is a lightweight Docker image that will automatically be brought up when executing the test. Please specify the --deploy-dashboard flag in the generation command.

Post execution, the dashboard will be available under http://localhost:3000/tests.

Generate Command

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--api-schema openapi.json \
--deploy-dashboard

© 2025 Skyramp, Inc. All rights reserved.

© 2025 Skyramp, Inc. All rights reserved.

© 2025 Skyramp, Inc. All rights reserved.