Package: byteblower-test-cases-rfc-2544
IntroductionThis package contains an implementation of theRFC 2544Throughput
Test using theByteBlower Test Framework.A throughput test aims to measure, under given circumstances,
the highest throughput the DUT can handle correctly without exceeding a given
threshold of frame loss (theoretically, this threshold is 0).This ByteBlower RFC 2544 throughput test case allows you to:Run throughput tests based on RFC 2544Collect & Analyse statisticsGenerate HTML & JSON reportsFor more detailed documentation, please have a look
atTest Case: RFC 2544 Throughputin the ByteBlower API documentation.InstallationRequirementsByteBlower Test Framework: ByteBlower ® is a traffic
generator/analyser system for TCP/IP networks.Highcharts-excentis: Used for generating graphsjinja2: To create HTML reportsPrepare runtime environmentWe recommend managing the runtime environment in a Python virtual
environment. This guarantees proper separation of the system-wide
installed Python and pip packages.PythonThe ByteBlower Test Framework currently supports Python versions
3.7 up to 3.11.Important: Working directoryAll the following sections expect that you first moved to your working
directory where you want to run this project. You may also want to create
your configuration files under a sub-directory of your choice.On Unix-based systems (Linux, WSL, macOS):cd'/path/to/working/directory'On Windows systems using PowerShell:cd'c:\path\to\working\directory'Python virtual environmentMake sure to use the right Python version (>= 3.7, <= 3.11),
list all Python versions installed in your machine by running:On Windows systems using PowerShell:py--listIf no Python version is in the required range, you can download and install
Python 3.7 or above using your system package manager
or fromhttps://www.python.org/ftp/python.Prepare Python virtual environment: Create the virtual environment
and install/updatepipandbuild.On Unix-based systems (Linux, WSL, macOS):Note:Mind the leading.which meanssourcing./env/bin/activate.python3-mvenv--clearenv../env/bin/activatepipinstall-UpipbuildOn Windows systems using PowerShell:Note: On Microsoft Windows, it may be required to enable the
Activate.ps1 script by setting the execution policy for the user.
You can do this by issuing the following PowerShell command:PSC:>Set-ExecutionPolicy-ExecutionPolicyRemoteSigned-ScopeCurrentUserSeeAbout Execution Policiesfor more information.Make sure to specify the python version you’re using.
For example, for Python 3.8:py-3.8-mvenv--clearenv&".\env\Scripts\activate.ps1"python-mpipinstall-UpipbuildTo install the ByteBlower RFC 2544 throughput test case and its dependencies,
first make sure that you have activated your virtual environment:On Unix-based systems (Linux, WSL, macOS):../env/bin/activateOn Windows systems using PowerShell:./env/Scripts/activate.ps1Then, run:pipinstall-Ubyteblower-test-cases-rfc-2544Quick startCommand-line interfaceAfter providing the appropriate test setup and frame configurations,
the test script can be run either as python module or as a command-line script.For example (to get help for the command-line arguments):As a python module:# To get help for the command-line arguments:python-mbyteblower.test_case.rfc_2544--helpAs a command-line script:# To get help for the command-line arguments:byteblower-test-cases-rfc-2544-throughput--helpFor a quick start, you can run a simple test using the JSON configuration of
one of the example files below:UsingByteBlower Ports scenarioUsingByteBlower Endpoint scenarioSave you configuration in your working directory asrfc_2544.json.
Make sure you change the"server"and"ports"configuration
according to the setup you want to run your test on.More detailed documentation is available in theConfiguration filesection
of the documentation.Therfc_2544.jsoncan be used then to run the test in the
command line interface using the following commands:Note:The reports will be stored under a subdirectoryreports/.On Unix-based systems (Linux, WSL, macOS):# Optional: create rfc_2544.json, then copy the configuration to ittouchrfc_2544.json# Create reports folder to store HTML/JSON filesmkdirreports# Run testbyteblower-test-cases-rfc-2544-throughput--report-pathreportsOn Windows systems using PowerShell:# Optional: create rfc_2544.json, then copy the configuration to itNew-Itemrfc_2544.json# Create reports folder to store HTML/JSON filesmdreports# Run testbyteblower-test-cases-rfc-2544-throughput--report-pathreportsIntegratedfrombyteblower.test_case.rfc_2544importrun# Defining test configuration, report path and report file name prefix:test_config={}# Here you should provide your test setup + frame(s') configuration(s)report_path='my-output-folder'# Optional: provide the path to the output folder, defaults to the current working directoryreport_prefix='my-dut-feature-test'# Optional: provide prefix of the output files, defaults to 'report'# Run the RFC 2544 throughput test:run(test_config,report_path=report_path,report_prefix=report_prefix)