Regression test method and device of server, electronic equipment and storage medium

By combining a pre-set large model with the MCP protocol layer, test environment information and action sequences are generated, and hardware management tools from different vendors are managed in a unified manner. This solves the problems of high cost and incomplete coverage in server regression testing, improves testing efficiency and accuracy, and ensures system stability.

CN121935149APending Publication Date: 2026-04-28NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD
Filing Date
2025-12-29
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Current server regression testing faces challenges such as high costs of full-scale testing and incomplete coverage of selective testing. Furthermore, hardware management tools from different vendors have varying interfaces and isolated operations, leading to low testing and maintenance efficiency and a high risk of operational errors.

Method used

By generating test environment information and test action sequences through a pre-set large model, and encapsulating hardware management tool interfaces using the MCP protocol layer, unified control of servers from different manufacturers is achieved. This generates interface call requests and calls the appropriate hardware management tools to perform test actions, ensuring the accuracy and efficiency of the test.

Benefits of technology

It significantly improves the efficiency and accuracy of regression testing, ensures the stability and reliability of the system after server software or hardware firmware updates, reduces the operational threshold and maintenance costs, and avoids testing errors caused by improper tool operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121935149A_ABST
    Figure CN121935149A_ABST
Patent Text Reader

Abstract

The invention relates to a regression test method and device of a server, electronic equipment and a storage medium, the regression test method of the server comprises the following steps: receiving a regression test request of the server, the regression test request being triggered after updating software or hardware firmware in the server; determining test environment information and a test action sequence of a regression test according to the regression test request and a preset large model; and based on the interface calling request, calling a hardware management tool corresponding to the test environment information in an MCP protocol layer, so as to execute a corresponding test action based on the test action sequence on a server adapted to the test environment information to obtain a test result. According to the embodiment of the invention, the server which may have risks after the software or hardware firmware is updated can be accurately positioned, the efficiency and accuracy of the regression test are greatly improved, and the stability and reliability of the system after the software or hardware firmware of the server is updated are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of server testing, and more particularly to a regression testing method, apparatus, electronic device, and storage medium for servers. Background Technology

[0002] As the core foundation of a data center, the stability and reliability of servers directly determine business continuity and are therefore of paramount importance. Whether it's updates at the software level, such as operating system kernels, virtualization platforms, and application software, or iterations of hardware firmware, all must undergo rigorous regression testing to ensure that changes do not introduce new system defects.

[0003] Currently, with the increasing complexity and diversity of server hardware configurations (such as different models of CPUs, multiple specifications of memory modules, NVMe SSDs and network cards from various manufacturers, etc.), coupled with the continuous iteration and upgrading of the software stack, regression testing is facing unprecedented severe challenges.

[0004] Although different server vendors provide their own independent management tools, these tools have different interfaces and isolated operations. This requires testing and maintenance personnel to learn and frequently switch between multiple tools, which is not only inefficient, but also requires writing and maintaining dedicated automation scripts for different vendors' equipment. Often, it requires manually arranging and calling multiple different scripts and tools, which is cumbersome and prone to operational errors. Summary of the Invention

[0005] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this application provides a regression testing method, apparatus, electronic device and storage medium for servers.

[0006] Firstly, this application provides a regression testing method for a server, including: Receive a regression test request from the server, which is triggered after an update to the software or hardware firmware in the server; The test environment information and test action sequence for the regression test are determined based on the regression test request and the preset large model. Based on the interface call request, the hardware management tool corresponding to the test environment information in the MCP protocol layer is invoked to execute the corresponding test actions on a server adapted to the test environment information, based on the test action sequence, and obtain the test results.

[0007] This application's embodiments generate test environment information and test action sequences adapted to regression test requests using a pre-set large model, replacing the traditional decision-making method that relies on human experience. Then, through interface call requests, hardware management tools matching the test environment information are invoked in the MCP protocol layer. Test actions are executed in an orderly manner on servers adapted to the test environment information, accurately locating servers that may have risks after software or hardware firmware updates. This effectively solves the problems of high cost of full-scale testing and incomplete coverage of selective testing in traditional regression testing. At the same time, it breaks down the barriers of fragmented hardware management tools from different manufacturers, greatly improving the efficiency and accuracy of regression testing, and ensuring the stability and reliability of the system after server software or hardware firmware updates.

[0008] Optionally, the MCP protocol layer encapsulates hardware management interfaces for multiple hardware management tools, each of which corresponds to different server attribute information.

[0009] By encapsulating hardware management interfaces for multiple hardware management tools within the MCP protocol layer and establishing a correspondence between these interfaces and server attribute information, unified management and control of servers from different vendors is achieved. Testing and maintenance personnel no longer need to learn and switch between multiple vendor tools. Users can drive all hardware to complete complex operation sequences simply through a unified natural language entry point, achieving end-to-end automation from "dialogue" to "execution." This reduces the operational threshold and maintenance costs, while providing a standardized call entry point for upper-layer systems. This ensures the consistency and efficiency of hardware operations in regression testing, improves the automation level of the testing process, and indirectly reduces testing errors caused by improper tool operation.

