Command-line interface
Installation
The installation of the MULPIv4 LL-04.40 Part 1 test case and its command-line interface is described in Installation & Quick start.
Define Test Scenario
To run the ByteBlower MULPIv4 LL-04.40 Part 1 test case, you need to define
a traffic test scenario. This is stored in a file in JSON format.
Either start from our basic example.
Copy it to your working directory as part1.json:
Using ByteBlower Ports
Note
Make sure to update the example configuration to your actual test setup:
ByteBlower server host name or IP:
serverentryByteBlower Port configuration:
interfaceandipv4/ipv6/gateway/netmask/natentries.
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.
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-docsis-atp 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-docsis-atp-mulpi-v4-0-ll-04-40-part1 --help
python -m byteblower.test_cases.docsis_atp.mulpi_v4_0.ll_04_40.part1 --help
Run a test with default input/output parameters
byteblower-test-cases-docsis-atp-mulpi-v4-0-ll-04-40-part1
python -m byteblower.test_cases.docsis_atp.mulpi_v4_0.ll_04_40.part1
The command-line interface has the following default parameters:
- Configuration file
part1.json- Configuration file search path
.(current directory)- Report file path
.(current directory)
This means that, by default:
The configuration file (
part1.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-docsis-atp-mulpi-v4-0-ll-04-40-part1 --config-file my_test_config.json --report-path reports
python -m byteblower.test_cases.docsis_atp.mulpi_v4_0.ll_04_40.part1 --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.