Command-line interface

Installation

The installation of the ByteBlower Test Framework and its command-line interface is described in Installation & Quick start.

Define Test Scenario

To run a ByteBlower Test Framework test, 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 byteblower_test_framework.json:

Note

Make sure to update the example configuration to your actual test setup:

  • ByteBlower server host name or IP: server entry

  • ByteBlower Port configuration: interface and ipv4 / ipv6 / gateway / netmask / nat entries.

and for the Endpoint example, also change:

  • Meeting Point host name or IP: meeting_point entry

  • ByteBlower Endpoint configuration: uuid and ipv4 / 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.

  1. Go to the directory where you installed byteblower-test-framework in its virtual environment.

  2. Activate your virtual environment

On Windows systems using PowerShell:

cd ".\my-byteblower-workspace"
& ".\env\Scripts\activate.ps1"

Show command-line help

To get help for the command-line arguments:

byteblower-test-framework --help

Run a test with default input/output parameters

byteblower-test-framework

The command-line interface has the following default parameters:

Configuration file

byteblower_test_framework.json

Configuration file search path

. (current directory)

Report file path

. (current directory)

This means that, by default:

  • The configuration file (byteblower_test_framework.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
  • 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-framework --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.