[0010] Optionally, generating an interface call request based on the test environment information and the test action sequence includes: Obtain the identifier of the server under test corresponding to the test environment information; Obtain the hardware management tool identifier corresponding to the identifier of the server under test; The interface call request is generated based on the hardware management tool identifier and the test action sequence.

[0011] This application embodiment generates interface call requests based on the hardware management tool identifier and test action sequence, ensuring accurate correspondence between the interface call request and the target server and hardware management tool, reducing the probability of call errors, improving the accuracy and reliability of interface calls, and ensuring the smooth execution of subsequent tests.

[0012] Optionally, generating the interface call request based on the hardware management tool identifier and the test action sequence includes: In the test action sequence, determine the test action corresponding to the identifier of the server under test; Based on the test actions, test control information corresponding to each of the hardware management tool identifiers is generated; Generate an interface call request that includes the hardware management tool identifier and test control information.

[0013] This application embodiment filters test actions that are compatible with each hardware management identifier, generates corresponding test control information, and encapsulates it into interface call requests for each hardware management tool. This ensures the relevance and effectiveness of the interface call requests, avoids the execution of invalid test actions, improves test efficiency, and reduces the waste of test resources.

[0014] Optionally, based on the interface call request, a hardware management tool corresponding to the test environment information in the MCP protocol layer is invoked to execute corresponding test actions on a server adapted to the test environment information, based on the test action sequence, to obtain test results, including: Determine the hardware management tool identifier and the corresponding test control information in the interface call request; The test control information is sent to the hardware management tool corresponding to the hardware management tool identifier through the MCP protocol layer, so that the hardware management tool corresponding to the hardware management tool identifier can perform corresponding test actions on the adapted server based on the test control information and obtain test results.

[0015] This application embodiment extracts key information by parsing interface call requests, accurately calls the corresponding hardware management tools and sends test control information, ensuring that test actions are accurately executed on the adaptation server, improving the reliability of test results and ensuring the effectiveness of regression testing.

[0016] Optionally, the test environment information and test action sequence for the regression test are determined based on the regression test request and the preset large model, including: The regression test request is subjected to intent recognition to obtain the test intent and test entity set; In a preset knowledge base, context information corresponding to the test intent and the test entity set is obtained. The knowledge base includes: hardware and software data of multiple servers, historical test data, and historical operation and maintenance data. The test environment information and test action sequence for regression testing are determined based on the test intent, the set of test entities, the context information, and the preset large model.

[0017] This application's embodiments accurately grasp the core testing requirements through intent recognition, avoiding test direction errors caused by misunderstandings of regression test requests. It supports multimodal interaction via text and voice, transforming complex command-line operations and script writing into intuitive natural language dialogue. Visual feedback makes the testing process and results clear at a glance, allowing non-professional managers to easily understand the project status and new employees to quickly get started. Leveraging the RAG module to obtain relevant contextual information from the knowledge base provides rich support for decision-making, overcoming the limitations of relying solely on the knowledge of the large model itself. Combined with the pre-set large model to generate test environment information and test action sequences, the decision-making process becomes more scientific and targeted. This effectively solves the problems of incomplete coverage or resource waste caused by relying on human experience in traditional testing, improves the rationality of test environment configuration and test steps, ensures the effectiveness and efficiency of regression testing, and provides a precise testing solution for comprehensive verification after server updates.

[0018] Optionally, the test environment information and test action sequence for regression testing are determined based on the test intent, the set of test entities, the context information, and the preset large model, including: The test intent, the set of test entities, and the context information are input into the preset large model so that the large model outputs the test environment information and test action sequence for regression testing.

[0019] This application embodiment inputs core test-related information into a preset large model and uses the model's professional analysis capabilities to generate a test plan, eliminating complex manual decision-making processes, improving decision-making efficiency and accuracy, avoiding the limitations of single-dimensional decision-making, and ensuring the relevance and effectiveness of regression testing.

[0020] Secondly, this application provides a regression testing apparatus for a server, comprising: A receiving module is used to receive regression test requests from the server, wherein the regression test requests are triggered after software or hardware firmware updates in the server. The determination module is used to determine the test environment information and test action sequence for the regression test based on the regression test request and the preset large model; The generation module is used to generate interface call requests based on the test environment information and the test action sequence; The testing module is used to invoke the hardware management tool in the MCP protocol layer corresponding to the test environment information based on the interface call request, so as to execute the corresponding test actions on a server adapted to the test environment information, based on the test action sequence, and obtain the test results.

[0021] Optionally, the MCP protocol layer encapsulates hardware management interfaces for multiple hardware management tools, each of which corresponds to different server attribute information.

[0022] Optionally, the generation module includes: The first acquisition unit is used to acquire the identifier of the server under test corresponding to the test environment information; The second acquisition unit is used to acquire the hardware management tool identifier corresponding to the identifier of the server under test; The first generation unit is used to generate the interface call request based on the hardware management tool identifier and the test action sequence.

[0023] Optionally, the first generation unit includes: The first determining subunit is used to determine the test action corresponding to the identifier of the server under test in the test action sequence; The first generation subunit is used to generate test control information corresponding to each of the hardware management tool identifiers based on the test action; The second generation subunit is used to generate an interface call request that includes hardware management tool identification and test control information.

