Command-line interface
Installation
The installation of the TR-398 Airtime Fairness test case and its command-line interface is described in Installation & Quick start.
Define Test Scenario
To run the ByteBlower TR-398 Airtime Fairness 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 tr_398.json:
- Using ByteBlower Endpoint 
Note
Make sure to update the example configuration to your actual test setup:
- ByteBlower server host name or IP: - serverentry
- ByteBlower Port configuration: - interfaceand- ipv4/- ipv6/- gateway/- netmask/- natentries.
and for the Endpoint example, also change:
- Meeting Point host name or IP: - meeting_pointentry
- ByteBlower Endpoint configuration: - uuidand- ipv4/- ipv6entries.
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-tr-398 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-tr-398-airtime-fairness --help
python -m byteblower.test_cases.tr_398 --help
Run a test with default input/output parameters
byteblower-test-cases-tr-398-airtime-fairness
python -m byteblower.test_cases.tr_398
The command-line interface has the following default parameters:
- Configuration file
- tr_398.json
- Configuration file search path
- .(current directory)
- Report file path
- .(current directory)
This means that, by default:
- The configuration file ( - tr_398.json) will be loaded from the current directory
- The 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-tr-398-airtime-fairness --config-file my_test_config.json --report-path reports
python -m byteblower.test_cases.tr_398 --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.