elasticdash-test-py
Python port of the Elasticdash AI test framework.
Install
pip install elasticdash-test
Usage
elasticdash test
elasticdash test ./examples
elasticdash run examples/simple_flow.ai_test.py
OPENAI_API_KEY is required for semantic matchers that call an LLM judge.
See docs/test-writing-guidelines.md for authoring tips.
Writing a test (quick example)
# examples/checkout_flow.ai_test.py
from elasticdash_test import ai_test, before_all, before_each, after_each, install_ai_interceptor, uninstall_ai_interceptor, expect
@before_all
def setup_suite():
# Capture httpx/requests LLM calls automatically
install_ai_interceptor()
@after_each
def teardown_each(ctx):
# You can assert cleanup steps here
ctx.trace.record_custom_step(kind="teardown", name="after-each")
@ai_test("checkout confirms order")
async def test_checkout(ctx):
# Your app code runs here (sync or async). Simulate trace records:
ctx.trace.record_llm_step(model="gpt-4o-mini", provider="openai", prompt="confirm order?", completion="order confirmed")
ctx.trace.record_tool_call(name="chargeCard", args={"amount": 42})
# Assertions on trace
expect(ctx.trace).to_have_llm_step(model="gpt-4o-mini", contains="confirmed")
expect(ctx.trace).to_call_tool("chargeCard")
# Optional semantic judge (needs OPENAI_API_KEY)
await expect(ctx.trace).to_match_semantic_output("order confirmed")
Run it:
elasticdash run examples/checkout_flow.ai_test.py
Metadata
Release files for elasticdash-test 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| elasticdash_test-0.1.1.tar.gz | 15.9 kB | Without provenance | Details for elasticdash_test-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| elasticdash_test-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for elasticdash_test-0.1.1-py3-none-any.whl |
Total release size: 31.9 kB
Release files / elasticdash_test-0.1.1.tar.gz
| Download URL | elasticdash_test-0.1.1.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0cb319f854326ba0c882259cceb4b691af3ac94164bd6dc77e8198806f11e8f
|
|
BLAKE2b-256 checksum How to use checksums |
2f015ad038d9309067f469a83c52d2fdca76fe5814fe69bf30cf36d23f62786d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / elasticdash_test-0.1.1-py3-none-any.whl
| Download URL | elasticdash_test-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
346d7d3e5ae9a41b8adb701ca1f1a1e94aabebb2076ff0275f1f1371b341ae8c
|
|
BLAKE2b-256 checksum How to use checksums |
55f25acfffa377019e3683ada18d63bca5b8b9cc095c36d1a49e4a332c75e2c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Security for elasticdash-test 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.