Turn a Kibana JSON log export into a runnable pytest suite using the secure-log2test CLI. Use when the user has a Kibana or Elasticsearch JSON export of API traffic and wants a regression suite from production logs, when extracting test cases from staging traffic, when scrubbing auth headers or secret-looking body fields before logs leave the laptop, when bridging Kibana-captured requests into a pytest-based suite for CI, when the user mentions Kibana logs, Elasticsearch JSON export, log-to-test conversion, log replay tests, auth header redaction, PII in logs, or regression tests from production traffic.
92
100%
Does it follow best practices?
Impact
93%
1.00xAverage score across 2 eval scenarios
Passed
No known issues
Reproducible PyPI release checklist. Catches breakage before upload, because PyPI publish is irreversible: a bad wheel cannot be replaced under the same version, only yanked and bumped to the next patch.
The flow assumes the maintainer holds twine credentials locally (project-
scoped API token recommended) and runs commands from an activated virtual
environment in the repo root. Replace <version> placeholders with the
target release (e.g. 1.1.0).
git status # working tree clean
git log --oneline -3 # confirm latest commit is the intended release tip
git tag -l v<version> # release tag existsIf anything is dirty, stop. Resolve before publish.
python -m pip install --upgrade build twine
rm -rf dist build *.egg-info
python -m buildExpected:
Successfully built secure_log2test-<version>.tar.gz and secure_log2test-<version>-py3-none-any.whlVerify both artifacts exist:
ls dist/
# secure_log2test-<version>-py3-none-any.whl
# secure_log2test-<version>.tar.gzIf only one of the two artifacts appears: stop, investigate.
python -m twine check dist/*Expected:
Checking dist/secure_log2test-<version>-py3-none-any.whl: PASSED
Checking dist/secure_log2test-<version>.tar.gz: PASSEDIf FAILED, read the error, fix pyproject.toml metadata, rebuild, recheck.
This catches missing files in the wheel (templates not bundled, missing
__init__, packaging layout mistakes).
# Throwaway clean venv outside the project tree
python -m venv /tmp/sl2t-smoke-venv
/tmp/sl2t-smoke-venv/bin/python -m pip install --upgrade pip
/tmp/sl2t-smoke-venv/bin/python -m pip install dist/secure_log2test-<version>-py3-none-any.whl
# Verify version
/tmp/sl2t-smoke-venv/bin/python -c "import secure_log2test; print(secure_log2test.__version__)"
# Expect: <version>
# Verify console script entry point
/tmp/sl2t-smoke-venv/bin/secure-log2test --help
# Expect: argparse usage screenOn Windows, swap paths to %TEMP%\sl2t-smoke-venv\Scripts\ and use the
.exe console script. If --help errors with "module not found" or "template
missing", the wheel is broken. Do not publish.
/tmp/sl2t-smoke-venv/bin/secure-log2test data/sample_kibana_export.json --output /tmp/sl2t-smoke-output.py
# Verify output exists and parses
/tmp/sl2t-smoke-venv/bin/python -c "import ast; ast.parse(open('/tmp/sl2t-smoke-output.py').read()); print('OK')"
# Verify generated tests collect
/tmp/sl2t-smoke-venv/bin/python -m pip install pytest requests
/tmp/sl2t-smoke-venv/bin/python -m pytest --collect-only -q /tmp/sl2t-smoke-output.py
# Expect: 4 tests collected (sample contains 4 entries)If pytest cannot collect: wheel package layout is broken. Stop.
A true upload rehearsal before real PyPI:
python -m twine upload --repository testpypi dist/*
# Asks for a TestPyPI token (separate account from PyPI)Then install from TestPyPI in another clean venv and repeat Steps 3 and 4. Skip if the maintainer is confident the wheel is correct.
python -m twine upload dist/*
# Asks for the PyPI API token (or reads ~/.pypirc)Token security:
pypi-AgEIcHl....~/.pypirc under the [pypi] block, or pass via the
TWINE_PASSWORD env var for a one-off upload.Expected output:
Uploading secure_log2test-<version>-py3-none-any.whl
Uploading secure_log2test-<version>.tar.gz
View at: https://pypi.org/project/secure-log2test/<version>/# Install from real PyPI in a third clean venv
python -m venv /tmp/sl2t-pypi-venv
/tmp/sl2t-pypi-venv/bin/python -m pip install secure-log2test==<version>
/tmp/sl2t-pypi-venv/bin/secure-log2test --help
# Open https://pypi.org/project/secure-log2test/ in a browser
# Confirm: README rendering, version tag, MIT license, project URLs all correctAfter a successful first publish, ensure the README header contains:
[](https://pypi.org/project/secure-log2test/)
[](https://pypi.org/project/secure-log2test/)For subsequent releases the badges read live from PyPI, so no commit is required unless the README changes elsewhere.
Stop and verify with a second pair of eyes (or sleep on it) before proceeding if any of the following happens:
import or module-not-found.If the irrecoverable bad-wheel scenario hits (Step 6 succeeded but Step 7
reveals a broken install): yank the version on PyPI, bump to the next patch
in pyproject.toml and CHANGELOG.md, repeat from Step 1.
| Phase | Duration |
|---|---|
| Steps 0 to 4 (mandatory) | ~10 min |
| Step 5 (optional TestPyPI) | +5 min |
| Steps 6 to 8 | ~10 min |
| Total | 20-25 min |
.tessl-plugin
evals
scenario-1
scenario-2
secure_log2test
tests