testcase-automaker
testcase-automaker can be used to create interface testcase with different params combo base on pairwise strategy.
Installation
pip install allpairspy
pip install testcase-automaker
Best practice
from testcase_automaker.interface.http_params_generator import http_params_generator
params_structure = {
'name': {
'type': 'string',
'value': '',
'range': ['张三', '李四'],
'iscompulsory': True
},
'phone': {
'type': 'number',
'value': '',
'iscompulsory': True
},
'claimant': {
'type': 'object',
'value': {
'name': {
'type': 'string',
'value': '',
'iscompulsory': True
},
'phone': {
'type': 'number',
'value': '',
'iscompulsory': True
}
},
'iscompulsory': True
},
'informations': {
'type': 'array',
'value': [{
'claimant': {
'type': 'object',
'value': {
'name': {
'type': 'string',
'value': '',
'iscompulsory': True
},
'phone': {
'type': 'number',
'value': '',
'iscompulsory': True
}
},
'iscompulsory': True
}
},
{
'name': {
'type': 'string',
'value': '',
'iscompulsory': True
}
}
],
'iscompulsory': True
}
}
if __name__ == '__main__':
params_generator = http_params_generator(parameters_structure=params_structure)
params_list = params_generator.generate_params_list()
print(params_generator.generated_params_list)
run the script then u may get output like this:
[{'name': '李四', 'phone': 15746159038, 'claimant': {'name': '华蔹绍', 'phone': 15698064521}, 'informations': [{'claimant': {'name': '齐檠', 'phone': 18912976530}}, {'name': '翟伽硝'}]}, {'name': '张三', 'phone': None, 'claimant': {'name': None, 'phone': None}, 'informations': [{'claimant': {'name': None, 'phone': None}}, {'name': '莫僖烹'}]}, {'name': '李四', 'phone': 18557203961, 'claimant': {'name': None, 'phone': 13736054179}, 'informations': [{'claimant': {'name': None, 'phone': 18810456792}}, {'name': None}]}, {'name': '李四', 'phone': None, 'claimant': {'name': '浦农', 'phone': None}, 'informations': [{'claimant': {'name': '阴桎煅', 'phone': None}}, {'name': None}]}, {'name': '张三', 'phone': None, 'claimant': {'name': None, 'phone': 18238590241}, 'informations': [{'claimant': {'name': '弓肓', 'phone': None}}, {'name': None}]}, {'name': '张三', 'phone': 18265714928, 'claimant': {'name': '昝胀噎', 'phone': None}, 'informations': [{'claimant': {'name': '应兰仓', 'phone': None}}, {'name': None}]}, {'name': '李四', 'phone': None, 'claimant': {'name': '毋羹', 'phone': None}, 'informations': [{'claimant': {'name': None, 'phone': 15701289735}}, {'name': None}]}]
Process finished with exit code 0
which is a list that contains the params combo base on pairwise and the given params structure
Contact me
For information and suggestions you can contact me at 523314409@qq.com
Metadata
Release files for testcase-automaker 1.0.8
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 |
|---|---|---|---|---|
| testcase-automaker-1.0.8.tar.gz | 8.7 kB | Without provenance | Details for testcase-automaker-1.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| testcase_automaker-1.0.8-py3-none-any.whl | Python 3 | none | any | Details for testcase_automaker-1.0.8-py3-none-any.whl |
Total release size: 30.6 kB
Release files / testcase-automaker-1.0.8.tar.gz
| Download URL | testcase-automaker-1.0.8.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59409709637aed112bfa20be004354f0b19f9d1c4a454bf1dbef5fabdff71aa3
|
|
BLAKE2b-256 checksum How to use checksums |
f0ada1dad3e43f7f5c72898cd84fda7d0e6e3a05760504c082af87bcc6830000
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.4.2 requests/2.20.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.5
|
Release files / testcase_automaker-1.0.8-py3-none-any.whl
| Download URL | testcase_automaker-1.0.8-py3-none-any.whl |
|---|---|
| Size | 21.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
245f9a0cf02d794c2394f5bd738066fea980c54b7a1a4b17b489fb6fb4734569
|
|
BLAKE2b-256 checksum How to use checksums |
53c1555415aad4bd68bdc5a4ac051a13be550572aa3d467b74e72ed4295a6599
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.4.2 requests/2.20.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.5
|
Security for testcase-automaker 1.0.8
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.