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                   |                           |    PyDevRemoteDBG     |      Debug into subprocess
Debug Server                   |                           +-----------------------+
                               |                                       |
               . . . . . . . . | . . . . . . . . . . . . . . . . . . . | . . . . . . . .
                               |                                       |
                               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.

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_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.01

  • RELEASE: 00.01

  • 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 := 100.

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

Current Release: 00.01.013 - Alpha:

REMARK: This is an informal pre-work-release - tested on Linux only.

The content is a major advance, and the major part is stable, but overall still in work.

Major Changes:

  • Fixes.

  • Provide first version of integrated documentation created by Sphinx+Epydoc

  • Migrated API creation by Epydoc to pure Python on Linux, Windows7, and MacOS-SnowLeopard - soon tests on BSD, Solaris, requires Python 2.x >= 2.7

  • Introduced match lists of regexpr.

  • The most may already work on Mac-OS and MS-Windows and others too, but due to priorities for now tested and released for Linux. Others are following soon.

  • The class ‘epyunit.spUnittest.TestExecutable’ is pre-alpha

  • The documents are mostly complete, but still in review.

ToDo:

  • Finish the class ‘epyunit.spUnittest.TestExecutable’

  • Finish list of actual matches.

  • Correlator engine.

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: >500

  • Use-Cases as UnitTests: >29

Total: >530

nn

Download files

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

Source Distributions

epyunit-0.1.13.tar.gz (792.8 kB view details)

Uploaded Source

epyunit-0.1.13-1.src.rpm (807.4 kB view details)

Uploaded Source

Built Distribution

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

epyunit-0.1.13.linux-x86_64.tar.gz (67.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: epyunit-0.1.13.tar.gz
  • Upload date:
  • Size: 792.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for epyunit-0.1.13.tar.gz
Algorithm Hash digest
SHA256 510426686f4df6dfdf7bc4a8d7d4d6a25e7fa8725802b847e239ad236d66d608
MD5 b41fa410a1acabcb2cf49cfbc0de0e5c
BLAKE2b-256 3a20069b16336d78290592796a62be03849bfb1a33f8a2591173721cb22f4713

See more details on using hashes here.

File details

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

File metadata

  • Download URL: epyunit-0.1.13-1.src.rpm
  • Upload date:
  • Size: 807.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for epyunit-0.1.13-1.src.rpm
Algorithm Hash digest
SHA256 cbff2c4f571e2f644e8be8cfac575d87a3cd4a83d931dfc1a6c319ed70228bf9
MD5 7d34a81b0396a1e7bfef64f26ca03a6e
BLAKE2b-256 ebaf567a5ee8d7203b6fdc80f79b2cd535d69889cdbfac6a8e4275f9ba97a085

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for epyunit-0.1.13.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 bb68b9cca5e76be9eba728ef309336a6a3738b2d598d9f42062f688fb434985d
MD5 648800507ff7d3078c89b7cfaa666974
BLAKE2b-256 3daab34a904d7ace4f32e9ade78a4f0a50cc64add6105ce1f12959903bfa2949

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

0.2.5

5 files

0.2.0

5 files

0.1.14

5 files

This release

0.1.13 This release

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