Hivescope
A self-contained pytest-based E2E testing library for HiveMind protocol implementations.
Install
pip install "hivescope @ git+https://github.com/JarbasHiveMind/hivescope@dev"
With OVOS skill-level testing support:
pip install "hivescope[ovos] @ git+https://github.com/JarbasHiveMind/hivescope@dev"
Quick Start
from hivescope.scenarios import single_satellite
from hivescope.assertions import assert_handshake_complete, assert_encryption_match
def test_handshake():
builder = single_satellite()
builder.start_all()
try:
master = builder.get_master("M0")
satellite = builder.get_satellite("S0")
assert_handshake_complete(master, satellite)
assert_encryption_match(master, satellite)
finally:
builder.stop_all()
Using pytest fixtures (add to tests/conftest.py):
pytest_plugins = ['hivescope.pytest_fixtures']
def test_message_forwarded(master_node, satellite_node):
from ovos_bus_client.message import Message
satellite_node.send(Message("test:ping", {}))
master_node.recorder.assert_received("BUS", count=1)
Templates
Copy-paste test templates from templates/ into your repo's tests/e2e/:
| Template | Covers |
|---|---|
test_template_handshake.py |
Cipher/encoding agreement, handshake completion |
test_template_routing.py |
Message routing through master |
test_template_acl.py |
ACL enforcement for restricted satellites |
test_template_binary.py |
Binary protocol message handling |
Configuration
| Key | Default | Purpose |
|---|---|---|
use_loopback |
False |
Pass True to add_master() to use loopback network protocol instead of in-process |
[ovos] extra |
not installed | Enables OvoscopeAgentProtocol backed by a live MiniCroft |
API Reference
See docs/index.md for the full public API.
License
AGPL-3.0
Metadata
Release files for hivescope 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hivescope-0.1.0.tar.gz | 30.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hivescope-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 67.3 kB
Release files / hivescope-0.1.0.tar.gz
| Download URL | hivescope-0.1.0.tar.gz |
|---|---|
| Size | 30.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
160515bcbaa0ce9ee22e597847b6e7350e0ee48c4d6414cf84a004536a581d63
|
|
BLAKE2b-256 checksum How to use checksums |
698cea3c0cfa1307f52560cb203cc5eaf26a5f1d8113e6e02d6cbf5f5da2dd21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / hivescope-0.1.0-py3-none-any.whl
| Download URL | hivescope-0.1.0-py3-none-any.whl |
|---|---|
| Size | 36.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd4f6b28a03e9770ad130dd2c5bedd3c1c46ef1c083edb7cb5a55292b753429a
|
|
BLAKE2b-256 checksum How to use checksums |
a5002a561f2022b5f1e3876be4a10ab3db747281ea38fc02b01829df73d0afa5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|