[0024] Optionally, the test module includes: The first determining unit is used to determine the hardware management tool identifier and the test control information corresponding to the hardware management tool identifier in the interface call request; The first sending unit is used to send the test control information to the hardware management tool corresponding to the hardware management tool identifier through the MCP protocol layer, so that the hardware management tool corresponding to the hardware management tool identifier can perform corresponding test actions on the server adapted to it based on the test control information and obtain test results.

[0025] Optionally, the determining module includes: The identification unit is used to identify the intent of the regression test request and obtain the test intent and test entity set. The third acquisition unit is used to acquire context information corresponding to the test intent and the test entity set from a preset knowledge base. The knowledge base includes: hardware and software data of multiple servers, historical test data, and historical operation and maintenance data. The second determining unit is used to determine the test environment information and test action sequence of the regression test based on the test intention, the set of test entities, the context information, and the preset large model.

[0026] Optionally, the second determining unit includes: The input subunit is used to input the test intent, the test entity set, and the context information into the preset large model, so that the large model outputs the test environment information and test action sequence of the regression test.

[0027] Thirdly, this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor, when executing a program stored in memory, implements the regression testing method for the server described in any of the first aspects.

[0028] Fourthly, this application provides a computer-readable storage medium storing a program for a regression testing method for a server, wherein when the program for the regression testing method for the server is executed by a processor, it implements the steps of the regression testing method for the server described in any of the first aspects.

[0029] The technical solutions provided in this application have the following advantages compared with the prior art: This application's embodiments generate test environment information and test action sequences adapted to regression test requests using a pre-set large model, replacing the traditional decision-making method that relies on human experience. Then, through interface call requests, the hardware management tool matching the test environment information is invoked in the MCP protocol layer, and test actions are executed in an orderly manner on the adapted server. This accurately locates servers that may be at risk after software or hardware firmware updates, effectively solving the problems of high cost of full-scale testing and incomplete coverage of selective testing in traditional regression testing. At the same time, it breaks down the barriers of fragmented hardware management tools from different manufacturers, greatly improving the efficiency and accuracy of regression testing, and ensuring the stability and reliability of the system after server software or hardware firmware updates. Attached Figure Description

[0030] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 A flowchart illustrating a regression testing method for a server provided in an embodiment of this application; Figure 2 A structural diagram of a regression testing apparatus for a server provided in an embodiment of this application; Figure 3 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] While different server vendors offer their own independent management tools, these tools suffer from inconsistent interfaces and isolated operations. This necessitates that testing and maintenance personnel learn and frequently switch between multiple tools, leading to low efficiency. Furthermore, it requires writing and maintaining custom automation scripts for different vendors' equipment, often necessitating manual orchestration of multiple scripts and tools, resulting in a cumbersome process prone to errors. Therefore, this application provides a regression testing method, apparatus, electronic device, and storage medium for servers.

[0035] This application provides a regression testing method for servers. This method can be applied to a regression testing system (hereinafter referred to as the system). For example, the regression testing system can be a general-purpose server from different vendors in a data center, a dedicated server with specific hardware configurations, a server cluster deployed across vendors, or a server equipped with updated and iterative software and hardware, etc. Figure 1 As shown, the following steps may be included: Step S101: Receive the regression test request from the server; In this embodiment of the application, the regression test request is triggered after the software or hardware firmware in the server is updated. Further, the regression test request is initiated after the server's software, including the operating system kernel, virtualization platform application software, or hardware firmware, is updated in order to verify that the update has not introduced new defects. The server refers to the set of hardware devices in the data center that carry out business operations, the software refers to the program and related data running on the server hardware, and the hardware firmware refers to the software embedded in the server hardware device.

[0036] In this step, the system can receive requests from users in the form of text or voice. The system's Natural Language Processing (NLP) unit performs semantic analysis on the user input to accurately identify whether the regression test request was triggered by a server software or hardware firmware update. After confirming that the request was triggered by a server software or hardware firmware update, it is determined that the regression test request has been received.

[0037] For example, after a user completes a virtualization platform software update for a certain type of server, they can use the system's voice interaction function to inform the system that a regression test needs to be performed on the server. After receiving the voice information and parsing it through the NLP unit, the system confirms that it was triggered by the server software update, and thus determines that a regression test request has been received.

[0038] Step S102: Determine the test environment information and test action sequence for the regression test based on the regression test request and the preset large model; In this embodiment, the preset large model refers to the large language model (LLM) of server testing experience and professional knowledge learned from historical records; the test environment information refers to the hardware configuration, firmware version, operating system, calling program, etc. required for the server to conduct regression testing; and the test action sequence refers to the set of ordered test actions to be executed to complete the regression test.

[0039] In this step, a pre-set large model can be used in conjunction with the server testing domain knowledge learned to analyze the potential impact range of the updated content corresponding to the regression test request, thereby generating suitable regression test environment information and a continuous sequence of test actions.

[0040] For example, the large model can output test environment information as a combination of a network card of model A and a CPU of model B, and the test action sequence is a series of ordered test actions for load stress testing.

[0041] Step S103: Generate an interface call request based on the test environment information and the test action sequence; In this embodiment of the application, the interface call request refers to the standardized request instruction used to call hardware management tools.

