Skip to main content

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.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybbt-1.0.1.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

pybbt-1.0.1-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file pybbt-1.0.1.tar.gz.

File metadata

  • Download URL: pybbt-1.0.1.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.1

File hashes

Hashes for pybbt-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0915157a4b4aeb6acb493dbcdc3a0795c78c4a97e4b1e3de0c32e752c30c7d5a
MD5 8ed1ff781a612c8bfa47e28fc8582322
BLAKE2b-256 0d837dedbe40efeac04ab4d04ac330f035b0ccb078c999977d536cbc029a9576

See more details on using hashes here.

File details

Details for the file pybbt-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pybbt-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.1

File hashes

Hashes for pybbt-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0b29e7c77511dca840bd6e3c0ba50e27b93db1b7afec07deb8402bbf64d715b
MD5 2113e57bd55762c3a0ee412b98690a60
BLAKE2b-256 626eb349a87ca58659064d951d67136a67ee2d82c4f5b7f1ebafbd8b7a45f993

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page