Skip to main content

Abstract

The ePyUnit package provides extensions for the integrated Testautomation and Debugging of executables and scipts as subprocesses.

Technically ePyUnit provides extensions for the PyUnit and PyDev/Eclipse frameworks for blackbox tests and seamless integrated debugging of executables and scripts including nested calls of subprocesses. The standard frameworks, libraries and IDEs provide components as presented by the following figure.:

.                                 :
   +----------------+             :       +---------------------------+
   |    unittest    |             :       |  scripts and executables  |
   +---+------------+---+         :       +---+-----------------------+---+
       |   automation   |         :           |       debugging           |
       +----------------+         :           +---------------------------+
.                                 :

These are extended by framework features for the seamless cross-process integration of scripts and programs.:

.
+------------------------------+       +-----------------------------+
|   automation and unittest    |       |   seamless cross-process    |
|        for arbitrary         | <---> |          debugging          |
|   scripts and executables    |       |                             |
+------------------------------+       +-----------------------------+

|<---                     seamless integration                   --->|
.

The included automation extension for the PyDev/Eclipse based debugging of – local and remote – Python subprocesses provides simplified support of detailed error analysis in case of test failures.

Blueprint

The ‘ePyUnit’ package provides a minimal but sufficient approach in particular for the low-effort test automation of scripts and tools suitable for operations of large scale application tests as well as for daily and advanced DevOps tasks.

  • ePyUnit encapsulates processes and relies on PyUnit for commandline based unit and regression tests. The main focus is general blackbox testing of executables, for Python in addition the automation of PyDev debugging is included , see ‘https://pythonhosted.org/epyunit/call_integration.html’.

  • ePyUnit integrates into PyDev for the support of the graphical Eclipse IDE of unit testing and integrated graphical debugging, this is also supported for external processes started independently from the commandline, see ‘https://pythonhosted.org/epyunit/pydevd_integration.html’.

The ePyUnit components call the wrapped process and read the execution results from STDOUT, STDERR, and the exit value. The values are cached by Python variables either for further processing, or optional pass-through to the caller.

The architecture is based on the packages ‘PyUnit’ and ‘PyDev’:

                   +-----------------------+     call      +-----------------------+
                   |                       |    ------>    |                       |
Subprocess         |        ePyUnit        |               |  Wrapped-Executable   |
                   |                       |    <-----     |                       |
                   +-----------------------+     stdin     +-----------------------+
                               |                 stderr                |
                               |                 exit                  V
                               |                           +-----------------------+
PyDev Remote                   |                           |        PyDevRDC       |   Debug into
Debug Server                   |                           +-----------------------+   subprocess
                               |                                       |
               . . . . . . . . | . . . . . . . . . . . . . . . . . . . | . . . . . . . .
                               |                                       |
                               V                                       V
                   +-----------------------+               +-----------------------+
Python Units       |         PyUnit        |     <--->     |         PyDev         |
                   +-----------------------+               +-----------------------+
                       |               |                              |
                       V               V                             /
                 +-----------+   +-----------+                      /
IDE              |    CLI    |   |  Eclipse  |<--------------------/
                 +-----------+   +-----------+

The test components collect internally the data of multiple output sources and decide based on the selection of the user parameters whether the test was successful or has failed. Therefore a similar approach to Fuzzy-Logic is applied on mixed results consisting of partial failures and success. The provided scenarios are single level subprocesses:

+----------------+      +------------+
| Python-Process | <--> | Subprocess |
+----------------+      +------------+

and nested multilevel scripts and executables as subprocesses:

+----------------+      +------------+            +------------+
| Python-Process | <--> | Subprocess | <- ... --> | Subprocess |
+----------------+      +------------+            +------------+

Where each level of subprocesses could start an arbitrary number of local and remote subprocesses itself, and either correlate or pass-through the results. Due to some bugfixes the backport from Python3.x subprocess32 is optionally supported when present.

The provided package comprises functional atoms for various UseCases, as well as extension classes for the ‘unittest’ package to be used in combination with PyUnit and PyDev..

The ‘epyunit’ package provides in particular:

  • Support for unit tests of shell scripts - bash - from command line and Eclipse/PyDev

  • The simplified reuse of executables as test-dummies within multiple test cases.

  • The categorization of structures defined by the directory tree.

  • The support of arbitrary intermixed implementation languages for executables.

The implementation supports Python(>=2.7) and integrates into the Eclipse IDE with PyDev, and PyUnit.

The package ‘epyunit’ is a spin off from the project ‘UnifiedSessionsManager-2.0’.

For examples and patterns see subdirectories:

  • UseCases

  • tests

Downloads:

Online documentation:

setup.py

The installer adds a few options to the standard setuptools options.

  • build_doc: Creates the integrated documentation for runtime systems including API in ‘epyunit/build/apidoc/epyunit’.

  • install_doc: Installs documents into source project ‘epyunit/doc’, and the ‘HOME’ or ‘AppData’.

  • build_sphinx: Creates documentation for runtime system by Sphinx, html only. Calls ‘callDocSphinx.sh’.

  • build_epydoc: Creates documentation for runtime system by Epydoc, html only. Calls ‘callDocEpydoc.sh’.

  • test: Runs PyUnit tests by discovery.

  • –help-epyunit: Displays this help.

  • –no-install-required: Suppresses installation dependency checks, requires appropriate PYTHONPATH.

  • –offline: Sets online dependencies to offline, or ignores online dependencies.

  • –exit: Exit ‘setup.py’.

After successful installation the ‘selftest’ verifies basic checks by:

epyunit –selftest

with the exit value ‘0’ when OK.

The option ‘-v’ raises the degree of verbosity for inspection

epyunit –selftest -v -v -v -v