[0042] In this step, the system's automated orchestration module extracts key parameters of the test environment information and test action sequences, and generates interface call requests for different hardware management tools.

[0043] Step S104: Based on the interface call request, invoke the hardware management tool in the MCP protocol layer corresponding to the test environment information, so as to execute the corresponding test actions on the server adapted to the test environment information based on the test action sequence and obtain the test results.

[0044] In this embodiment, the MCP protocol layer refers to the core middleware layer that implements unified control of server hardware through the Model Context Protocol (MCP). It encapsulates hardware management interfaces for multiple hardware management tools. Hardware management tools refer to dedicated tools provided by each server manufacturer for managing their own server hardware. Hardware management interfaces refer to the channels through which hardware management tools interact with external systems. Each hardware management tool corresponds to different server attribute information, including server manufacturer, model, etc.

[0045] As an intermediate layer, MCP encapsulates the complexity and differences of all underlying hardware management interfaces. MCP provides a unified, operation-oriented (such as power_on, set_boot_order, update_firmware) RESTful API (an HTTP-based application programming interface used for communication between different systems) for automated orchestration modules. In other words, as an intermediate layer, MCP integrates and encapsulates the hardware management interfaces of hardware management tools provided by different server manufacturers such as Dell and Intel, shielding the differences between various hardware management interfaces. At the same time, it establishes a one-to-one correspondence between hardware management tools and server attribute information, so that each server attribute information can be accurately associated with the corresponding hardware management tool.

[0046] For example, the MCP protocol layer encapsulates DellOpenManage, HPEOneView, and the corresponding Intel hardware management interfaces. DellOpenManage corresponds to servers identified as Server-D001 to Server-D100, HPEOneView corresponds to servers identified as Server-H001 to Server-H100, and the corresponding Intel hardware management interface corresponds to servers identified as Server-I001 to Server-I100.

[0047] By encapsulating hardware management interfaces for multiple hardware management tools within the MCP protocol layer and establishing a correspondence between these interfaces and server attribute information, unified management and control of servers from different vendors is achieved. Testing and maintenance personnel no longer need to learn and switch between multiple vendor tools. Users can drive all hardware to complete complex operation sequences simply through a unified natural language entry point, achieving end-to-end automation from "dialogue" to "execution." This reduces the operational threshold and maintenance costs, while providing a standardized call entry point for upper-layer systems. This ensures the consistency and efficiency of hardware operations in regression testing, improves the automation level of the testing process, and indirectly reduces testing errors caused by improper tool operation.

[0048] The system's automated orchestration module translates AI model decisions into specific operational instructions for server hardware and software. For example, when a user expresses a need for performance testing through dialogue, the AI ​​model invokes atomic operations such as hardware configuration, firmware updates, operating system deployment, and test script execution via API calls. This establishes a seamless link from natural language to automated execution, resolving the issues of fragmented vendor tools and inconsistent operations.

[0049] In this step, based on the interface call request, the hardware management tool corresponding to the test environment information in the MCP protocol layer can be invoked to execute test actions in sequence on the server adapted to the test environment information, such as synchronously collecting monitoring data such as CPU utilization and memory usage during the test process, as well as the test success or failure status, and finally forming the test results.

[0050] For example, based on the interface call request, the corresponding hardware management tool in the MCP protocol layer can be invoked. On a server equipped with a network card of model A and a CPU of model B that meets the test environment information requirements, test actions are executed in the order of load stress test. Resource usage data and status information of no compatibility errors during the test process are collected to obtain regression test results.

[0051] All data during the test execution process, including server monitoring metrics (CPU, memory, power consumption), test tool logs, and the final test results (success or failure), will be collected by the system's data analysis module.

[0052] The analysis results will be presented to users in a visual form and fed back to the AI ​​brain and knowledge base. Successful test paths will be given increased weight, while failed tests (i.e. tests that discover defects) will become valuable learning cases, forming a closed loop of continuous learning and optimization. This will make the AI's decision-making ability more and more accurate as the number of times it is used increases, enabling adaptive testing and predictive maintenance.

[0053] Each test and maintenance operation becomes learning material for the system through a data loop, allowing the system to learn from past successes and failures and continuously optimize its decision-making model. For example, based on hardware operation logs and historical failure patterns, the system can predictively suggest that "a certain batch of SSDs may have firmware defects, and a preventative upgrade is recommended," thus achieving a leap from "passive response" to "proactive prevention."

[0054] This application's embodiments generate test environment information and test action sequences adapted to regression test requests using a pre-set large model, replacing the traditional decision-making method that relies on human experience. Then, through interface call requests, hardware management tools matching the test environment information are invoked in the MCP protocol layer. Test actions are executed in an orderly manner on servers adapted to the test environment information, accurately locating servers that may have risks after software or hardware firmware updates. This effectively solves the problems of high cost of full-scale testing and incomplete coverage of selective testing in traditional regression testing. At the same time, it breaks down the barriers of fragmented hardware management tools from different manufacturers, greatly improving the efficiency and accuracy of regression testing, and ensuring the stability and reliability of the system after server software or hardware firmware updates.

