Skyramp Test
Test Configuration
Test Configuration
Introduction
Skyramp lets you control and modify how your tests run by setting the configuration options available in the tester_start_v1
function.
tester_start_v1
Function Parameters
scenarios
: list of scenarios to execute; this is a Skyrampscenario
object. The scenarios in the list will be executed sequentially.test_name
: name of the test to be used in generated test reports.address
: address of the Skyramp worker container. This option is specific toDockerClient.tester_start_v1
. Please see Parallelism for how to run multiple workers at the same time.cluster
: name of the Kubernetes cluster where the test should run. This option is specific toK8SClient.tester_start_v1
.namespace
: name of the Kubernetes namespace where the test should run. This option is specific toK8SClient.tester_start_v1
.blocked
: boolean that determines whether the interpreter should wait for this call to complete or continue execution.global_vars
: dictionary to supply or overwrite variable test parameters, e.g. API tokens.override_code_path
: path to a csv file that contains set of variable test parameters that should be applied together to produce a test instance. As many test instances as there are rows in the csv file will be executed.blobs
: dictionary to change sample data used for requests.skip_verify
: boolean to determine whether TLS verification should be done for requests.loadtest_config
: options to change the test to a load test (see Performance Testing)
Example
In this example:
We first collect the scenarios to be executed through the
get_test_scenarios()
function and then pass them totester_start_v1
.Next, we set the name of the test to be used in reporting to
"artists test"
We specify the Skyramp worker address to be
"localhost:35142"
We require that the interpreter waits for the test to complete before continuing
We use
global_vars
to pass the API token,"token":"defaultValue"
In this simple case we don’t parameterize the test further. Please see Parameterize Tests for how to leverage
override_code_path
to execute multiple instances of the same test with different parameters.We turn off TLS verification.
We don’t change the sample request data and so
artists_request_data
will be used.We don’t supply arguments to change the test to a load test. Please see Performance Testing for how to do load tests.