Generation
Getting Started
Getting Started
Fuzz Test
Advanced Fuzz Testing Generation
1. Generate Fuzz Tests for All Methods of an Endpoint
Skyramp generates test cases for all methods for the specified path/url and its direct children. For cases, where the direct parent path/url has relevant methods, Skyramp will also generate test cases.
For example:

Advanced Fuzz Testing Generation
1. Generate Fuzz Tests for All Methods of an Endpoint
Skyramp generates test cases for all methods for the specified path/url and its direct children. For cases, where the direct parent path/url has relevant methods, Skyramp will also generate test cases.
For example:

Advanced Fuzz Testing Generation
1. Generate Fuzz Tests for All Methods of an Endpoint
Skyramp generates test cases for all methods for the specified path/url and its direct children. For cases, where the direct parent path/url has relevant methods, Skyramp will also generate test cases.
For example:

Python
We are using https://demoshop.skyramp.dev/api/v1/products
as a placeholder here for your <url-to-endpoint>
.
skyramp generate fuzz rest https://demoshop.skyramp.dev/api/v1/products \
--language python \
--framework robot \
--response-status-code 20x \
--api-schema openapi.json
This command generates a fuzz test file: products_fuzz_test.py
.
The content of the generated test is explained here.
3. Execute Fuzz Test
You can execute the generated tests without any additional adjustments to the code.
3.1 Set env variable for authentication (if needed)
Ensure proper authentication for test execution. By default, we expect a Bearer Token but support additional authentication methods. If your API does not require any authentication, you can skip this step and just run the test.
export SKYRAMP_TEST_TOKEN=$your_bearer_token
3.2 Run the test
We now run the test using the Robot Framework. You can call the generated Python file either in an existing robot file or leverage this example file skyramp_test.robot
:
*** Settings ***
Documentation Proof of Concept fuzz pytest under the hood of Robot Framework
Library products_fuzz_test.py
*** Test Cases ***
Skyramp Test
Test products post
You can now execute
# Prerequisites
pip install robotframework
# Execution of fuzz test for products/POST
robot skyramp_test.robot
3.3 Results
As we use the Robot Framework to execute the test in this example, you can expect both the typical stdout
from Robot and the generated files (output, log, report). You can find more information on the generated outputs in the Robot documentation.
3.3.1 Successful Test
Using the simple POST method example of the /api/v1/products
endpoint, the test passes out of the box.

3.3.2 Test Failure
For this section, we intentionally changed the expected response body to create a failure. You can find more detailed information about the test failure in the report.html
and log.html
.

Python
We are using https://demoshop.skyramp.dev/api/v1/products
as a placeholder here for your <url-to-endpoint>
.
skyramp generate fuzz rest https://demoshop.skyramp.dev/api/v1/products \
--language python \
--framework robot \
--response-status-code 20x \
--api-schema openapi.json
This command generates a fuzz test file: products_fuzz_test.py
.
The content of the generated test is explained here.
3. Execute Fuzz Test
You can execute the generated tests without any additional adjustments to the code.
3.1 Set env variable for authentication (if needed)
Ensure proper authentication for test execution. By default, we expect a Bearer Token but support additional authentication methods. If your API does not require any authentication, you can skip this step and just run the test.
export SKYRAMP_TEST_TOKEN=$your_bearer_token
3.2 Run the test
We now run the test using the Robot Framework. You can call the generated Python file either in an existing robot file or leverage this example file skyramp_test.robot
:
*** Settings ***
Documentation Proof of Concept fuzz pytest under the hood of Robot Framework
Library products_fuzz_test.py
*** Test Cases ***
Skyramp Test
Test products post
You can now execute
# Prerequisites
pip install robotframework
# Execution of fuzz test for products/POST
robot skyramp_test.robot
3.3 Results
As we use the Robot Framework to execute the test in this example, you can expect both the typical stdout
from Robot and the generated files (output, log, report). You can find more information on the generated outputs in the Robot documentation.
3.3.1 Successful Test
Using the simple POST method example of the /api/v1/products
endpoint, the test passes out of the box.

3.3.2 Test Failure
For this section, we intentionally changed the expected response body to create a failure. You can find more detailed information about the test failure in the report.html
and log.html
.

Python
We are using https://demoshop.skyramp.dev/api/v1/products
as a placeholder here for your <url-to-endpoint>
.
skyramp generate fuzz rest https://demoshop.skyramp.dev/api/v1/products \
--language python \
--framework robot \
--response-status-code 20x \
--api-schema openapi.json
This command generates a fuzz test file: products_fuzz_test.py
.
The content of the generated test is explained here.
3. Execute Fuzz Test
You can execute the generated tests without any additional adjustments to the code.
3.1 Set env variable for authentication (if needed)
Ensure proper authentication for test execution. By default, we expect a Bearer Token but support additional authentication methods. If your API does not require any authentication, you can skip this step and just run the test.
export SKYRAMP_TEST_TOKEN=$your_bearer_token
3.2 Run the test
We now run the test using the Robot Framework. You can call the generated Python file either in an existing robot file or leverage this example file skyramp_test.robot
:
*** Settings ***
Documentation Proof of Concept fuzz pytest under the hood of Robot Framework
Library products_fuzz_test.py
*** Test Cases ***
Skyramp Test
Test products post
You can now execute
# Prerequisites
pip install robotframework
# Execution of fuzz test for products/POST
robot skyramp_test.robot
3.3 Results
As we use the Robot Framework to execute the test in this example, you can expect both the typical stdout
from Robot and the generated files (output, log, report). You can find more information on the generated outputs in the Robot documentation.
3.3.1 Successful Test
Using the simple POST method example of the /api/v1/products
endpoint, the test passes out of the box.

3.3.2 Test Failure
For this section, we intentionally changed the expected response body to create a failure. You can find more detailed information about the test failure in the report.html
and log.html
.
