Skip to main content

Python automated test framework

Project description

vault88

vault88 is a Python automated test framework designed for structured hardware and software validation in CI/CD pipelines. Tests are written as Python classes, organised into stages, and results can be published through configurable reporters.

Architecture

Component Role
Loader Discovers test classes from files or directories; supports tag-based include/exclude filtering
Logger Centralised logging with rotating file handler and optional verbose (debug) output
Runner Instantiates and executes a test class through its full lifecycle: selfChecksetuprunteardown
Reporter Pluggable reporters loaded from the config file; built-in reporters include JUnit XML and log archive

Test results are grouped into named stages within each test, and each result records an action, expected value, actual value, outcome, timestamp, and optional requirement references.

Installation

pip install vault88

Or with uv:

uv add vault88

Writing a test

Subclass Test and implement the four lifecycle methods:

from vault88 import Test

class MyTest(Test):
    name = "My Test"
    tags = ["smoke"]

    def selfCheck(self) -> bool:
        # Return False to skip the test entirely
        return True

    def setup(self) -> bool:
        # Prepare resources; return False to abort
        return True

    def run(self) -> None:
        self.newStage("Basic checks")
        self.assertEqual("Verify result", expected=42, actual=compute())

    def teardown(self) -> None:
        pass

Available assertion helpers: assertEqual, assertNotEqual, assertTrue, assertFalse, assertGreaterThan, assertLessThan, assertGreaterThanOrEqual, assertLessThanOrEqual, assertIn, assertNotIn, assertIsNone, assertIsNotNone.

Running tests

vault88 <testpath> [options]
Option Description
testpath Path to a test file or directory
-t TAG [TAG ...] Only run tests that have at least one of these tags
-nt TAG [TAG ...] Exclude tests that have any of these tags
-r Recursively search directories for tests
-l FILE Log file path (default: ./test_execution.log)
-v Verbose / debug logging
--env PATH_OR_URL Load an environment from a JSON file or HTTP(S) URL
--junit Generate a testresults.xml JUnit report in the current directory

Configuration

Reporters are configured in /etc/vault88.conf (INI format). Each [REPORTER<n>] section loads one reporter:

[REPORTER1]
module = vault88.core.reporters.junit_reporter
class = JUnitReporter
enabled = true
suite_name = My Project Tests

[REPORTER2]
module = vault88.core.reporters.log_archive_reporter
class = LogArchiveReporter
enabled = true
output_dir = ./logs

License

MIT License

Copyright (c) 2025 Brad Murdoch

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

vault88-0.2.3.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

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

vault88-0.2.3-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file vault88-0.2.3.tar.gz.

File metadata

  • Download URL: vault88-0.2.3.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vault88-0.2.3.tar.gz
Algorithm Hash digest
SHA256 4741ffaf46668e9fc7fedaaad7846ea132b1d6aaff02b65ca10c28d80b442063
MD5 15f87e59a0ce4e63da549b5be194b0b6
BLAKE2b-256 22d8c4807ac68dd4022fefa2e446b82b8e4ccc271c73c0b47554af494c5474aa

See more details on using hashes here.

File details

Details for the file vault88-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: vault88-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vault88-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cd4c88686cbe4e0b3b4daae1ba2d5671eea50ffd10cb56420f075e1e4d14be95
MD5 4a79baa7f038bf988acfdcb5b4f1e9b2
BLAKE2b-256 b742d7f6b88d046a5281e3b6567cdf1d87549c533c42cc537b5e18989b41c7d7

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