test(integration): add full-pipeline e2e test with mock providers and all report formats#171
Merged
himanshu231204 merged 1 commit intoJul 17, 2026
Conversation
Load a small sample dataset from a JSON file, run it through the Engine with the mock LLM and mock retriever, and render the report in every format (terminal, markdown, HTML, JSON), asserting the mocks were actually exercised via recorded calls and sentinel answers. Closes OpenAgentHQ#106 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🎉 Congratulations @Nitjsefnie! Your pull request has been successfully merged into main. 🚀 Thank you for contributing to OpenAgentHQ and helping improve the project. We truly appreciate your contribution and hope to see you back with more amazing PRs! Happy Open Sourcing! ❤️ 🌟 This is your first merged contribution to this repository. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #106.
Adds
tests/integration/test_pipeline/test_full_pipeline_reports.py— an end-to-end integration test of the full evaluation pipeline, covering the two aspects #106 asks for that the existingtest_mock_e2e.pydoesn't already exercise: loading the dataset from a JSON file and rendering all four report formats.Two tests:
test_full_pipeline_generates_all_report_formats— writes a 2-item dataset to a JSON file, loads it viaJSONDatasetLoader, runsEnginewithprovider="mock"(the repo's ownMockLLMProvider+MockRetriever), then renders the resultingEvaluationReportthroughTerminalReport,MarkdownReport,HTMLReport, andJSONReport, asserting each contains the expected summary/metrics/answer data.test_mock_providers_are_actually_invoked— spy subclasses of the repo mocks assert the LLM was called exactly once per item with the question-derived prompt, and the retriever once per item.The tests are deliberately hard to pass vacuously — a silent fallback away from the mock path fails them three independent ways: the metric values (
exact_match == 1.0only because the mock echoes ground truth), unique sentinel strings that must reappear verbatim in the md/html/json renders, and the spy call counts. Verified by mutation: makingMockLLMProvider.generatestop echoing ground truth fails both tests; restoring it passes both.Purely additive — no production code touched.
uv run pytest tests/integration/test_pipeline/test_full_pipeline_reports.py→ 2 passed;ruff checkclean on the new file. (Full-suite baseline note: under plainuv synca number of pre-existing failures come from optional-dependency extras not being installed — unrelated to and unchanged by this diff.)Disclosure: this contribution was made with AI assistance (Claude), with the work reviewed and verified by a human-directed process before submission.