[0055] In another embodiment of this application, step S103 generates an interface call request based on the test environment information and the test action sequence, including: Step S201: Obtain the identifier of the server under test corresponding to the test environment information; In this embodiment of the application, the server identifier refers to information used to uniquely identify the server under test.

[0056] In this step, the configuration parameters in the test environment information can be parsed, the server cluster can be traversed, servers that match the parameters can be matched, and their identifiers can be extracted to obtain the identifier of the server under test.

[0057] For example, the test environment information requires an Intel Xeon CPU and 64GB of memory. After parsing, the cluster is traversed, and the server identified as Server-001 is matched and its identifier is obtained.

[0058] Step S202: Obtain the hardware management tool identifier corresponding to the identifier of the server under test; In this embodiment of the application, the hardware management tool identifier refers to information used to uniquely identify the hardware management tool.

[0059] In this step, the preset identifier mapping database is queried, and the corresponding hardware management tool identifier is retrieved based on the identifier of the server under test.

[0060] For example: Based on the identifier Server-001 of the server under test, the corresponding hardware management tool identifier HMT-001 is found in the mapping database.

[0061] Step S203: Generate the interface call request based on the hardware management tool identifier and the test action sequence.

[0062] In this embodiment of the application, the interface call request refers to the standardized tool call instruction.

[0063] In this step, hardware management tool identifiers and test action sequence information can be integrated, and the information can be combined according to a preset protocol format to generate an interface call request.

[0064] For example, the hardware management tool identifier HMT-001 is integrated with test action sequences such as power-on and performance testing, and an interface call request containing the identifier and action information is generated according to the specification.

[0065] This application embodiment generates interface call requests based on the hardware management tool identifier and test action sequence, ensuring accurate correspondence between the interface call request and the target server and hardware management tool, reducing the probability of call errors, improving the accuracy and reliability of interface calls, and ensuring the smooth execution of subsequent tests.

[0066] In another embodiment of this application, step S203 generates the interface call request based on the hardware management tool identifier and the test action sequence, including: Step S301: Determine the test action corresponding to the identifier of the server under test in the test action sequence; In this embodiment of the application, the test action refers to the specific test operation adapted to the server under test.

[0067] In this step, each step in the test action sequence can be parsed to filter the test actions that need to be executed on the server under test.

[0068] For example: The test action sequence includes network card compatibility test and graphics card performance test. The server under test is identified as not having a dedicated graphics card, so the adaptation test action is determined to be network card compatibility test.

[0069] Step S302: Generate test control information corresponding to each hardware management tool identifier based on the test action; In this embodiment, the test control information is control information used to instruct the server to perform test actions.

[0070] In this step, test control information can be generated for each hardware management tool based on the operational requirements of the test action.

[0071] Step S303: Generate an interface call request containing the hardware management tool identifier and test control information.

[0072] In this step, the hardware management tool identifier and test control information are integrated according to a preset format to generate an interface call request for each hardware management tool. In other words, the interface call request contains only a hardware management tool identifier and the test control information corresponding to that hardware management tool identifier.

[0073] This application embodiment filters test actions that are compatible with each hardware management identifier, generates corresponding test control information, and encapsulates it into interface call requests for each hardware management tool. This ensures the relevance and effectiveness of the interface call requests, avoids the execution of invalid test actions, improves test efficiency, and reduces the waste of test resources.

[0074] In another embodiment of this application, step S104, based on the interface call request, invokes the hardware management tool in the MCP protocol layer corresponding to the test environment information, to execute corresponding test actions on a server adapted to the test environment information, based on the test action sequence, to obtain test results, including: Step S401: Determine the hardware management tool identifier and the test control information corresponding to the hardware management tool identifier in the interface call request; In this step, the content of the interface call request can be parsed to extract the hardware management tool identifier and the corresponding test control information.

[0075] Step S402: The test control information is sent to the hardware management tool corresponding to the hardware management tool identifier through the MCP protocol layer, so that the hardware management tool corresponding to the hardware management tool identifier can perform corresponding test actions on the server adapted to it based on the test control information and obtain test results.

[0076] In this step, the target hardware management tool can be located based on the hardware management tool identifier, test control information can be sent to the target hardware management tool, the hardware management tool can perform test actions on its compatible server, collect data, and obtain test results.

[0077] This application embodiment extracts key information by parsing interface call requests, accurately calls the corresponding hardware management tools and sends test control information, ensuring that test actions are accurately executed on the adaptation server, improving the reliability of test results and ensuring the effectiveness of regression testing.

[0078] In another embodiment of this application, step S102 determines the test environment information and test action sequence for the regression test based on the regression test request and the preset large model, including: Step S501: Perform intent recognition on the regression test request to obtain the test intent and test entity set; In this embodiment of the application, intent recognition refers to the process of parsing the core purpose of a regression test request. Test intent refers to the core objective of regression testing, including: verifying compatibility, detecting performance changes, etc. Test entity set refers to the set of specific objects related to regression testing, including server model, performance test module, etc.

[0079] In this step, the system's NLP module performs semantic analysis and parsing on the regression test request, extracts the core purpose of the request and determines it as the test intent, and identifies the specific objects related to the regression test and integrates them to form a test entity set.

