Automate end-to-end and exploratory testing
Project description
pyGATs
This library is in development process. API is not stabilized yet. It will be completely changed soon.
This is python3 library which combines power of pyautogui, opencv, tesseract, markdown and other staff to automate end-to-end and exploratory testing.
This library might be used to automate testing process with Xvbf and docker.
pyGATs depends on pyautogui, pytesseract, opencv and others. Please see section dependencies in pyproject.toml file.
How to test
python3 -m pytest
Linter
pylint $(git ls-files '*.py')
Build documentation
cd docs
make html
Example Usage
"""
Header: Description of test suites
"""
import pygats.pygats as pygats
import pygats.recog as recog
from pygats.formatters import MarkdownFormatter as MD
ctx = pygats.Context(formatter=MD(), timeout=0.5)
def test_function():
"""
Definition: definition of the test function
Actions:
1: action 1
2: action 2
3: ...
Expected: expected result
"""
pygats.run_action(ctx)
...
pygats.run_action(ctx, action_2_function)
...
...
test_suites = [
test_function,
...
]
if __name__ == '__main__':
pygats.run(ctx, test_suites)
As a result of executing the script, we get a report in Markdown format in the "output" directory
Usage features
Docstring of the document and the test functions are required attributes to get the required test report.
If you do not specify a docstring, the corresponding report entries will be replaced with standard entries.
Docstring must be in YAML format. Docstring may contain additional entries in this format, if necessary.
When writing a test function, it is necessary to have a docstring that has 3 key entries:
- Definition - definition of the test function, what it checks;
- Actions - a list of actions to perform the verification;
- Expected - expected result.
run_action()
function is required to print the description of the action before executing it. It can be used in 2 ways:
pygats.run_action(ctx)
, after which the steps of executing the action are performed;pygats.run_action(ctx, function, **kwargs)
. In this case, we pass a function containing the necessary steps. If it has additional arguments, we pass them separated by commas. The arguments must be named.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pygats-0.1.0.tar.gz
.
File metadata
- Download URL: pygats-0.1.0.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c944aeab4e4ad68359471f8ab017774a7610fe0d9b34feb240650b9d6bb97d73 |
|
MD5 | 5d30f769cc9b8f2e8280faf7f1b6d24f |
|
BLAKE2b-256 | 07e451cf564db7810ad5e48294a4bf7acfbe6cc2673a19837f118965127debb1 |
File details
Details for the file pyGATs-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pyGATs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d82faa3c056ba364b8d6cc2739056183829443bf9ac787aaf4e1a8f8f8793764 |
|
MD5 | ea449db71a2ae35578222fde0038f00f |
|
BLAKE2b-256 | 6aa0ff8f9fe036536d5d9c3bed84f84a83313383143bf6902555d94ea51ba163 |