feat(test): Support result saving functionality for multiple storage#764
Merged
Wwwzff merged 7 commits intoModelEngine-Group:developfrom Mar 13, 2026
Merged
Conversation
84a5b7e to
2821b05
Compare
dante159753
reviewed
Feb 28, 2026
5c8f0a7 to
4e80964
Compare
…backends - Added implementation of localFile, mongodb and postgresql storage backends - Modified configuration file to support multi-storage backend configuration - Updated capture_utils to use the new storage backend interface - Removed old database utility functions and refactored them into a general result saving mechanism - Added automatic inference and conversion functions for multiple data types - Implemented connection management and retry mechanisms for MongoDB and PostgreSQL
…ndency injection - Add new global build_id management functions set_build_id and get_build_id in capture_utils - Remove the independent build_id setting logic in each database module and uniformly use global management - Implement lazy loading database dependency injection mode to optimize module initialization performance - Simplify the PostgreSQL and MongoDB write processes, removing redundant parameter passing
…y injection - Remove the singleton dependency injection class DbDeps from the MongoDB module - Remove the singleton dependency injection class DbDeps from the PostgreSQL module
- Replace the variables related to build_id with variables test_id and test_items - Update the configuration instructions for saving test results in the README document - Remove the unused global variable _test_build_id in localFile.py
…ironment - Obtain additional information from the environment variable EXTRA_INFO and store it in the test data
e979963 to
e1f197d
Compare
Wwwzff
approved these changes
Mar 13, 2026
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.
PR: feat(test): Support result saving functionality for multiple storage backends
Description
This PR introduces a robust, multi-backend storage system for test results. It replaces the legacy database utility functions with a unified interface that supports Local File, MongoDB, and PostgreSQL backends. This enhancement allows users to configure and switch between different storage solutions seamlessly based on their infrastructure needs.
Key Changes
New Features
localFile: Saves results to the local filesystem (JSON/CSV).mongodb: Stores results in MongoDB collections.postgresql: Stores results in PostgreSQL tables.Refactoring
capture_utilsto utilize the new generic storage backend interface, decoupling business logic from specific storage implementations.Configuration Example
The configuration file now supports a
storagesection:Testing