Integration Test

Advanced Generation

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

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

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

Python

Java

Typescript

The following flag usage patterns will work regardless of whether you are generating an integration test from OpenAPI spec or from Skyramp Trace.

Useful General Examples

Specify integration test file name and directory

You can customize the test file name and output directory to save the generated test.

Command to specify output file name and directory

skyramp generate integration rest https://www.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--api-schema https://demoshop.skyramp.dev/openapi.json \
--output integration_test_products.py \
--output-dir

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.

Command to generate for Docker runtime

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

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. Please specify the --deploy-dashboard flag in the generation command.

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

Command to deploy to Skyramp Dashboard

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

Python only: Use Robot framework

Skyramp supports the ability to generate and execute tests using the Robot framework

Generate Command

skyramp generate integration rest https://www.skyramp.dev/api/v1/products \
--language python \
--framework robot \
--api-schema

This command creates two test files:

  • products_integration_test.py

  • products_integration_test.robot

Execute Test

To execute the generated test, run the following commands in your terminal:

# Install dependencies
pip install robotframework

# Execute test

Test Generation using OpenAPI Spec

Change of authentication header

The additional flags allow you to change the authentication header.

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

Specification of request data

The request-data flag allows you to override the POST request data of the integration test with your own sample data.

request.json

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

Command to generate from sample data

skyramp generate integration rest https://www.demoshop.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--request-data @request.json \
--api-schema

Specification of form parameters

The form-params flag allows you to override the POST request data of the integration test with your own form parameters.

Command to generate from form params

skyramp generate integration rest https://demoshop.skyramp.dev/api/v1/products \
--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 \
--api-schema

Specification of path and query parameters

If the --path-params flag is specified, Skyramp will generate the integration test but ignore the flag. This is because integration tests use API call chaining to simulate the full CRUD lifecycle.

The query-params flag is not supported.

Test Generation using Skyramp Trace

For these examples, please ensure you have the following file saved in your local directory: backend_test_trace.json.

Recap: Using Fully Qualified Domain Names (FQDNs)

Skyramp provides special flags related to filtering certain FQDNs from traces to focus your integration test generation on the most critical flows.

FQDNs need to be specified either as an exact path to the endpoint or in combination with a wildcard. For example:

  • demoshop.skyramp.dev/products will only filter for POST and GET of the products endpoint.

  • demoshop.skyramp.dev/products* will filter for all products endpoints + any nested endpoints.

  • demoshop.skyramp.dev/products/* will filter only for any nested endpoints that require a product ID. It will not generate requests for POST and GET products.

For endpoints that require path parameters, please replace the path parameter with the wildcard:

  • Convert demoshop.skyramp.dev/products/{product_id}/reviews to demoshop.skyramp.dev/products/*/reviews.

Include certain FQDNs from the trace in the test

If you are only looking to test specific requests collected in your trace, you can filter for those FQDNs using the --include flag.

Command to generate with included FQDNs

skyramp generate integration rest \
--language python \
--framework pytest \
--trace backend_test_trace.json \
--include

Exclude certain FQDNs from the trace in the test

If your trace collected requests that are irrelevant to your integration test, you can exclude those FQDNs using the --exclude flag.

Command to generate with excluded FQDNs

skyramp generate integration rest \
--language python \
--framework pytest \
--trace backend_test_trace.json \
--exclude

Using OpenAPI spec flags during generation

The following flags, when used to generate integration tests with the Skyramp Trace flag --trace, will be ignored:

  • --api-schema

  • --form-params

  • --request-data

  • --response-data

  • --path-params

  • --auth-header

Test generation commands using the --query-params or --response-status-code flag will fail.

Python

Java

Typescript

The following flag usage patterns will work regardless of whether you are generating an integration test from OpenAPI spec or from Skyramp Trace.

Useful General Examples

Specify integration test file name and directory

You can customize the test file name and output directory to save the generated test.

Command to specify output file name and directory

skyramp generate integration rest https://www.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--api-schema https://demoshop.skyramp.dev/openapi.json \
--output integration_test_products.py \
--output-dir

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.

Command to generate for Docker runtime

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

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. Please specify the --deploy-dashboard flag in the generation command.

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

Command to deploy to Skyramp Dashboard

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

Python only: Use Robot framework

Skyramp supports the ability to generate and execute tests using the Robot framework

Generate Command

skyramp generate integration rest https://www.skyramp.dev/api/v1/products \
--language python \
--framework robot \
--api-schema

This command creates two test files:

  • products_integration_test.py

  • products_integration_test.robot

Execute Test

To execute the generated test, run the following commands in your terminal:

# Install dependencies
pip install robotframework

# Execute test

Test Generation using OpenAPI Spec

Change of authentication header

The additional flags allow you to change the authentication header.

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

Specification of request data

The request-data flag allows you to override the POST request data of the integration test with your own sample data.

request.json

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

Command to generate from sample data

skyramp generate integration rest https://www.demoshop.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--request-data @request.json \
--api-schema

Specification of form parameters

The form-params flag allows you to override the POST request data of the integration test with your own form parameters.

Command to generate from form params

skyramp generate integration rest https://demoshop.skyramp.dev/api/v1/products \
--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 \
--api-schema

Specification of path and query parameters

If the --path-params flag is specified, Skyramp will generate the integration test but ignore the flag. This is because integration tests use API call chaining to simulate the full CRUD lifecycle.

The query-params flag is not supported.

Test Generation using Skyramp Trace

For these examples, please ensure you have the following file saved in your local directory: backend_test_trace.json.