[0080] For example, a user-initiated regression test request is to perform performance testing on a Server-020 server with an updated network card driver. The system's NLP module performs semantic analysis on the request, extracts the core purpose as performance testing, i.e., the testing intent, identifies the relevant specific object as the Server-020 server with a certain network card driver, and integrates them into a test entity set.

[0081] Step S502: Obtain context information corresponding to the test intent and the test entity set from the preset knowledge base; In this embodiment, the knowledge base includes: hardware and software data of multiple servers, historical test data, and historical operation and maintenance data. The hardware and software data of the servers includes information such as server hardware configuration and software version. The historical test data includes test results of past test cases. The historical operation and maintenance data includes fault records and operation and maintenance procedures. Specifically, the knowledge base contains massive amounts of professional data such as server hardware specifications, firmware descriptions, technical white papers, historical test reports, defect databases, and operation and maintenance SOPs. Context information refers to supplementary information in the knowledge base related to the test intent and test entity.

[0082] In this step, the system's Retrieval-Augmented Generation (RAG) module performs vector retrieval in a preset knowledge base based on the test intent and test entity set, and filters out information such as server hardware and software parameters, similar historical test cases, and past operation and maintenance fault records that are highly related to the test intent and test entity set, and integrates them to form contextual information.

[0083] Step S503: Determine the test environment information and test action sequence for regression testing based on the test intent, the set of test entities, the context information, and the preset large model.

[0084] In one embodiment of this application, step 503 can input the test intent, the test entity set, and the context information into the preset large model, so that the large model outputs the test environment information and test action sequence of the regression test.

[0085] In this step, the system synchronously inputs the organized test intent, test entity set, and context information into the preset large model through the data transmission interface. The preset large model performs in-depth analysis and logical reasoning on the input information, and combines its own stored server testing expertise to generate the optimal test environment configuration scheme that meets the test requirements and the ordered sequence of test operation steps that can achieve the test objectives, and outputs it to the automated orchestration module.

[0086] This application's embodiments accurately grasp the core testing requirements through intent recognition, avoiding test direction errors caused by misunderstandings of regression test requests. It supports multimodal interaction via text and voice, transforming complex command-line operations and script writing into intuitive natural language dialogue. Visual feedback makes the testing process and results clear at a glance, allowing non-professional managers to easily understand the project status and new employees to quickly get started. Leveraging the RAG module to obtain relevant contextual information from the knowledge base provides rich support for decision-making, overcoming the limitations of relying solely on the knowledge of the large model itself. Combined with the pre-set large model to generate test environment information and test action sequences, the decision-making process becomes more scientific and targeted. This effectively solves the problems of incomplete coverage or resource waste caused by relying on human experience in traditional testing, improves the rationality of test environment configuration and test steps, ensures the effectiveness and efficiency of regression testing, and provides a precise testing solution for comprehensive verification after server updates.

[0087] For ease of understanding, this application also provides a complete implementation of a regression testing method for servers, as follows: A data center has deployed a server cluster including servers from different vendors such as Dell and Intel. After the operations and maintenance personnel complete the network driver update for a certain model of server, they need to verify the stability and compatibility of the update using the server regression testing method described in this application. The specific implementation process is as follows: 1. Receiving Regression Test Requests: Maintenance personnel input a request via the system's text interaction function: "Perform regression testing on a server with an updated network driver." In this step, the multimodal interaction module receives the user's text request, the NLP unit parses the input, identifies whether it is a regression test request following a software or hardware firmware update, and ultimately confirms that the request is a legitimate regression test request triggered by the network driver update.

[0088] 2. Intent Recognition and Entity Extraction: The system's NLP module performs semantic analysis on the received regression test requests. In this step, the NLP module extracts the core purpose of the request as the test intent, identifies relevant specific objects to form a set of test entities, and finally obtains the test intent as "compatibility and performance test after network driver update", and the test entity set as "a certain model of network driver, Server-005 server".

[0089] 3. Obtaining Contextual Information: The Retrieval-Augmented Generation (RAG) module performs vector retrieval in a pre-defined knowledge base based on the test intent and test entity set. In this step, the Retrieval-Augmented Generation (RAG) module filters relevant data in the pre-defined knowledge base to form contextual information, ultimately retrieving past compatibility failure records of this network driver model under specific CPU configurations, hardware configuration details of the Server-005 server (CPU: Intel Xeon, 64GB RAM, Operating System: CentOS 7.9), and performance benchmark data for similar drivers.

[0090] 4. Generate Test Environment Information and Test Action Sequence: Input the test intent, test entity set, and context information into the preset large model. In this step, the preset large model analyzes the updated content and potential impact, generates adapted test environment information and test action sequence, and finally outputs the test environment information as "Server-005 server (Intel Xeon CPU, 64GB memory, CentOS 7.9 operating system) + a certain type of network driver", and the test action sequence as "Power-on → Firmware version confirmation → Network driver loading → Compatibility test → 1-hour high-concurrency performance test → Data statistics".

[0091] 5. Obtain the identifier of the server under test: The system parses the configuration parameters in the test environment information, traverses the server cluster, matches servers that meet the parameters, and extracts their identifiers. In this embodiment, the test environment information refers to the hardware and software configuration requirements for regression testing, and the identifier of the server under test refers to information used to uniquely identify the server under test. In this step, the configuration parameters in the test environment information are parsed, the server cluster is traversed, servers that meet the parameters are matched, their identifiers are extracted, and finally the identifier of the server under test is obtained as "Server-005".

