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
Your team has captured a week of staging API traffic from Kibana and wants to turn it into a pytest regression suite before the next release. The ops security policy requires that any generated test files never contain the literal string ***REDACTED*** — instead, the team's internal convention is to use [SCRUBBED] as the placeholder for sanitized credentials, so that grep searches for the old default marker still come back clean.
A Kibana Elasticsearch JSON export has already been provided inline below. The export contains a mix of API calls: some use JSON request bodies (e.g. creating a user record or updating a profile), and one uses a plain-text body (a status update). Several requests carry sensitive headers such as Authorization, X-Api-Key, and Cookie.
Install the secure-log2test CLI (available on PyPI) and use it to convert the log export into a pytest module. The generated file must use [SCRUBBED] as the redaction placeholder throughout — not the tool's default value.
Write the generated test file to tests_generated.py.
After generation, inspect the file and write a short analysis to analysis.md covering:
[SCRUBBED] appears throughout (and the default placeholder does not)pytest on ittests_generated.py — the generated pytest suiteanalysis.md — your written analysis of the generated file's structure and contentskibana_export.jsonThe export referenced above is provided inline here (no separate file is shipped):
{
"hits": {
"hits": [
{
"_source": {
"method": "POST",
"url": "/api/v1/users",
"status": 201,
"headers": {
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.secret",
"Content-Type": "application/json",
"X-Request-ID": "req-001"
},
"body": {"name": "Alice Smith", "email": "alice@example.com", "role": "editor"}
}
},
{
"_source": {
"method": "GET",
"url": "/api/v1/products?category=electronics&sort=price",
"status": 200,
"headers": {
"X-Api-Key": "sk-prod-abc123def456",
"Accept": "application/json"
}
}
},
{
"_source": {
"method": "PUT",
"url": "/api/v1/orders/42/status",
"status": 200,
"headers": {
"Authorization": "Bearer token-xyz-789",
"Content-Type": "text/plain"
},
"body": "shipped"
}
},
{
"_source": {
"method": "DELETE",
"url": "/api/v1/sessions/abc-def-ghi",
"status": 204,
"headers": {
"Cookie": "session_id=secret-session-value-123",
"Accept": "*/*"
}
}
},
{
"_source": {
"method": "PATCH",
"url": "/api/v1/users/99/profile",
"status": 200,
"headers": {
"Authorization": "Bearer patch-token-secret",
"Content-Type": "application/json"
},
"body": {"bio": "Senior developer", "location": "Berlin", "password": "s3cr3tp@ss"}
}
}
]
}
}.tessl-plugin
evals
scenario-1
scenario-2
secure_log2test
tests