Skip to main content

pybbt: Python Black Box Testing Tool

pybbt is a Python-based tool that simplifies black box testing of software. It provides a range of auxiliary functions and the ability to filter test cases, making your testing process more efficient and manageable.

Projects Tested with pybbt

  • Tair: Tair is a Redis-compatible in-memory database service that provides a variety of data structures and enterprise-level capabilities, such as Global Distributed Cache, data flashback, and Transparent Data Encryption (TDE).
  • RedisShake: RedisShake is a tool for data migration between Redis instances.

Features

  • Test Case Execution: Run individual or multiple test cases in a directory or subdirectories.
  • Test Case Filtering: Filter test cases using tags. This allows for more targeted testing based on specific conditions.
  • Flag Passing: Pass flags to the test cases for more flexible testing.
  • Error Management: Choose to continue running all cases even if some fail.
  • Verbose Logging: Toggle verbose logging to see all logs for detailed debugging.
  • Parallel Execution: Run test cases in parallel to save time.

Installation (coming soon)

pybbt requires Python 3.9 or later. You can install pybbt using pip:

pip install pybbt

Run the following command to test the installation:

pybbt -h

Usage

Here are some examples of how to use pybbt:

usage: pybbt [-h] [--filter FILTER] [--flags FLAGS [FLAGS ...]] [--parallel PARALLEL] [--start-from START_FROM] [--dont-stop] [--verbose] file_or_dir

Python Black Box Test

positional arguments:
  file_or_dir           test file path or directory path of test cases

optional arguments:
  -h, --help            show this help message and exit
  --filter FILTER       filter the test cases
  --flags FLAGS [FLAGS ...]
                        flags that can be obtained through pybbt.get_flags() in the code
  --parallel PARALLEL   run cases in parallel
  --start-from START_FROM
                        start from the case, example: --start-from cases/test/test0.py
  --dont-stop           wont stop when error occurs
  --verbose             show all the log

Example:
# simple usage
pybbt cases/test/test0.py   # run test0.py
pybbt cases/test/           # run all the test cases in test/
pybbt cases/                # run all the test cases in cases/ and sub directories
# filter
pybbt cases/ --filter tag0                                      # run all the test cases with tag0
pybbt cases/ --filter "not tag0"                                # run all the test cases without tag0
pybbt cases/ --filter "tag0 and tag1"                           # run all the test cases with tag0 and tag1
pybbt cases/ --filter "tag0 or tag1"                            # run cases that contain tag0 or tag1
pybbt cases/ --filter "not (tag0 or tag1)"                      # equivalent to "not tag0 and not tag1"
pybbt cases/ --filter "not (tag0 and tag1)"                     # equivalent to "not tag0 or not tag1"
pybbt cases/ --filter "(tag0 or tag1) and not (tag2 or tag3)"   # equivalent to "(tag0 or tag1) and not tag2 and not tag3"
# other options
pybbt cases/ --flags flag0 flag1    # pass flags0 and flags1 to the test cases
pybbt cases/ --dont-stop            # run all the cases even if some of them fail
pybbt cases/ --verbose              # show all the log

Feel free to experiment with different combinations of options to suit your testing needs.

Contributing

Your contributions are highly appreciated! If you have ideas on how to improve pybbt or want to help enhance its features, please feel free to submit a Pull Request.

To test your modifications, execute the following commands in the project's root directory:

python -m build  # You may need to install 'build' first: pip install build
pip install --force-reinstall dist/pybbt-x.y.z-py3-none-any.whl  # Replace 'dist/pybbt-x.y.z-py3-none-any.whl' with the correct file name

Metadata

Release files for pybbt 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybbt 1.0.1
File Size Uploaded Provenance
pybbt-1.0.1.tar.gz 16.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pybbt 1.0.1
File Interpreter ABI Platform
pybbt-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 40.4 kB

Release files / pybbt-1.0.1.tar.gz

Download URL pybbt-1.0.1.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0915157a4b4aeb6acb493dbcdc3a0795c78c4a97e4b1e3de0c32e752c30c7d5a
BLAKE2b-256 checksum
How to use checksums
0d837dedbe40efeac04ab4d04ac330f035b0ccb078c999977d536cbc029a9576
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.1

Release files / pybbt-1.0.1-py3-none-any.whl

Download URL pybbt-1.0.1-py3-none-any.whl
Size 23.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0b29e7c77511dca840bd6e3c0ba50e27b93db1b7afec07deb8402bbf64d715b
BLAKE2b-256 checksum
How to use checksums
626eb349a87ca58659064d951d67136a67ee2d82c4f5b7f1ebafbd8b7a45f993
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.1

Security for pybbt 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page