Recap: Using Fully Qualified Domain Names (FQDNs)

Skyramp provides special flags related to filtering certain FQDNs from traces to focus your integration test generation on the most critical flows.

FQDNs need to be specified either as an exact path to the endpoint or in combination with a wildcard. For example:

  • demoshop.skyramp.dev/products will only filter for POST and GET of the products endpoint.

  • demoshop.skyramp.dev/products* will filter for all products endpoints + any nested endpoints.

  • demoshop.skyramp.dev/products/* will filter only for any nested endpoints that require a product ID. It will not generate requests for POST and GET products.

For endpoints that require path parameters, please replace the path parameter with the wildcard:

  • Convert demoshop.skyramp.dev/products/{product_id}/reviews to demoshop.skyramp.dev/products/*/reviews.

Include certain FQDNs from the trace in the test

If you are only looking to test specific requests collected in your trace, you can filter for those FQDNs using the --include flag.

Command to generate with included FQDNs

skyramp generate integration rest \
--language python \
--framework pytest \
--trace backend_test_trace.json \
--include

Exclude certain FQDNs from the trace in the test

If your trace collected requests that are irrelevant to your integration test, you can exclude those FQDNs using the --exclude flag.

Command to generate with excluded FQDNs

skyramp generate integration rest \
--language python \
--framework pytest \
--trace backend_test_trace.json \
--exclude

Using OpenAPI spec flags during generation

The following flags, when used to generate integration tests with the Skyramp Trace flag --trace, will be ignored:

  • --api-schema

  • --form-params

  • --request-data

  • --response-data

  • --path-params

  • --auth-header

Test generation commands using the --query-params or --response-status-code flag will fail.

Python

Java

Typescript

The following flag usage patterns will work regardless of whether you are generating an integration test from OpenAPI spec or from Skyramp Trace.

Useful General Examples

Specify integration test file name and directory

You can customize the test file name and output directory to save the generated test.

Command to specify output file name and directory

skyramp generate integration rest https://www.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--api-schema https://demoshop.skyramp.dev/openapi.json \
--output integration_test_products.py \
--output-dir

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.

Command to generate for Docker runtime

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

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. Please specify the --deploy-dashboard flag in the generation command.

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

Command to deploy to Skyramp Dashboard

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

Python only: Use Robot framework

Skyramp supports the ability to generate and execute tests using the Robot framework

Generate Command

skyramp generate integration rest https://www.skyramp.dev/api/v1/products \
--language python \
--framework robot \
--api-schema

This command creates two test files:

  • products_integration_test.py

  • products_integration_test.robot

Execute Test

To execute the generated test, run the following commands in your terminal:

# Install dependencies
pip install robotframework

# Execute test

Test Generation using OpenAPI Spec

Change of authentication header

The additional flags allow you to change the authentication header.

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

Specification of request data

The request-data flag allows you to override the POST request data of the integration test with your own sample data.

request.json

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

Command to generate from sample data

skyramp generate integration rest https://www.demoshop.skyramp.dev/api/v1/products \
--language python \
--framework pytest \
--request-data @request.json \
--api-schema

Specification of form parameters

The form-params flag allows you to override the POST request data of the integration test with your own form parameters.

Command to generate from form params

skyramp generate integration rest https://demoshop.skyramp.dev/api/v1/products \
--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 \
--api-schema

Specification of path and query parameters

If the --path-params flag is specified, Skyramp will generate the integration test but ignore the flag. This is because integration tests use API call chaining to simulate the full CRUD lifecycle.

The query-params flag is not supported.

Test Generation using Skyramp Trace

For these examples, please ensure you have the following file saved in your local directory: backend_test_trace.json.

Recap: Using Fully Qualified Domain Names (FQDNs)

Skyramp provides special flags related to filtering certain FQDNs from traces to focus your integration test generation on the most critical flows.

FQDNs need to be specified either as an exact path to the endpoint or in combination with a wildcard. For example:

  • demoshop.skyramp.dev/products will only filter for POST and GET of the products endpoint.

  • demoshop.skyramp.dev/products* will filter for all products endpoints + any nested endpoints.

  • demoshop.skyramp.dev/products/* will filter only for any nested endpoints that require a product ID. It will not generate requests for POST and GET products.

For endpoints that require path parameters, please replace the path parameter with the wildcard:

  • Convert demoshop.skyramp.dev/products/{product_id}/reviews to demoshop.skyramp.dev/products/*/reviews.

Include certain FQDNs from the trace in the test

If you are only looking to test specific requests collected in your trace, you can filter for those FQDNs using the --include flag.

Command to generate with included FQDNs

skyramp generate integration rest \
--language python \
--framework pytest \
--trace backend_test_trace.json \
--include

Exclude certain FQDNs from the trace in the test

If your trace collected requests that are irrelevant to your integration test, you can exclude those FQDNs using the --exclude flag.

Command to generate with excluded FQDNs

skyramp generate integration rest \
--language python \
--framework pytest \
--trace backend_test_trace.json \
--exclude

Using OpenAPI spec flags during generation

The following flags, when used to generate integration tests with the Skyramp Trace flag --trace, will be ignored:

  • --api-schema

  • --form-params

  • --request-data

  • --response-data

  • --path-params

  • --auth-header

Test generation commands using the --query-params or --response-status-code flag will fail.

© 2025 Skyramp, Inc. All rights reserved.

© 2025 Skyramp, Inc. All rights reserved.

© 2025 Skyramp, Inc. All rights reserved.