[0092] 6. Obtain Hardware Management Tool Identifier: Query the preset identifier mapping database and retrieve the corresponding hardware management tool identifier based on the identifier of the server under test. In this step, the preset identifier mapping database is queried, and the corresponding hardware management tool identifier is retrieved based on the identifier of the server under test. Finally, based on the Intel hardware attributes of Server-005, the corresponding hardware management tool identifier is obtained as "HMT-Intel-003".

[0093] 7. Determine suitable test actions: Analyze each step in the test action sequence, and select suitable test actions based on the hardware characteristics corresponding to the server under test identifier. In this step, analyze each step in the test action sequence, and select suitable test actions based on the hardware characteristics corresponding to the server under test identifier. Finally, remove graphics card test actions that are not related to the Server-005 server hardware, and retain the suitable action sequence of "Power-on → Firmware version confirmation → Network driver loading → Compatibility test → 1-hour high-concurrency performance test → Data statistics".

[0094] 8. Generate Test Control Information: Based on the selected test actions, generate test control information according to the tool protocol corresponding to the hardware management tool identifier. In this step, according to the operational requirements of the test actions, generate the corresponding test control information according to the tool protocol corresponding to the hardware management tool identifier. The final generated test control information includes "boot command, firmware version verification parameters, driver loading path, compatibility test script, high concurrency pressure parameters (concurrency 1000), and data acquisition indicators (CPU utilization, network throughput, error packet rate)".

[0095] 9. Generate Interface Call Request: Following a preset protocol format, integrate the hardware management tool identifier and test control information to generate a standardized interface call request. In this step, the hardware management tool identifier and test control information are integrated according to a preset format, encapsulated to form a complete interface call request, ultimately generating an interface call request containing "HMT-Intel-003 identifier + various test control information".

[0096] 10. Execute test actions and obtain test results: The MCP protocol layer receives the interface call request, locates the target tool according to the hardware management tool identifier, sends test control information, and the tool executes test actions on the adaptation server, collecting data to form test results. In this step, the MCP protocol layer receives the interface call request, matches and calls the corresponding hardware management tool, executes operations on the target server according to the test action sequence, collects data to form test results, and finally the Server-005 server completes all test actions in sequence, collecting test results of "no errors in compatibility test, network throughput meets the standard under high concurrency, peak CPU utilization is 75%, and no error packets are generated".

[0097] This application embodiment accurately receives test requests through a multimodal interaction module, clarifies core test requirements through intent recognition and entity extraction, obtains professional contextual information with the help of the RAG module, generates an adapted test plan based on a preset large model, generates precise interface call requests through step-by-step processing, and finally realizes unified invocation and test execution of hardware management tools through the MCP protocol layer. This solves the problems of incomplete test coverage, fragmented tools, and complex operation in traditional testing, greatly improves the efficiency and accuracy of regression testing, and effectively ensures the stability and reliability of server software or hardware firmware updates.

[0098] In another embodiment of this application, a regression testing apparatus for a server is also provided, such as... Figure 2 As shown, it includes: The receiving module 11 is used to receive a regression test request from the server, wherein the regression test request is triggered after the software or hardware firmware in the server is updated; The determination module 12 is used to determine the test environment information and test action sequence of the regression test based on the regression test request and the preset large model; Generation module 13 is used to generate an interface call request based on the test environment information and the test action sequence; Test module 14 is used to invoke the hardware management tool in the MCP protocol layer corresponding to the test environment information based on the interface call request, so as to execute the corresponding test actions on the server adapted to the test environment information based on the test action sequence and obtain the test results.

[0099] Optionally, the MCP protocol layer encapsulates hardware management interfaces for multiple hardware management tools, each of which corresponds to different server attribute information.

[0100] Optionally, the generation module includes: The first acquisition unit is used to acquire the identifier of the server under test corresponding to the test environment information; The second acquisition unit is used to acquire the hardware management tool identifier corresponding to the identifier of the server under test; The first generation unit is used to generate the interface call request based on the hardware management tool identifier and the test action sequence.

[0101] Optionally, the first generation unit includes: The first determining subunit is used to determine the test action corresponding to the identifier of the server under test in the test action sequence; The first generation subunit is used to generate test control information corresponding to each of the hardware management tool identifiers based on the test action; The second generation subunit is used to generate an interface call request that includes hardware management tool identification and test control information.

[0102] Optionally, the test module includes: The first determining unit is used to determine the hardware management tool identifier and the test control information corresponding to the hardware management tool identifier in the interface call request; The first sending unit is used to send the test control information to the hardware management tool corresponding to the hardware management tool identifier through the MCP protocol layer, so that the hardware management tool corresponding to the hardware management tool identifier can perform corresponding test actions on the server adapted to it based on the test control information and obtain test results.

[0103] Optionally, the determining module includes: The identification unit is used to identify the intent of the regression test request and obtain the test intent and test entity set. The third acquisition unit is used to acquire context information corresponding to the test intent and the test entity set from a preset knowledge base. The knowledge base includes: hardware and software data of multiple servers, historical test data, and historical operation and maintenance data. The second determining unit is used to determine the test environment information and test action sequence of the regression test based on the test intention, the set of test entities, the context information, and the preset large model.

