testbucket / testbucket
A tool to generate test cases
Requires
- php: ^7.2
- ext-ds: *
- squizlabs/php_codesniffer: 3.5.4
- symfony/console: v4.4.7
- symfony/dotenv: v4.4.7
- symfony/phpunit-bridge: v4.4.7
- symfony/yaml: v4.4.7
Requires (Dev)
- phpunit/phpunit: 7.5.14
This package is auto-updated.
Last update: 2025-06-10 01:06:18 UTC
README
TestBucket is a tool that aims to assist the testing process by generating functional test cases.
About
TestBucket aims to generate test cases based on specification using YAML notation. The specification determine input domains and correlation between fields in a form.
Once we have a specification in a concrete and not subjective way, we can apply several known techniques to generate test cases. The scope of this project is limited, for now, to generate integrated tests not having a direct relationship with the application code, but with the specification.
Write an yaml specification with all you expect and the testbucket will generate all other cases for you!
Contribute!
Consider contributing to this project!
We are working on an official channel, until then make a comment or open an issue to interact.
Project Steps
Check out the development stages of this project:
phases | Status |
---|---|
Config Loader | Done |
Combine engine | Don |
Range data types | Done |
API | Pending |
Docker pipeline | Pending |
Types (text, dates, others) | Pending |
Official Documentation | Pending |
Running the development environment
Useful commands:
# build image make build # run all tests make test # run dev environment make run # stop dev environment make stop
Data Types
Range Types:
type | Description | Status |
---|---|---|
integer:range | (...) | Done |
float:range | (...) | Pending |
date:range | (...) | Pending |
Static Types:
type | Description | Status |
---|---|---|
string:static | (...) | Pending |
boolean:static | (...) | Pending |
YAML Specification
version: 1.0 group: UserForm properties: - name: name type: static value: ["bob", "alice"] - name: surname type: static value: ["red", "green"]
Execute using container:
docker run -it --rm --name testbucket-run -v "$PWD":/tmp testbucket ./testbucket testbucket:process --spec=/tmp/test.yaml --output=/tmp
Expected Data
Each line is a json object that defines a TestCase
with properties and if its valid or not, and all values are encoded in base64.
This example only shows valid test cases: is_valid=true
{"group_name":"UserForm","properties":{"name":"Ym9i","surname":"cmVk"},"is_valid":true}
{"group_name":"UserForm","properties":{"name":"Ym9i","surname":"Z3JlZW4="},"is_valid":true}
{"group_name":"UserForm","properties":{"name":"YWxpY2U=","surname":"cmVk"},"is_valid":true}
{"group_name":"UserForm","properties":{"name":"YWxpY2U=","surname":"Z3JlZW4="},"is_valid":true}
Contribute:
If you want to contribute to this project, see the guidelines