utfuzz
utfuzz is a Python fuzzing engine, generating ready-to-use unit tests for both error and regression suites.
Prerequisites
utfuzz supports Python 3.8–3.11.
utfuzz depends on Java 17 and newer. If you do not have Java installed, utfuzz will install it, or your can do it
manually using these instructions:
Installation
-
Install from archive:
- Download utfuzz.tar.gz
- Run:
python -m pip install utfuzz.tar.gz
-
Install from GitLab repository:
python -m pip install git+https://gitlab.com/tamarinvs19/utfuzz
-
Install from source code:
git clone https://gitlab.com/tamarinvs19/utfuzz cd utfuzz python -m pip install ./
Usage
You can run utfuzz in one of three modes:
- dialogue mode (default)
- config file mode
- CLI arguments mode
Upon each test generation, settings are saved to the utfuzz_config.json file.
Generate tests in a dialogue mode
By default, utfuzz runs in a dialogue mode. You can use prompts and configure test generation, or stick to default options:
python -m utfuzz
or
utfuzz
The resulting tests appear in the autogenerated utfuzz_tests folder by default.
Generate tests using CLI options
Turn off the dialogue mode with –-skip-dialog and specify the necessary options, for example:
python -m utfuzz –-skip-dialog -o /mnt/c/Users/username/uftests
Generate tests using a configuration file
Edit the utfuzz_config.json file and enable the --use-config-file option:
python -m utfuzz --use-config-file
Run tests
Run the generated tests as the usual unittest ones.
Options
usage: utfuzz [-h] [--skip-dialog] [--use-config-file] [--generate-only-error-suite]
[-j JAVA] [-t TIMEOUT] [-p PROJECT_DIR] [-o OUTPUT_DIR] [--sys-paths [SYS_PATHS ...]]
[--analyze-targets [ANALYZE_TARGETS ...]] [--requirements-file REQUIREMENTS_FILE] [--debug]
utfuzz is a Python fuzzing engine, generating ready-to-use unit tests for both error and regression suites.
options:
-h, --help show this help message and exit
--skip-dialog do not ask for options interactively
--use-config-file use config file from current directory
--generate-only-error-suite
generate only error suite
-j JAVA, --java JAVA path to Java executable file or JAVA_HOME
-t TIMEOUT, --timeout TIMEOUT
timeout in seconds for generating tests per class or group of top-level functions from one file
-p PROJECT_DIR, --project-dir PROJECT_DIR
root directory with code under test (used for imports and dependency resolving)
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
directory for generated tests
--sys-paths [SYS_PATHS ...]
additional path to find imports (will be added to `sys.path`; default = project directory)
--analyze-targets [ANALYZE_TARGETS ...]
list of files or directories to test; empty value field means <<test all>>
--requirements-file REQUIREMENTS_FILE
path to requirements.txt
--debug use debug mode
utfuzz has the UnitTestBot fuzzing engine inside. To change the version of the UnitTestBot source,
replace it with the necessary utfuzz/utbot-cli-python.jar file (do not change the file name).
Upon replacing, remember to reinstall this module.
For more information, see the UnitTestBot website and the related GitHub repository.
Metadata
Release files for utfuzz 0.1.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| utfuzz-0.1.14.tar.gz | 36.4 MB | Without provenance | Details for utfuzz-0.1.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| utfuzz-0.1.14-py3-none-any.whl | Python 3 | none | any | Details for utfuzz-0.1.14-py3-none-any.whl |
Total release size: 72.9 MB
Release files / utfuzz-0.1.14.tar.gz
| Download URL | utfuzz-0.1.14.tar.gz |
|---|---|
| Size | 36.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0c860cbb5c263b6dc440eaf28b2cfa01532c7b271efd9de91fba20ae8b8c5ee
|
|
BLAKE2b-256 checksum How to use checksums |
517023f5d96af285af2712b1d3b84f1c3a87caaff99c50689dc6a8169caff14a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.5 Linux/6.5.8-arch1-1
|
Release files / utfuzz-0.1.14-py3-none-any.whl
| Download URL | utfuzz-0.1.14-py3-none-any.whl |
|---|---|
| Size | 36.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf248ca17b2bfe649ab0d6bd4fdfb8e31391e68f8491af3f8d105b8221282954
|
|
BLAKE2b-256 checksum How to use checksums |
66b447e19d61dd3b4b38b12d5f255c21dabc43258ac1cdd5b1ddbd5fce5c7f01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.5 Linux/6.5.8-arch1-1
|
Security for utfuzz 0.1.14
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.