Project Data

  • PROJECT: ‘epyunit’

  • MISSION: Extend the standard PyUnit package for arbitrary ExecUnits.

  • VERSION: 00.02

  • RELEASE: 00.02

  • NICKNAME: ‘Dromi’

  • STATUS: alpha

  • AUTHOR: Arno-Can Uestuensoez

  • COPYRIGHT: Copyright (C) 2010,2011,2015-2016 Arno-Can Uestuensoez @Ingenieurbuero Arno-Can Uestuensoez

  • LICENSE: Artistic-License-2.0 + Forced-Fairplay-Constraints Refer to enclose documents:

    • ArtisticLicense20.html - for base license: Artistic-License-2.0

    • licenses-amendments.txt - for amendments: Forced-Fairplay-Constraints

Versions and Releases

Planned Releases:

  • RELEASE: 00.00.00x - Pre-Alpha: Extraction of the features from hard-coded application into a reusable package.

  • RELEASE: 00.01.00x - Alpha: Completion of basic features.

  • RELEASE: 00.02.00x - Alpha: Completion of features, stable interface.

  • RELEASE: 00.03.00x - Beta: Accomplish test cases for medium to high complexity.

  • RELEASE: 00.04.00x - Production: First production release. Estimated number of UnitTests := 1000.

  • RELEASE: 00.05.00x - Production: Various performance enhancements.

  • RELEASE: 00.06.00x - Production: Security review.

  • RELEASE: > - Production: Stable and compatible continued development.

Current Release: 00.02.005 - Alpha:

This is a nightly-build, next following soon. Major Changes:

  • Document fixes.

  • Fixed option processing of selftest.

  • Additions to epyunit.Systemcalls for Subprocess class, fixes ‘virtualenv’ in subprocess.

  • Added optional support for subprocess32.

  • Added non-blocking read of STDOUT and STDERR of subprocess.

Current test status:

ATTENTION: Some of the tests involve the remote debug feature of PyDev/Eclipse,

thus require a running local RemoteDebugServer, see manuals.

  • UnitTests: >600(CLI)/700(Eclipse)

  • Use-Cases as UnitTests: >140

Total: >800

nn

Download files

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

Source Distribution

epyunit-0.2.5.tar.gz (3.5 MB view details)

Uploaded Source

Built Distributions

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

epyunit-0.2.5.linux-x86_64.tar.gz (92.9 kB view details)

Uploaded Source

epyunit-0.2.5.linux-x86_64.exe (136.7 kB view details)

Uploaded Source

epyunit-0.2.5-1.src.rpm (3.1 MB view details)

Uploaded Source

epyunit-0.2.5-1.noarch.rpm (87.3 kB view details)

Uploaded Source

File details

Details for the file epyunit-0.2.5.tar.gz.

File metadata

  • Download URL: epyunit-0.2.5.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for epyunit-0.2.5.tar.gz
Algorithm Hash digest
SHA256 2e2659e04612f0e95077b1c3d72e5ef6e686aec7f4a3e7c3694e1d29bf7416bd
MD5 2a8066ffc763ef927d5054ddfc88f77f
BLAKE2b-256 924579a4c830de643dcba387791a9155c433a1ca805744dd9688a341a297380b

See more details on using hashes here.

File details

Details for the file epyunit-0.2.5.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for epyunit-0.2.5.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 393a0dfc2ad9f3404a885cc51b88a58bc64c1a99f17a4020d7b194db73de50be
MD5 a0555bcb6ffa499d358b5d19331321a2
BLAKE2b-256 1fac3dd7741d714ca69692a330751caae8da3d341bd46fcba1e061592fc076c5

See more details on using hashes here.

File details

Details for the file epyunit-0.2.5.linux-x86_64.exe.

File metadata

File hashes

Hashes for epyunit-0.2.5.linux-x86_64.exe
Algorithm Hash digest
SHA256 b9eaa42ce12c2852042b42312778e09511845d7f80a56a4cf894ada7f43768f9
MD5 d418842e5982815b15e7df1341a6c0ae
BLAKE2b-256 bf44b24597f1aca6f3f6e54377e0bf0115f049576362408b82ab658d90757c87

See more details on using hashes here.

File details

Details for the file epyunit-0.2.5-1.src.rpm.

File metadata

  • Download URL: epyunit-0.2.5-1.src.rpm
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for epyunit-0.2.5-1.src.rpm
Algorithm Hash digest
SHA256 8c0ebcc96368456453e918c5dc1339e89a429cbb404fd63aafc9c972d1383fe7
MD5 8537d93340cf86477438a08b41ce79af
BLAKE2b-256 2bedbeb5b5902f9780696c089a4624ec6efe943ca9dba7a27911aa67dcc827df

See more details on using hashes here.

File details

Details for the file epyunit-0.2.5-1.noarch.rpm.

File metadata

  • Download URL: epyunit-0.2.5-1.noarch.rpm
  • Upload date:
  • Size: 87.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for epyunit-0.2.5-1.noarch.rpm
Algorithm Hash digest
SHA256 95b3f63672642f9257b211f20ac5822330518fe1a48f9dd937dc71eca0c93750
MD5 29c3c4705fa41036d303fe59d686f377
BLAKE2b-256 1740777e44924399d0b563b388a10247bc6b183e5a8a4b640ac74f4c33e22ef4

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.12

4 files

0.2.11

5 files

0.2.10

5 files

0.2.9

4 files

0.2.8

5 files

0.2.7

5 files

0.2.6

5 files

This release

0.2.5 This release

5 files

0.2.0

5 files

0.1.14

5 files

0.1.13

3 files

0.1.12

5 files

0.1.11

4 files

0.1.10

5 files

0.1.9

5 files

0.1.8

5 files

0.1.7

5 files

0.0.10

4 files

0.0.1

4 files

0.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page