Skip to main content

Automate end-to-end and exploratory testing

Project description

pyGATs

Pylint Python package Upload Python Package

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygats-0.2.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygats-0.2.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file pygats-0.2.0.tar.gz.

File metadata

  • Download URL: pygats-0.2.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for pygats-0.2.0.tar.gz
Algorithm Hash digest
SHA256 61ad899e6ca8d0928d3ee2e9ce4b54f67bc9d2d5f6c91687a0c6cc2a2822eec4
MD5 181267c427ef06531edb4c7e26f7ffc5
BLAKE2b-256 f9d646dc7afc98f62b82d7bab3f9a0cb2d77c02c551ace1cb0559a57535fa160

See more details on using hashes here.

File details

Details for the file pygats-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pygats-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for pygats-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b331e5bff0413406fba6ea9aba4f87733db712ee4dc8450133cfa4fbcbcb206e
MD5 afdc4a0306773e8940c529594903a609
BLAKE2b-256 fda2a98965385a55ae6062bad8bddc48fa6a3a87c477ab974500dfc8819b3185

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page