Smoke Test

Examples

Generation Examples

In this section, we will go over how to customize the Skyramp CLI test generation command to achieve specific use cases for your test cases.

Generation Examples

In this section, we will go over how to customize the Skyramp CLI test generation command to achieve specific use cases for your test cases.

Generation Examples

In this section, we will go over how to customize the Skyramp CLI test generation command to achieve specific use cases for your test cases.

Python

Java

Typescript

  1. Generate tests from request data

Skyramp can generate smoke tests for a single method based on sample request data. This enables users to quickly generate tests if no API spec is available or test scenarios depend on specific data.

When generating for all methods of an endpoint, you can also specify request data in combination with the API schema to override the request body from the schema for the POST request.

request.json

{
    "category": "electronics",
    "description": "speaker",
    "image_url": "photo",
    "in_stock": false,
    "name": "boombox",
    "price": 25

Generate Command

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

2. Specify response status code

You can specify the response status code to assert against when the smoke test is executed.

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--response-status-code 200 \
--api-schema

  1. 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.

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

4. Specify form parameters for a POST request

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

When generating for all methods of an endpoint, you can also specify form params in combination with the API schema to override the request body from the schema for the POST request.

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--form-params category=electronics \
--form-params description=speaker \
--form-params image_url=photo \
--form-params in_stock=false \
--form-params name=boombox \
--form-params price=25

5. Specify path parameters

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

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

6. Specify query parameters

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

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

7. Specify test name and directory

You can override the default test name and specify the directory to save the generated test.

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

8. Test generation for Robot framework

Skyramp also supports the Robot Framework in Python. This section shows you how to generate and execute tests using Robot.

Generate Command

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

This command generates two files:

  • products_POST_smoke_test.py

  • products_POST_smoke_test.robot (simple Robot wrapper file)

Execute the smoke test

Ensure that authentication is properly set up and run the test using the Robot Framework. You can reference the generated Python file either in an existing robot file of yours or leverage the simple wrapper file we generate.

# Prerequisites
pip3 install robotframework

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

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

9. Change the test execution runtime to Docker

Skyramp also offers seamless support for testing applications in Docker. This allows you to test your services without worrying about network configurations and port mapping while developing locally. By default, Skyramp provides a Docker network where the test can be executed.

In this example, we are using api-sample as the service alias for our application. When testing your service, replace it with the service name you want to test.

skyramp generate smoke rest http://api-sample:8000/api/v1/products \
-X POST \
--language python \
--framework pytest \
--runtime docker \
--api-schema

You can also specify your own Docker network as follows:

skyramp generate smoke rest http://api-sample:8000/api/v1/products \
-X POST \
--language python \
--framework pytest \
--runtime docker \
--docker-network api-insight_default \
--docker-skyramp-port 35142 \
--api-schema

10. Deploy the Skyramp Dashboard

Skyramp also 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.

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

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

Python

Java

Typescript

  1. Generate tests from request data

Skyramp can generate smoke tests for a single method based on sample request data. This enables users to quickly generate tests if no API spec is available or test scenarios depend on specific data.

When generating for all methods of an endpoint, you can also specify request data in combination with the API schema to override the request body from the schema for the POST request.

request.json

{
    "category": "electronics",
    "description": "speaker",
    "image_url": "photo",
    "in_stock": false,
    "name": "boombox",
    "price": 25

Generate Command

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

2. Specify response status code

You can specify the response status code to assert against when the smoke test is executed.

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--response-status-code 200 \
--api-schema

  1. 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.

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

4. Specify form parameters for a POST request

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

When generating for all methods of an endpoint, you can also specify form params in combination with the API schema to override the request body from the schema for the POST request.

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--form-params category=electronics \
--form-params description=speaker \
--form-params image_url=photo \
--form-params in_stock=false \
--form-params name=boombox \
--form-params price=25

5. Specify path parameters

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

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

6. Specify query parameters

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

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

7. Specify test name and directory

You can override the default test name and specify the directory to save the generated test.

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

8. Test generation for Robot framework

Skyramp also supports the Robot Framework in Python. This section shows you how to generate and execute tests using Robot.

Generate Command

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

This command generates two files:

  • products_POST_smoke_test.py

  • products_POST_smoke_test.robot (simple Robot wrapper file)

Execute the smoke test

Ensure that authentication is properly set up and run the test using the Robot Framework. You can reference the generated Python file either in an existing robot file of yours or leverage the simple wrapper file we generate.

# Prerequisites
pip3 install robotframework

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

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

9. Change the test execution runtime to Docker

Skyramp also offers seamless support for testing applications in Docker. This allows you to test your services without worrying about network configurations and port mapping while developing locally. By default, Skyramp provides a Docker network where the test can be executed.

In this example, we are using api-sample as the service alias for our application. When testing your service, replace it with the service name you want to test.

skyramp generate smoke rest http://api-sample:8000/api/v1/products \
-X POST \
--language python \
--framework pytest \
--runtime docker \
--api-schema

You can also specify your own Docker network as follows:

skyramp generate smoke rest http://api-sample:8000/api/v1/products \
-X POST \
--language python \
--framework pytest \
--runtime docker \
--docker-network api-insight_default \
--docker-skyramp-port 35142 \
--api-schema

10. Deploy the Skyramp Dashboard

Skyramp also 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.

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

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

Python

Java

Typescript

  1. Generate tests from request data

Skyramp can generate smoke tests for a single method based on sample request data. This enables users to quickly generate tests if no API spec is available or test scenarios depend on specific data.

When generating for all methods of an endpoint, you can also specify request data in combination with the API schema to override the request body from the schema for the POST request.

request.json

{
    "category": "electronics",
    "description": "speaker",
    "image_url": "photo",
    "in_stock": false,
    "name": "boombox",
    "price": 25

Generate Command

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

2. Specify response status code

You can specify the response status code to assert against when the smoke test is executed.

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--response-status-code 200 \
--api-schema

  1. 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.

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

4. Specify form parameters for a POST request

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

When generating for all methods of an endpoint, you can also specify form params in combination with the API schema to override the request body from the schema for the POST request.

skyramp generate smoke rest https://demoshop.skyramp.dev/api/v1/products \
-X POST \
--language python \
--framework pytest \
--form-params category=electronics \
--form-params description=speaker \
--form-params image_url=photo \
--form-params in_stock=false \
--form-params name=boombox \
--form-params price=25

5. Specify path parameters

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

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

6. Specify query parameters

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

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

7. Specify test name and directory

You can override the default test name and specify the directory to save the generated test.

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

8. Test generation for Robot framework

Skyramp also supports the Robot Framework in Python. This section shows you how to generate and execute tests using Robot.

Generate Command

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

This command generates two files:

  • products_POST_smoke_test.py

  • products_POST_smoke_test.robot (simple Robot wrapper file)

Execute the smoke test

Ensure that authentication is properly set up and run the test using the Robot Framework. You can reference the generated Python file either in an existing robot file of yours or leverage the simple wrapper file we generate.

# Prerequisites
pip3 install robotframework

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

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

9. Change the test execution runtime to Docker

Skyramp also offers seamless support for testing applications in Docker. This allows you to test your services without worrying about network configurations and port mapping while developing locally. By default, Skyramp provides a Docker network where the test can be executed.

In this example, we are using api-sample as the service alias for our application. When testing your service, replace it with the service name you want to test.

skyramp generate smoke rest http://api-sample:8000/api/v1/products \
-X POST \
--language python \
--framework pytest \
--runtime docker \
--api-schema

You can also specify your own Docker network as follows:

skyramp generate smoke rest http://api-sample:8000/api/v1/products \
-X POST \
--language python \
--framework pytest \
--runtime docker \
--docker-network api-insight_default \
--docker-skyramp-port 35142 \
--api-schema

10. Deploy the Skyramp Dashboard

Skyramp also 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.

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

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

© 2025 Skyramp, Inc. All rights reserved.

© 2025 Skyramp, Inc. All rights reserved.

© 2025 Skyramp, Inc. All rights reserved.