Test scenario definition
In the current release, it is possible to supply a configuration file
in JSON
format for running your tests.
In the following sections, we will provide a detailed explanation of the structure and all parameters in the JSON configuration file.
Structure
The JSON configuration file consists of:
ByteBlower server address (and optionally a ByteBlower meeting point)
List of port definitions: Where you want to send traffic from/to
List of flow definitions: We currently support UDP frame blasting and stateful TCP (HTTP) flows.
(optional) Reporting parameters
Test-specific parameters
A quick short reference for the structure:
{
"server": "<bb_server_name_or_ip:str>",
"meeting_point": "<bb_meeting_point_name_or_ip:str>",
"ports": [
{
"name": "<port_name:str>",
"interface": "<bb_interface_name:str>",
"uuid": "<endpoint_uuid:str>",
"ipv4": "<ipv4_address:str>|dhcp|true",
"netmask": "<ipv4_netmask:str>",
"gateway": "<ipv4_gateway:str>",
"nat": "<enable_nat_resolution:bool>",
"ipv6": "dhcp|slaac|true",
"port_group": [
"<port_group:str>"
]
}
],
"flows": [
{
"name": "<flow_name:str>",
"source": {
"port_group": [
"<source_group:str>"
]
},
"destination": {
"port_group": [
"<destination_group:str>"
]
},
"add_reverse_direction": "<add_reverse_direction_flow:bool>",
"type": "<flow_type:str>",
"ecn": "<ecn_code_point:str|int>",
"dscp": "<dscp_code_point:str|int>",
"initial_time_to_wait": "<initial_time_to_wait:float>"
}
],
"report": {
"html": "<enable_html_reporting:bool>",
"json": "<enable_json_reporting:bool>",
"junit_xml": "<enable_junit_xml_reporting:bool>"
},
"maximum_run_time": "<scenario_max_run_time:float>"
}
The current release supports UDP frame blasting and stateful TCP (HTTP) flows. Each type of flow has some additional specific parameters as follows:
UDP flow specific parameters
{
"frame_size": "<frame_size_without_crc:int>",
"bitrate": "<flow_bitrate:float>",
"frame_rate": "<flow_frame_rate:float>",
"duration": "<flow_duration:float>",
"number_of_frames": "<number_of_frames:float>",
"nat_keep_alive": "<activate_nat_keep_alive:bool>",
"analysis": {
"latency": "<enable_latency_analysis:bool>",
"max_loss_percentage": "<max_loss_percentage:float>",
"max_threshold_latency": "<max_threshold_latency:float>",
"quantile": "<quantile:float>"
}
}
TCP (HTTP) flow specific parameters
{
"tcp_server_port": "<tcp_server_port_number:int>",
"tcp_client_port": "<tcp_client_port_number:int>",
"duration": "<request_duration:float>",
"request_size": "<request_size:float>",
"maximum_bitrate": "<maximum_bitrate:float>",
"receive_window_scaling": "<receive_window_scaling:int>",
"slow_start_threshold": "<slow_start_threshold:int>",
"enable_l4s": "<enable_l4s:bool>"
}
JSON schema
The complete structure and documentation of the file is available in Configuration file JSON schema and documented below.
Test configuration parameters
https://api.byteblower.com/test-framework/json/cli-config-schema.json |
|
Root structure of the JSON configuration file for the ByteBlower Test Framework command-line interface. |
|
type |
object |
properties |
|
|
|
|
|
|
|
|
|
|
|
|
|
additionalProperties |
True |
ByteBlower server address
Host name or IP address of the ByteBlower Server. |
||
type |
string |
|
oneOf |
format |
hostname |
format |
ipv4 |
|
format |
ipv6 |
ByteBlower meeting point address
Host name or IP address of the ByteBlower meeting point. |
||
Added in version 1.2.0: Support for ByteBlower Endpoint. |
||
type |
string |
|
oneOf |
format |
hostname |
format |
ipv4 |
|
format |
ipv6 |
Port definitions
Flat list of ports. |
|
type |
array |
items |
Flow definition list
Flat list of flow definitions |
||
type |
array |
|
items |
oneOf |
|
Maximum run time
Maximum run time of the scenario in seconds |
|
type |
number |
minimum |
0 |
Report configuration parameters
type |
object |
|
properties |
||
|
Create HTML report |
|
Enable/Disable reporting in HTML format |
||
type |
boolean |
|
|
Create JSON report |
|
Enable/Disable reporting in JSON format |
||
type |
boolean |
|
|
Create JUnit XML report |
|
Enable/Disable reporting in JUnit XML format |
||
type |
boolean |
Port group
Definition of a port group |
|
type |
string |
Configuration parameters for a ByteBlower Port or Endpoint
Configuration parameters for a ByteBlower Port or Endpoint |
||||
type |
object |
|||
properties |
||||
|
Name of this ByteBlower traffic endpoint. |
|||
(a friendly name to identify this endpoint). |
||||
type |
string |
|||
|
List of port groups where this port belongs to. |
|||
Used to identify to which flows this port will be part of (either as source or destination). |
||||
type |
array |
|||
items |
||||
|
Name of the physical ByteBlower interface where this ByteBlower port is created. |
|||
ByteBlower Port only. Mutually exclusive with |
||||
type |
string |
|||
pattern |
^(nontrunk[-][0-9]+|trunk[-][0-9]+[-][0-9]+)$ |
|||
|
Device identifier of the ByteBlower Endpoint. |
|||
ByteBlower Endpoint only. Mutually exclusive with Note Using an Endpoint also requires the Added in version 1.2.0: Support for ByteBlower Endpoint. |
||||
type |
string |
|||
anyOf |
format |
uuid |
||
|
List of VLAN (stack) configurations. |
|||
Note Not supported by ByteBlower Endpoint. |
||||
type |
array |
|||
items |
||||
|
IPv4 addressing method |
|||
Enable IPv4 on this traffic endpoint. |
||||
Supports the following values:
Default: Note For ByteBlower Endpoint, you must specify either Changed in version 1.2.0: Support for ByteBlower Endpoint. |
||||
oneOf |
type |
string |
||
oneOf |
enum |
dhcp |
||
format |
ipv4 |
|||
type |
boolean |
|||
|
Netmask of the IPv4 network. |
|||
Default: Assigned by DHCP or Note
|
||||
type |
string |
|||
format |
ipv4 |
|||
|
(Default) Gateway of the IPv4 network. |
|||
Default: Assigned by DHCP or none for static IPv4 address configuration. Note
|
||||
type |
string |
|||
format |
ipv4 |
|||
|
Define whether this port is located behind a NAT gateway. |
|||
Defaults to Note Enabled by default for ByteBlower Endpoint. |
||||
type |
boolean |
|||
|
IPv6 addressing method |
|||
Enable IPv6 on this traffic endpoint. |
||||
Supports the following values:
Default: undefined. Note For ByteBlower Endpoint, you must specify either Changed in version 1.2.0: Support for ByteBlower Endpoint. |
||||
oneOf |
type |
string |
||
oneOf |
enum |
dhcp, slaac |
||
format |
ipv6 |
|||
type |
boolean |
VLAN (stack) configuration
type |
object |
|
properties |
||
|
VLAN protocol ID (TPID). |
|
Default value is:
Note Configuration of the VLAN protocol ID (TPID) requires ByteBlower Server version >= 2.20.0. |
||
type |
integer |
|
maximum |
65535 |
|
minimum |
0 |
|
|
VLAN ID (12-bit; 0-4095) |
|
type |
integer |
|
maximum |
4095 |
|
minimum |
0 |
|
|
3 bits defining the VLAN PCP bits. Default: 0 |
|
type |
integer |
|
maximum |
3 |
|
minimum |
0 |
|
|
1-bit flag. Default: 0 |
|
type |
integer |
|
maximum |
1 |
|
minimum |
0 |
Flow definition
type |
object |
||
properties |
|||
|
Name of this Flow, defaults to auto-generated name when set to |
||
type |
string |
||
|
Specifying the source of transmitted data for this flow |
||
type |
object |
||
properties |
|||
|
List of port groups specifying the transmitting ports |
||
type |
array |
||
items |
|||
additionalProperties |
False |
||
|
Specifying the destination for receiving data for this flow |
||
type |
object |
||
properties |
|||
|
List of port groups specifying the receiving ports |
||
type |
array |
||
items |
|||
additionalProperties |
False |
||
|
Type of the flow. Defines which specific flow parameters will be possible. |
||
type |
string |
||
enum |
frame_blasting, http |
||
|
IP ECN |
||
Explicit Congestion Notification code point. Defaults to |
|||
oneOf |
type |
integer |
|
maximum |
3 |
||
minimum |
0 |
||
type |
string |
||
|
IP DSCP |
||
Differentiated Services Code Point. Defaults to |
|||
oneOf |
type |
integer |
|
maximum |
63 |
||
minimum |
0 |
||
type |
string |
||
|
Enables adding a flow in the reverse direction of the original flow. |
||
The reverse flow uses the same configuration as the original.
Defaults to |
|||
type |
boolean |
||
|
Initial time to wait to start the flow in seconds. |
||
Defaults to 0 (start immediately) |
|||
type |
number |
||
minimum |
0 |
Frame blasting flow
Specific parameters for frame blasting flow. The |
|||
type |
object |
||
allOf |
|||
properties |
|||
|
Rate at which the bits are transmitted (in bits per second). |
||
Excludes the VLAN tag bytes (when applicable), mutual exclusive
with |
|||
type |
number |
||
exclusiveMinimum |
0 |
||
|
Frame size in Bytes without CRC, defaults to |
||
type |
integer |
||
minimum |
42 |
||
|
Rate at which the frames are transmitted (in frames per second). |
||
Mutual exclusive with |
|||
type |
number |
||
exclusiveMinimum |
0 |
||
|
Number of frames to transmit. |
||
Defaults to |
|||
type |
integer |
||
exclusiveMinimum |
0 |
||
|
Duration of the flow in seconds. |
||
Defaults to |
|||
type |
number |
||
exclusiveMinimum |
0 |
||
|
Enable a flow to keep Network Address (and Port) Translation (NAT/NAPT) entries alive. |
||
The direction will be from the endpoint behind a NAT/NAPT
gateway to the port at the public side of the NAT/NAPT gateway.
Defaults to We always enable the NAT/NAPT keep alive when the user asks for it, even when:
|
|||
type |
boolean |
||
|
Deprecated since version v1.2.0: Use |
||
type |
boolean |
||
|
Sets latency related analysis configuration parameters |
||
oneOf |
|||
HTTP flow parameters
Specific parameters for HTTP flow. The |
|||
type |
object |
||
allOf |
|||
properties |
|||
|
Port number of the TCP server, defaults to |
||
type |
integer |
||
maximum |
65535 |
||
minimum |
0 |
||
|
Port number of the TCP client, defaults to |
||
type |
integer |
||
maximum |
65535 |
||
minimum |
0 |
||
|
The time it takes for a TCP request to be completed. |
||
Mutual exclusive with |
|||
type |
number |
||
exclusiveMinimum |
0 |
||
|
The size of the TCP request packet in bytes. |
||
Mutual exclusive with |
|||
type |
integer |
||
exclusiveMinimum |
0 |
||
|
Limit the data traffic rate (in Bytes per second). |
||
Mutual exclusive with Deprecated since version 1.2.0: Deprecated |
|||
type |
number |
||
exclusiveMinimum |
0 |
||
|
Limit the data traffic rate (in bits per second). |
||
Mutual exclusive with Added in version 1.2.0: Added |
|||
type |
number |
||
exclusiveMinimum |
0 |
||
|
When given, enable receive window scaling with the given scale factor. |
||
Defaults to When ByteBlower Endpoints are involved, this setting will not be applied on them, but only on the HTTP Server on the ByteBlower Port. The ByteBlower Endpoint has no control over the TCP parameters of the host operating system’s. It is then up to the Endpoint’s host configuration whether this setting will be applicable or not. |
|||
type |
integer |
||
maximum |
12 |
||
minimum |
0 |
||
|
TCP Slow start threshold value. |
||
Defaults to When ByteBlower Endpoints are involved, this setting will not be applied on them, but only on the HTTP Server on the ByteBlower Port. The ByteBlower Endpoint has no control over the TCP parameters of the host operating system’s. It is then up to the Endpoint’s host configuration whether this setting will be applicable or not. |
|||
type |
integer |
||
maximum |
2147483647 |
||
minimum |
0 |
||
|
Activate TCP Prague congestion avoidance algorithm, and enables ECN analysis for Congestion Experienced (CE) codepoint count. |
||
Defaults to Note
Added in version 1.3.0: Add support for L4S HTTP flow |
|||
type |
boolean |
Frame loss analysis parameters
Specific frame loss analysis related parameters |
||
type |
object |
|
properties |
||
|
Maximum allowed frame/byte loss in %, defaults to |
|
type |
number |
|
maximum |
100 |
|
minimum |
0 |
Latency & frame loss analysis parameters
Specific latency & frame loss analysis related parameters |
||
type |
object |
|
properties |
||
|
Set to |
|
type |
boolean |
|
|
Maximum allowed frame/byte loss in %, defaults to |
|
type |
number |
|
maximum |
100 |
|
minimum |
0 |
|
|
Maximum latency threshold |
|
Maximum allowed latency in milliseconds, defaults to |
||
type |
number |
|
|
Quantile for which the latency must be less than the given maximum latency, defaults to |
|
type |
number |
|
maximum |
100 |
|
minimum |
0 |