Command-line interface
Installation
The installation of the RFC 2544 throughput test case and its command-line interface is described in Installation & Quick start.
Define Test Scenario
To run the ByteBlower RFC 2544 throughput test case, you need to define
a traffic test scenario. This is stored in a file in JSON
format.
Either start from one of our basic examples.
Copy it to your working directory as rfc_2544.json
:
Using ByteBlower Ports
Using ByteBlower Endpoint
Note
Make sure to update the example configuration to your actual test setup:
ByteBlower server host name or IP:
server
entryByteBlower Port configuration:
interface
andipv4
/ipv6
/gateway
/netmask
/nat
entries.
and for the Endpoint example, also change:
Meeting Point host name or IP:
meeting_point
entryByteBlower Endpoint configuration:
uuid
andipv4
/ipv6
entries.
Or create your own:
Take a look at Test scenario definition for all detailed information about describing a traffic test scenario.
Usage
The traffic test scenario can be run via command-line interface, either as a script or Python module.
Prepare Python virtual environment
Make sure that you have activated your virtual environment before using the command-line interface.
Go to the directory where you installed byteblower-test-cases-rfc-2544 in its virtual environment.
Activate your virtual environment
On Windows systems using PowerShell:
cd ".\my-byteblower-workspace"
& ".\.venv\Scripts\activate.ps1"
On Unix-based systems (Linux, WSL, macOS):
cd ./my-byteblower-workspace
. ./.venv/bin/activate
Show command-line help
To get help for the command-line arguments:
byteblower-test-cases-rfc-2544-throughput --help
python -m byteblower.test_cases.rfc_2544 --help
Run a test with default input/output parameters
byteblower-test-cases-rfc-2544-throughput
python -m byteblower.test_cases.rfc_2544
The command-line interface has the following default parameters:
- Configuration file
rfc_2544.json
- Configuration file search path
.
(current directory)- Report file path
.
(current directory)
This means that, by default:
The configuration file (
rfc_2544.json
) will be loaded from the current directoryThe resulting reports will also be saved into the current directory.
Run a test with given input/output parameters
Create a subdirectory reports
to store the output report files:
On Windows systems using PowerShell:
# Create reports folder to store HTML/JSON files
md reports
On Unix-based systems (Linux, WSL, macOS):
# Create reports folder to store HTML/JSON files
mkdir reports
Specify a different config file
Specify the subdirectory to store the reports to
Note
When the config file is an absolute path to the file, then the config path (
--config-path <config_path>
) is ignored.
byteblower-test-cases-rfc-2544-throughput --config-file my_test_config.json --report-path reports
python -m byteblower.test_cases.rfc_2544 --config-file my_test_config.json --report-path reports
Define your own test scenario
Have a look at Test scenario definition for a complete overview of the configuration format.