litellm/tests/e2e
ryan-crabbe-berri d0e37d39c4 Record each e2e test's steps from the harness it calls
A test's JUnit report says whether it passed, never what it did or where a failing test died. This records that from the harness, so nothing about it is hand-written and it cannot drift from what the test actually ran

`@step("create team with a budget")` from the new tests/e2e/e2e_metadata.py goes on harness helpers, never on tests, and appends its label to the running test's step log in call order. The label is recorded before the wrapped call, so a helper that raises still leaves its own label last: a failing test's last step is where it died. Every public harness method that performs an action now carries one, 355 across the client modules, lifecycle, idp, the logging readers, migrations and the claude_code driver

Only the outermost step records, tracked per thread. Harness layers call each other (ResourceManager.key goes through ProxyClient.generate_key, a domain client wraps the shared ProxyClient), so every layer carries a label and the story still reads at the level the test called in at, one beat per action. A step above @contextmanager holds the guard through __enter__ and __exit__, so a context's cleanup never lands behind the step a test died on, and a bare generator function is refused at import because its body interleaves with its caller's. Consecutive duplicates collapse and the log caps at 50, so a poll loop is one beat rather than fifty. The wrapper is a frame, so the eight cleanup and retry warnings raised directly inside decorated helpers use stacklevel=2 + STEP_FRAMES to keep reporting at their caller

The log is emptied first thing in pytest_runtest_setup and attached from the existing pytest_runtest_makereport wrapper after setup and again after call, so a test that errors in a fixture keeps the steps recorded before the crash. Teardown does not attach: finalizer steps are cleanup. Each attach drops the item's earlier step entries, so the second attach and a --reruns 1 retry replace the story rather than doubling it

Steps ride out as repeated <property name="step"> entries behind the fixed package/covers/source prefix, which stays byte-identical. The project-releaser emitter already regroups them into the results JSON's steps array. test_junit_report.py runs real pytest with --junitxml against this conftest, in-process and under -n 2, and pins the passing, failing, setup-error, rerun and wide-scope-fixture cases on the parsed XML
2026-09-21 18:48:59 -07:00
..
a2a Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
access_control Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
batches Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
claude_code Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
coverage_registry Merge pull request #42295 from BerriAI/litellm_fix_azure_cancellederror_cooldown 2026-09-21 17:24:22 -07:00
gateway Merge remote-tracking branch 'origin/main' into devin_ai_fix_azure_cancellederror_35329 2026-09-21 11:59:56 -07:00
guardrails Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
llm_translation Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
load Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
logging Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
management Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
mcp Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
migrations Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
other Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
quota_management Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
router Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
ui Merge pull request #41773 from BerriAI/litellm_dashboard-form-happy-paths 2026-09-21 16:56:25 -07:00
AGENTS.md Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
conftest.py Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
CONTRIBUTING.md Merge branch 'main' into claude/e2e-tests-custom-endpoints-qxoi1o 2026-09-21 11:34:21 -07:00
e2e_config.py test(e2e): gate the Bedrock edge capture behind a provider_edge_host opt-in 2026-09-21 06:17:03 +00:00
e2e_db.py test(e2e): guard destructive spend-log truncate behind an explicit opt-in (#33751) 2026-07-20 08:47:39 -07:00
e2e_http.py test(e2e): settle for the replica propagation window and trim the disconnect cell's prose 2026-09-21 13:30:25 -07:00
e2e_metadata.py Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
fixture_bundle.py test: add strict stateless provider replay identity 2026-09-14 16:55:43 -07:00
fixture_canonical.py feat(e2e): key the provider cache per test and mount Bedrock behind it 2026-09-16 02:15:46 -07:00
fixture_mode.py fix(e2e): own a shared fixture's deployment by the fixture's node, not the first test 2026-09-16 17:35:05 -07:00
fixture_profile.py test: preserve strict replay numeric spelling 2026-09-14 17:11:56 -07:00
idp.py Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
idp_realm.json test(e2e): harden JWT fixtures and cover management lifecycles 2026-09-11 16:36:12 -07:00
junit_properties.py Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
lifecycle.py Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
models.py Merge pull request #42295 from BerriAI/litellm_fix_azure_cancellederror_cooldown 2026-09-21 17:24:22 -07:00
otel_client.py Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
PROVIDER_CACHE.md fix(e2e): own a shared fixture's deployment by the fixture's node, not the first test 2026-09-16 17:35:05 -07:00
provider_cache.py fix(e2e): bind provider-cache recordings to the deployment's test, not the serving process 2026-09-16 17:08:17 -07:00
provider_cache_redis.py chore(e2e): report the key components behind a mount that never converges 2026-09-16 15:01:08 -07:00
provider_cache_routing.py revert(e2e): unmount Gemini, its api_base means two things 2026-09-16 08:37:25 -07:00
provider_edge.py fix(responses): forward safety_identifier through the chat completion bridge 2026-09-21 04:09:59 +00:00
provider_edge_bedrock.py feat(e2e): cache the responses and embeddings endpoints behind the edge 2026-09-16 02:34:09 -07:00
proxy_client.py Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
pytest.ini test(e2e): gate the Bedrock edge capture behind a provider_edge_host opt-in 2026-09-21 06:17:03 +00:00
test_e2e_http.py test: bind management E2E callers and isolate JWT actors 2026-09-12 13:29:04 -07:00
test_fixture_bundle.py feat(e2e): record and replay streamed provider responses chunk-for-chunk 2026-08-24 12:51:44 -07:00
test_fixture_canonical.py test(e2e): pin query params and multipart form fields as replay match-key identity 2026-08-20 15:59:34 -04:00
test_fixture_mode.py feat(e2e): move record/replay to the provider edge (LIT-5745) 2026-08-19 18:39:15 -07:00
test_idp.py test: enforce isolated actors and stop OIDC process groups 2026-09-12 13:49:49 -07:00
test_junit_properties.py Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
test_junit_report.py Record each e2e test's steps from the harness it calls 2026-09-21 18:48:59 -07:00
test_provider_edge.py fix(e2e): bind provider-cache recordings to the deployment's test, not the serving process 2026-09-16 17:08:17 -07:00
test_proxy_client.py fix(e2e): own a shared fixture's deployment by the fixture's node, not the first test 2026-09-16 17:35:05 -07:00
transport.py test(e2e): client disconnect must not bench the Azure deployment it cancelled 2026-09-21 18:39:37 +00:00