Skip to content

excentis/examples-byteblower-test-framework.py

Repository files navigation

ByteBlower Test Framework - Examples

This repository contains example scripts using the ByteBlower Test Framework.

Each directory describes a specific use case.

Please feel free to look around and grasp for your needs!

Usage

Python requirements

The ByteBlower Test Framework currently supports Python version 3.7 up to 3.11.

Python virtual environment

  1. On Unix-based systems (Linux, WSL, macOS):

    Prepare Python virtual environment: Create the virtual environment and install/update pip and build.

    Note: Mind the leading . which means sourcing ./.venv/bin/activate.

    python3 -m venv --clear .venv
    . ./.venv/bin/activate
    pip install -U pip build

    Install the ByteBlower Test Framework and its dependencies

    . ./.venv/bin/activate
    pip install byteblower-test-framework
  2. On 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:

    PS C:> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

    See About Execution Policies for more information.

    Prepare Python virtual environment: Create the virtual environment and install/update pip and build.

    python3.8.exe -m venv --clear .venv
    & ".\.venv\Scripts\activate.ps1"
    python3.8.exe -m pip install -U pip build

    Install the ByteBlower Test Framework and its dependencies

    & ".\.venv\Scripts\activate.ps1"
    pip install byteblower-test-framework

Run the test

  1. Go to the example subdirectory directory

    cd <example-subdir>
  2. Make reports output directory

    mkdir reports
  3. Run the test script

    python <example_test>.py

Development

Create and initialize local Python virtual environment

  1. On Unix-based systems (Linux, WSL, macOS):

    Prepare Python virtual environment: Create the virtual environment and install/update pip and build.

    Note: Mind the leading . which means sourcing ./.venv/bin/activate.

    python3 -m venv --clear .venv
    . ./.venv/bin/activate
    pip install -U pip build

    Install the ByteBlower Test Framework and its dependencies, including development requirements.

    pip install byteblower-test-framework[dev,test,docs-dev]
  2. On Windows systems using PowerShell:

    Prepare Python virtual environment: Create the virtual environment and install/update pip and build.

    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:

    PS C:> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

    See About Execution Policies for more information.

    python3.8.exe -m venv --clear .venv
    & ".\.venv\Scripts\activate.ps1"
    python3.8.exe -m pip install -U pip build

    Install the ByteBlower Test Framework and its dependencies, including development requirements.

    pip install byteblower-test-framework[dev,test,docs-dev]