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: 2024-04-18 21:48:51 UTC
README
TestBucket is a tool that aims to assist the testing process by generating functional test cases.
About
TestBucket is a tool aims to generate test cases from the definition of a specification in YAML notation. This specification aims to 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 of software tests 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.
Consider contributing to this project with code 🤓; or thoughts and ideas 🧐 !
Working on... 🛠️
- New data types
- New combiner algorithm
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