Skip to main content

Functional testing tool

Project description

Refery

Refery is a functional test tool written in Python

Install

$ ./setup.py install

Usage

$ refery --help
usage: refery [-h] --exec EXEC --test-file TEST_FILE

options:
  -h, --help            show this help message and exit
  --exec EXEC           path to the tested executable
  --test-file TEST_FILE
                        path to the yaml test file

As you can see, refery takes two mandatory parameters:

  • The path to an executable file
  • The path to a YAML file describing the test suite. The content of this file is described in the next section

Writing tests

Test suites are described in a YAML file. Each test case is a YAML mapping accepting the following optional keys:

  • arg: YAML sequence containing the arguments passed to the executable
  • stdin: String passed a standard output
  • ref: Path to an executable with the desired behaviour
  • stdout: Expected standard output
  • stderr: Expected standard error
  • exit_code: Expected exit code
  • stdout_mode | stderr_mode: The testing mode of the standard output and error. Can be of two kinds:
    • strict:The actual value shall be the same as the expected value. This is the default mode
    • exists: If the expected value is not empty, the actual value shall not be empty and reciprocally
  • skipped: Boolean equals to true if the test case shall be ignored

If the ref is specified, it is used to test the standard output, standard error and exit code. If any of these fields is specified, its value is used instead of the ref.

For example, take the following test case:

hello:
  ref: bin/hello.sh
  exit_code: 0

The stdout and stderr are tested according to bin/hello.sh but the exit code must be equal to 0, not matter what is actually returned by bin/hello.sh.

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

refery-1.0.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distributions

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

refery-1.0.0-py3.10.egg (18.5 kB view details)

Uploaded Egg

refery-1.0.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file refery-1.0.0.tar.gz.

File metadata

  • Download URL: refery-1.0.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for refery-1.0.0.tar.gz
Algorithm Hash digest
SHA256 45c4f828f3e427890fdd5b1a8906540d3f4587b279ed467303919535485c8c20
MD5 b989c4f32a33451c1b847b908821f5ff
BLAKE2b-256 e1258c4b17a690459adc4dce9edab621b83df0368eaff872cbba6af9db50096c

See more details on using hashes here.

File details

Details for the file refery-1.0.0-py3.10.egg.

File metadata

  • Download URL: refery-1.0.0-py3.10.egg
  • Upload date:
  • Size: 18.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for refery-1.0.0-py3.10.egg
Algorithm Hash digest
SHA256 1bd28f35363d067c1a6fe4d392bb515a64137b6d92d24474966fc8ee67bcf938
MD5 fc531c3104e96fdb919d7d5d0ac1e317
BLAKE2b-256 d8e4ef1000dfae4d6f09be729b2023ba1e88848e9a46de21b15dece8cf99bc1e

See more details on using hashes here.

File details

Details for the file refery-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: refery-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for refery-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b9def061a984900e015458f996401eb9a1e1bf720d954c9aaa0fba8ab1b360d
MD5 41ed156a79b38a5e3a68bd53b7a3d7f2
BLAKE2b-256 c335a1f74df596700848a4eeb50c78c919997b1b922b91bb17ea11cd97ae259e

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