[0104] Optionally, the second determining unit includes: The input subunit is used to input the test intent, the test entity set, and the context information into the preset large model, so that the large model outputs the test environment information and test action sequence of the regression test.

[0105] In another embodiment of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When the processor executes a program stored in memory, it implements the regression testing method for the server described in any of the foregoing method embodiments.

[0106] The electronic device provided in this invention uses a processor to execute a program stored in memory, enabling a preset large model to generate test environment information and a sequence of test actions adapted to regression test requests. This replaces the traditional decision-making method that relies on human experience. Then, through an interface call request, it invokes a hardware management tool matching the test environment information in the MCP protocol layer. The tool then executes test actions in an orderly manner on a compatible server, accurately locating servers that may pose risks after software or hardware firmware updates. This effectively solves the problems of high cost of full-scale testing and incomplete coverage of selective testing in traditional regression testing. Simultaneously, it breaks down the fragmentation barriers of hardware management tools from different manufacturers, significantly improving the efficiency and accuracy of regression testing and ensuring the stability and reliability of the system after server software or hardware firmware updates.

[0107] The communication bus 1140 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0108] The communication interface 1120 is used for communication between the above-mentioned electronic device and other devices.

[0109] The memory 1130 may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0110] The processor 1110 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0111] In another embodiment of this application, a computer-readable storage medium is also provided, on which a program for a regression testing method of a server is stored. When the program for the regression testing method of the server is executed by a processor, it implements the steps of the regression testing method of the server described in any of the foregoing method embodiments.

[0112] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0113] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A regression testing method for a server, characterized in that, include: Receive a regression test request from the server, which is triggered after an update to the software or hardware firmware in the server; The test environment information and test action sequence for the regression test are determined based on the regression test request and the preset large model. Generate an interface call request based on the test environment information and the test action sequence; Based on the interface call request, the hardware management tool corresponding to the test environment information in the MCP protocol layer is invoked to execute the corresponding test actions on a server adapted to the test environment information, based on the test action sequence, and obtain the test results.

2. The regression testing method for a server according to claim 1, characterized in that, The MCP protocol layer encapsulates hardware management interfaces for multiple hardware management tools, each of which corresponds to different server attribute information.

3. The regression testing method for a server according to claim 1, characterized in that, Generate an interface call request based on the test environment information and the test action sequence, including: Obtain the identifier of the server under test corresponding to the test environment information; Obtain the hardware management tool identifier corresponding to the identifier of the server under test; The interface call request is generated based on the hardware management tool identifier and the test action sequence.

4. The regression testing method for a server according to claim 3, characterized in that, The interface call request is generated based on the hardware management tool identifier and the test action sequence, including: In the test action sequence, determine the test action corresponding to the identifier of the server under test; Based on the test actions, test control information corresponding to each of the hardware management tool identifiers is generated; Generate an interface call request that includes the hardware management tool identifier and test control information.

5. The regression testing method for a server according to claim 1, characterized in that, Based on the interface call request, the hardware management tool corresponding to the test environment information in the MCP protocol layer is invoked to execute corresponding test actions on a server adapted to the test environment information, based on the test action sequence, to obtain test results, including: Determine the hardware management tool identifier and the corresponding test control information in the interface call request; The test control information is sent to the hardware management tool corresponding to the hardware management tool identifier through the MCP protocol layer, so that the hardware management tool corresponding to the hardware management tool identifier can perform corresponding test actions on the adapted server based on the test control information and obtain test results.

6. The regression testing method for a server according to claim 1, characterized in that, Based on the regression test request and the preset large model, determine the test environment information and test action sequence for the regression test, including: The regression test request is subjected to intent recognition to obtain the test intent and test entity set; In a preset knowledge base, context information corresponding to the test intent and the test entity set is obtained. The knowledge base includes: hardware and software data of multiple servers, historical test data, and historical operation and maintenance data. The test environment information and test action sequence for regression testing are determined based on the test intent, the set of test entities, the context information, and the preset large model.

7. The regression testing method for a server according to claim 6, characterized in that, Based on the test intent, the set of test entities, the context information, and the preset large model, the test environment information and test action sequence for regression testing are determined, including: The test intent, the set of test entities, and the context information are input into the preset large model so that the large model outputs the test environment information and test action sequence for regression testing.

8. A regression testing device for a server, characterized in that, include: A receiving module is used to receive regression test requests from the server, wherein the regression test requests are triggered after software or hardware firmware updates in the server. The determination module is used to determine the test environment information and test action sequence for the regression test based on the regression test request and the preset large model; The generation module is used to generate interface call requests based on the test environment information and the test action sequence; The testing module is used to invoke the hardware management tool in the MCP protocol layer corresponding to the test environment information based on the interface call request, so as to execute the corresponding test actions on a server adapted to the test environment information, based on the test action sequence, and obtain the test results.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the regression testing method of the server according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program for a regression testing method for a server, which, when executed by a processor, implements the steps of the regression testing method for a server according to any one of claims 1-7.