Multi-protocol test rule sharing management system, method and program product
By designing a multi-protocol test rule sharing management system, the problems of low efficiency and poor accuracy of testing rule management in the existing technology are solved, efficient and flexible testing rule creation and sharing are achieved, and software quality and test coverage are improved.
Patent Information
- Application Number
- CN202410517656.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2024-11-29
AI Technical Summary
In the prior art, the multi-protocol test rule sharing management is low efficiency, poor accuracy, and poor scalability, limited support protocols, difficult rule sharing, confusing rule storage, and single rule usage scenarios, resulting in low test management efficiency and low software quality.
A multi-protocol test rule sharing management system is designed, including rule creation module, rule sharing management module and rule application module, supporting multiple network protocols, providing rule editor, rule tester, rule memory, rule queryer, rule matching and rule executors, adopt intelligent rule templates and rule version management, to ensure the reusability and consistency of rules.
Improves testing efficiency and coverage, reduces testing costs, enhances testing flexibility and software quality, ensures the accuracy and reliability of test results, and supports testing requirements for multiple protocols and scenarios.
Smart Images

Figure CN119046128A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer software product testing, and in particular to a multi-protocol test rule sharing management system, method and program product. Background Art
[0002] With the continuous development of software development technology, testing plays an increasingly important role in the software development process. Test rules are an important basis for testers to define test conditions and actions. There are many problems with the traditional multi-protocol test rule sharing management method. The first is low efficiency. Testers need to manually create and manage test rules, which is not only time-consuming and labor-intensive, but also prone to omissions or errors. Secondly, the accuracy is poor, and test rules are prone to human errors, resulting in inaccurate test results. In addition, the scalability is poor, and the traditional multi-protocol test rule sharing management method is difficult to adapt to the continuous expansion of the test scale.
[0003] At the same time, mock technology, as an important means of software testing, can simulate various behaviors and external dependencies of the system in order to conduct unit testing, integration testing and system testing, and improve test coverage and efficiency. However, there are some shortcomings in the existing mock testing methods. For example, a certain mock platform is based on mock management of the current usage scenario, that is, the current set rules are currently used, and the rules are no longer reused afterwards, and it is not easy to trace back when problems are found. The shortcomings of a certain mock platform implementation include: most of the support modes only support HTTP request mocks, and do not support Dubbo, Socket, etc.; rule sharing does not support rule sharing, and can only be viewed and edited by the current user; rule storage is stored according to the rules themselves, and is not grouped according to interface characteristics; the rule usage scenario is one-time, and the original rules are no longer reused later. These problems seriously restrict the management and utilization efficiency of test rules.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] In view of the problems in the prior art, the purpose of the present invention is to provide a multi-protocol test rule sharing management system, method and program product, which can effectively solve the problems of low efficiency, poor accuracy, poor scalability, limited support for protocols, difficulty in rule sharing, confusing rule storage, and single rule usage scenario in the prior art of multi-protocol test rule sharing management.
[0006] An embodiment of the present invention provides a multi-protocol test rule sharing management system, the system comprising:
[0007] A rule creation module, used to create test rules, the test rules support at least one network protocol;
[0008] Rule sharing management module, used for sharing management of test rules;
[0009] The rule application module is used to apply the test rules to the actual test scenario.
[0010] Furthermore, the rule creation module includes:
[0011] Rule editor, used to edit test rules;
[0012] Rule tester, used to test the validity of test rules.
[0013] Furthermore, the rule sharing management module includes:
[0014] A rule storage device for storing test rules;
[0015] Rule query, used to query test rules.
[0016] Furthermore, the rule application module includes:
[0017] The rule matcher is used to match the test rules and the network protocols required by the actual test scenario; the rule executor is used to execute the test rules.
[0018] Furthermore, the rule creation module also includes: an intelligent rule template, which is used to automatically match the test rule template according to the test scenario.
[0019] Furthermore, the rule sharing management module also includes: rule version management, which is used to manage the versions of the test rules.
[0020] Furthermore, the test rule also includes: a rule priority, which is used to describe the priority of the test rule.
[0021] Furthermore, the test rules include:
[0022] Rule conditions, which are used to describe the applicable conditions of the test rules;
[0023] Rule action, used to describe the execution action of the test rule.
[0024] Furthermore, the rule application module also includes: a rule conflict resolver for resolving test rule conflicts.
[0025] Furthermore, the multi-protocol test rule sharing management system also includes: a rule analysis module, which is used to analyze the validity and integrity of the test rules.
[0026] The embodiment of the present invention also provides a multi-protocol test rule sharing management method, comprising the following steps:
[0027] Create test rules, select the protocols supported by the test rules, and edit the contents of the test rules;
[0028] Apply the test rules to the actual test scenario, match the protocols supported by the test rules with the protocols of the actual test scenario, and execute the test rules;
[0029] Manage test rules and store test rules.
[0030] Further, the step of creating the test rules includes using the intelligent rule template to automatically match the test rule template according to the test scenario.
[0031] Furthermore, the step of applying the test rules to the actual test scenario includes resolving the test rule conflicts using a rule conflict resolver.
[0032] An embodiment of the present invention further provides a multi-protocol test rule sharing management program product, including computer instructions, which implement the steps of the above method when executed by a processor.
[0033] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
[0034] The multi-protocol test rule sharing management system, method and program product of the present invention have the following beneficial effects:
[0035] Improve test efficiency: Through the design of the rule creation module, testers can quickly create and edit test rules, which can significantly improve the efficiency of test rule creation and management, support multiple protocols, and meet the needs of different test scenarios.
[0036] Reduce testing costs: The rule sharing management module of the present invention adopts a rule storage and a rule query, which can efficiently store and retrieve test rules. The rule version management function can help testers to timely understand the change history of rules, avoid repeated creation of rules and waste of resources, and reduce testing costs.
[0037] Improve test coverage: The rule application module of the present invention introduces a rule matcher and a rule executor, which can intelligently match and execute test rules, effectively improve test coverage, and ensure the comprehensiveness and accuracy of the test.
[0038] Enhanced test flexibility: Through the rule priority function, testers can flexibly adjust the execution order of test rules to adapt to different test scenarios, thereby improving test flexibility and applicability.
[0039] Improve software quality: The technical solution of the present invention can effectively solve many problems existing in the traditional multi-protocol test rule sharing management method. By improving test efficiency, reducing test costs, increasing test coverage and enhancing test flexibility, it can ultimately improve the quality of software testing and ensure the stability and reliability of software products. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.
[0041] Figure 1 is a schematic diagram of a multi-protocol test rule sharing management system according to an embodiment of the present invention;
[0042] Figure 2 It is a schematic diagram of the architecture of a multi-protocol test rule sharing management system according to an embodiment of the present invention;
[0043] Figure 3 It is a schematic diagram of a multi-protocol test rule sharing management system supporting Dubbo Mock service according to an embodiment of the present invention;
[0044] Figure 4 It is a schematic diagram of a multi-protocol test rule sharing management system supporting a Socket Mock service according to an embodiment of the present invention;
[0045] Figure 5 It is a flowchart of a multi-protocol test rule sharing management method according to an embodiment of the present invention;
[0046] Figure 6 It is a schematic diagram of the test rule creation and test rule sharing process of the multi-protocol test rule sharing management method according to an embodiment of the present invention;
[0047] Figure 7 It is a schematic diagram of a test rule viewing process of a multi-protocol test rule sharing management method according to an embodiment of the present invention;
[0048] Figure 8 It is a schematic diagram of a front-end test rule configuration page of a multi-protocol test rule sharing management system according to an embodiment of the present invention;
[0049] Fig. 9 It is a schematic diagram of a front-end test rule management page of a multi-protocol test rule sharing management system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0051] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0052] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined. Therefore, the actual execution order may be changed according to the actual situation.
[0053] like Figure 1 As shown, the multi-protocol test rule sharing management system provided by the embodiment of the present invention is used to solve the problems of multi-protocol test rule sharing management in the prior art, including limited support for network protocols, inability to share test rules, unreasonable rule storage, etc. The system includes a rule creation module, a rule sharing management module and a rule application module, and through the synergy of these modules, the creation, sharing and application of test rules are realized.
[0054] Multi-protocol test rule sharing management system, the system includes:
[0055] A rule creation module, used to create a test rule, the test rule supports at least one network protocol;
[0056] Rule sharing management module, used for sharing management of test rules;
[0057] The rule application module is used to apply the test rules to the actual test scenario.
[0058] In this embodiment, for example, a software application that supports HTTP and WebSocket protocols is tested. Through the rule creation module, the tester can create a rule to simulate the scenario of receiving a message sent by a user. In the rule creation module, the rule conditions, such as user ID, message content, etc., can be specified, and the rule actions can be defined, such as simulating server replies, recording response time, etc. These rules can be flexibly adapted to different network protocols and test scenarios. The rule sharing management module implements shared test rules to ensure the consistency and reliability of the test results. With the support of the rule sharing management module, the created rules can be stored in the shared rule library and sharing permissions can be set. For example, specific rules can be shared with other test team members or different project groups so that they can be reused in related projects, thereby improving test efficiency and the reuse rate of rules. The rule application module applies the created test rules to the actual test scenario. Through the rule application module, the rules can be matched with the actual test scenario, the test is executed and the test results are obtained.
[0059] The implementation of the multi-protocol test rule sharing management system can improve test efficiency. The application of the rule creation module and the rule sharing management module makes the creation, storage and sharing of test rules easier and more efficient, thereby improving the overall test efficiency. Enhance test consistency. The use of the rule sharing management module ensures the consistency of test rules. Different teams can share and reuse the same rules, reducing differences in the test process and improving the reliability of test results. Accelerate test feedback. The implementation of the rule application module allows test rules to be directly applied to actual test scenarios, accelerating the execution and feedback of tests, helping to promptly discover and solve problems in the software and improving software quality.
[0060] Optionally, the rule creation module includes:
[0061] Rule editor, used to edit test rules;
[0062] Rule tester, used to test the validity of test rules.
[0063] In this embodiment, the rule creation module includes two parts: a rule editor and a rule tester. The rule editor is used to create test rules, and the tester can define the parameters and conditions of the test rules through the editor. The rule tester is used to verify the validity of the test rules, and the tester can test the created rules through the tester to ensure that the rules can accurately simulate the actual operation and produce the expected test results. Under the implementation of the rule creation module, the test team can more easily create and verify the test rules, which improves the quality and reliability of the test rules. At the same time, the use of the rule creation module simplifies the creation and verification process of the test rules, saving the time and energy of the tester. In addition, the accuracy and reliability of the rules are also improved, which helps to reduce the test failures and rework caused by test rule errors, and further reduces the test cost. Finally, the implementation of the rule creation module enhances the flexibility and adaptability of the test, so that the test team can better cope with different test scenarios and requirements, and improves the overall test efficiency.
[0064] Optionally, the rule sharing management module includes:
[0065] A rule storage device for storing test rules;
[0066] Rule query, used to query test rules.
[0067] In this embodiment, the rule sharing management module includes two parts: a rule storage and a rule query. The rule storage is used to store the created test rules and effectively save them in the system for subsequent use. The storage has efficient and reliable data storage and retrieval functions to ensure the integrity and security of the rules. The rule query provides the function of querying the test rules stored in the system. The tester can quickly retrieve the required test rules through the query and perform further operations. Through the implementation of the rule sharing management module, the test team can manage and use the test rules more conveniently. The use of the rule storage effectively solves the storage and management problems of the test rules, so that the test rules can be safely stored and maintained for a long time. The implementation of the rule query improves the accessibility and usability of the test rules. The tester can quickly find the required rules and save the time of finding the rules. In addition, the implementation of the rule sharing management module also promotes communication and collaboration within the test team. Different team members can share and use existing test rules, avoid duplication of work, and improve work efficiency.
[0068] With the implementation of the rule sharing management module, the storage efficiency and management efficiency of test rules are improved, saving storage space and management costs. The accessibility and usability of test rules are enhanced, testers can obtain the required rules more quickly, and the execution efficiency of tests is improved. It promotes collaboration and sharing within the team, avoids duplication of work, and improves overall work efficiency.
[0069] Optionally, the rule applicable modules include:
[0070] Rule matcher, used to match test rules with the network protocols required by the actual test scenario;
[0071] Rule executor, used to execute test rules.
[0072] In this embodiment, the rule application module includes two parts: a rule matcher and a rule executor. The rule matcher is used to match the corresponding test rules according to the network protocol required by the actual test scenario, ensuring that the selected rules match the scenario for subsequent test execution. The matcher has the function of efficiently and accurately matching rules, and can quickly locate the applicable rules according to the characteristics of the scenario, thereby improving the execution efficiency of the test. The rule executor is used to execute the matched test rules, and according to the conditions and actions defined in the rules, perform corresponding operations on the test scenario to simulate the real test environment and obtain test results. Through the implementation of the rule application module, the test team can more conveniently apply the test rules to the actual test scenario and perform effective test execution. The use of the rule matcher can ensure that the selected test rules are consistent with the actual scenario, avoiding unnecessary test errors and test failures. The implementation of the rule executor ensures the effective execution of the test rules, and the tester can perform corresponding operations on the scenario according to the definition of the rules to obtain accurate test results.
[0073] Optionally, the rule creation module also includes: an intelligent rule template, which is used to automatically match the test rule template according to the test scenario.
[0074] In this embodiment, the intelligent rule template is intended to improve the efficiency and accuracy of test rule creation, and to provide users with appropriate rule templates by automatically matching test scenarios, thereby simplifying the rule creation process. The implementation of the intelligent rule template can be divided into the following steps:
[0075] Scenario analysis: The system analyzes the user input or the characteristics of the current test scenario to understand the protocol, data format, interaction logic and other information of the test scenario.
[0076] Template matching: Based on the results of scenario analysis, the system automatically matches rule templates that are suitable for the current test scenario. These templates may include common test rule structures, conditions, and actions, as well as customized templates for specific protocols or data formats.
[0077] Intelligent recommendation: The system displays the matched rule templates to the user and makes intelligent recommendations based on the needs of specific scenarios. Users can select the appropriate template from the recommendation list for further editing and customization.
[0078] Customized editing: After selecting a template, the user can customize the template and modify the conditions, actions and other contents in the template according to specific test requirements and scenario characteristics to ensure the accuracy and applicability of the rules.
[0079] Rule creation: After the user completes editing and customization of the rule template, the system generates the final test rules and saves them to the rule library for subsequent use.
[0080] Through the implementation of intelligent rule templates, testers can create test rules more efficiently without having to manually write complex rule structures, which reduces the threshold and difficulty of rule creation. At the same time, intelligent rule templates can also provide customized recommendations and editing functions to meet the needs of different test scenarios, further improving the accuracy and flexibility of rule creation.
[0081] Optionally, the rule sharing management module also includes: rule version management, which is used to manage the versions of test rules.
[0082] In this embodiment, rule version management aims to effectively manage the version information of the test rules, including the creation history, modification records and difference comparison between versions of the rules, so as to ensure the validity and consistency of the rules. The implementation of rule version management may include the following steps:
[0083] Version record: The system records version information each time a test rule is created, edited, or updated, including key information such as version number, creation time, and modifier. This information will be stored in the rule base for subsequent query and management.
[0084] Version comparison: The system provides a version comparison function, allowing users to compare the differences and changes between different versions, so as to timely discover the modified content and impact scope of the rules. The comparison results can be presented in a visual way to facilitate user analysis and decision-making.
[0085] Version backtracking: Users can select a specific version to perform backtracking operations as needed, and restore to the rule status of a certain historical version. This can avoid problems caused by rule modifications and ensure the stability and reliability of the testing process.
[0086] Version control: The system provides permission control and approval process to ensure that the management and modification of rule versions comply with the prescribed process and permission requirements. Only authorized users can edit and publish rules, thus ensuring the security and controllability of rules.
[0087] Through the implementation of intelligent rule templates, the version management efficiency of test rules is improved, and the modification history and change records of rules are clearly visible, which is conducive to team collaboration and communication. The traceability and controllability of rules are enhanced. Users can view and trace back historical versions at any time, discover and solve problems in time, and improve the stability and reliability of rules. The risk of rule management is reduced, the modification and release process of rules is standardized, and the misuse and spread of erroneous rules are avoided, which is conducive to the healthy development of rule management systems. The efficiency of rule sharing and collaboration is improved. Different teams or users can share and manage rules more conveniently, which promotes the community and co-construction and sharing of rule management systems.
[0088] Optionally, the test rule also includes: a rule priority, which is used to describe the priority of the test rule. In this embodiment, the rule priority is intended to help users effectively manage and execute the test rules, and to sort and schedule the test rules according to the importance and execution order of the rules. The implementation of the rule priority may include the following:
[0089] Priority definition: The system allows users to set the priority for each test rule, which usually includes high, medium, and low levels. Priority can also be customized according to specific needs. Users can flexibly set the priority of rules according to the importance and execution order of the rules to meet the needs of different test scenarios.
[0090] Priority adjustment: Users can adjust the priority of test rules at any time and flexibly adjust the execution order of rules according to actual conditions. The system provides a simple operation interface or command interface to facilitate users to modify and manage priorities.
[0091] Execution order: The system automatically determines the execution order based on the priority of the rules, and prioritizes the execution of high-priority rules during the test process to ensure that key rules can be executed and verified in a timely manner. Users can also manually adjust the execution order as needed to meet the requirements of specific test scenarios.
[0092] Through the implementation of rule priorities, the execution efficiency of test rules is improved, important rules are executed first, the efficiency and speed of the test process are improved, and it is conducive to timely discovery and problem solving. The priority of test rules enhances the flexibility and controllability of test rules. Users can flexibly set and adjust the priority of rules according to actual needs to meet the needs of different test scenarios, improving the applicability and flexibility of the system. The management and scheduling of test rules are improved. The system automatically determines the execution order according to the priority of the rules, simplifies the user's operation process, and improves the ease of use and user experience of the system. The accuracy and reliability of test results are optimized, key rules are executed first, the effectiveness of key functions and business processes is guaranteed, the test risks are reduced, and the stability and reliability of the system are improved.
[0093] Optionally, test rules include:
[0094] Rule conditions, which are used to describe the applicable conditions of the test rules;
[0095] Rule actions, used to describe the execution actions of test rules
[0096] In this embodiment, the rule condition is used to define the applicable conditions of the rule, and the rule action is used to describe the execution action of the rule. These functions will help users to more accurately control the execution process and results of the test rules.
[0097] Rule condition functions include:
[0098] Condition definition: Users can flexibly define the applicable conditions of test rules according to test requirements and scenarios. These conditions can be defined based on specific attributes of the request (such as request header, request body, etc.), environment variables, system status, etc. to achieve precise control of the rules.
[0099] Condition matching: The system can match the request or test scenario to determine whether it meets the applicable conditions defined by the rule. If the request or scenario meets the rule conditions, the corresponding rule will be triggered for execution; otherwise, the rule will be ignored and will not affect the test results.
[0100] Condition combination: Users can combine multiple conditions to achieve more complex rule logic. The system supports logical operations (such as AND, OR, NOT, etc.), and users can combine multiple conditions as needed to meet different test scenarios and requirements.
[0101] Rule action functions include:
[0102] Action definition: Users can define execution actions for each test rule to describe the operation that should be performed when the rule is triggered. These actions can include request forwarding, response modification, logging, alarm triggering, etc. to meet different test purposes and requirements.
[0103] Action execution: The system executes the corresponding rule action according to the conditions under which the rule is triggered. Users can define specific operation logic in the rule action, and the system will execute the corresponding action in the way set by the user to achieve the expected test effect.
[0104] Action combination: Users can combine multiple actions to achieve more complex test operations. The system supports sequential or concurrent execution of multiple actions. Users can define multiple action combinations as needed to achieve richer test scenarios and functions.
[0105] Through the implementation of rule conditions and rule actions, the flexibility and accuracy of test rules are improved. Users can define the applicable conditions and execution actions of rules according to specific needs, and achieve precise control and customization of the test process. The scalability and applicability of test rules are enhanced. The system supports a variety of combinations of conditions and actions. Users can flexibly combine rules according to different test scenarios and needs to achieve richer test functions. The efficiency and effectiveness of the test process are improved. Through precise condition matching and action execution, the system can quickly and accurately trigger and execute test rules, improving test efficiency and the accuracy of results. The management and maintenance of test rules are optimized. Users can clearly understand the role and impact of each rule through the definition of conditions and actions, which facilitates subsequent rule management and maintenance.
[0106] Optionally, the rule application module also includes: a rule conflict resolver for resolving test rule conflicts.
[0107] In this embodiment, rule conflicts are common problems in the process of multi-protocol test rule sharing and management, especially when there are many rules and they are complex. In order to ensure the effectiveness and consistency of the test rules, it is necessary to resolve conflicts between the rules in a timely manner to ensure the accuracy and stability of the test process.
[0108] The functions of the rule conflict resolver include:
[0109] Conflict detection: The system can automatically detect conflicts between test rules, including condition conflicts and action conflicts. Condition conflicts refer to conflicts between the applicable conditions of multiple rules, while action conflicts refer to conflicts between the execution actions of multiple rules. The system can detect these conflicts in a timely manner, mark them, and handle them.
[0110] Conflict Analysis: The Rule Conflict Solver can conduct in-depth analysis of detected conflicts to understand the causes and impact of conflicts. Through conflict analysis, you can better understand the relationship between rules and develop reasonable solutions.
[0111] Conflict resolution: The system provides a variety of conflict resolution strategies, including priority adjustment, action merging, condition modification, etc. According to the actual situation and user needs, you can flexibly select the appropriate resolution strategy to resolve rule conflicts and ensure the consistency and effectiveness of test rules.
[0112] Conflict prevention: The rule conflict resolver can also perform preventive detection during the rule creation and editing stages to avoid rule conflicts. The system analyzes the applicable conditions and execution actions of the rules, detects potential conflict issues in advance, and provides warnings and suggestions to users to reduce the probability of conflicts.
[0113] Through the implementation of the rule conflict resolver, the efficiency and accuracy of the shared management of multi-protocol test rules have been improved. The rule conflict resolver can promptly detect and resolve conflicts between rules, avoiding test execution errors and inaccurate results caused by conflicts. The reliability and stability of test rules have been enhanced. By detecting and resolving rule conflicts, the system can ensure the consistency and effectiveness of test rules, and improve the stability and reliability of the test process. The complexity and risk of shared management of multi-protocol test rules have been reduced. The rule conflict resolver provides a variety of conflict resolution strategies and preventive measures. Users can choose the appropriate method according to the specific situation, which reduces the complexity and risk of the rule management process and improves management efficiency and quality.
[0114] Optionally, the multi-protocol test rule sharing management system further includes: a rule analysis module for analyzing the validity and integrity of the test rules.
[0115] In this embodiment, the rule analysis module is intended to conduct a comprehensive analysis of the test rules and evaluate their effectiveness and completeness, thereby helping users optimize and improve the multi-protocol test rule sharing management process.
[0116] The main functions of the rule analysis module include:
[0117] Validity Analysis: This module can evaluate the validity of the test rules and verify whether the rules can be correctly applied in the actual test scenario. By analyzing the rule conditions and actions, the system can identify potential problems and errors and promptly discover logical defects or inconsistencies in the rules.
[0118] Completeness analysis: The rule analysis module can check the completeness of the test rules to ensure that the rules cover all test scenarios and possible situations. By analyzing the content and scope of application of the rules, the system can determine whether the rules cover all necessary conditions and actions, avoiding test omissions and missed tests caused by incomplete rules.
[0119] Performance evaluation: This module can also evaluate the performance of test rules and analyze the execution efficiency and resource consumption of rules. By monitoring and collecting statistics on the rule execution process, the system can evaluate the execution speed and performance bottlenecks of the rules and provide users with optimization suggestions and improvement plans.
[0120] Rule optimization: Based on the analysis results of the rules, the rule analysis module can provide users with suggestions and guidance for rule optimization. By identifying potential problems and room for improvement in the rules, the system can help users optimize the content and structure of the rules and improve the quality and efficiency of the rules.
[0121] Through the implementation of the rule analysis module, the quality and efficiency of rule management can be improved. The rule analysis module can comprehensively evaluate the effectiveness and completeness of test rules, help users to promptly discover and solve problems in the rules, and improve the quality and efficiency of rule management. Reduce test risks and costs. Through performance evaluation and optimization suggestions for rules, the system can help users reduce risks and costs in the testing process and improve the reliability and economy of testing. Optimize test processes and resource utilization. The rule analysis module can identify performance bottlenecks and resource waste problems during rule execution, provide users with guidance on optimizing test processes and resource utilization, and improve test efficiency and benefits.
[0122] like Figure 2 As shown, a schematic diagram of the architecture of a multi-protocol test rule sharing management system provided by an embodiment of the present invention is shown. The system architecture consists of a Mock-Service, a Proxy-Service, and a service access layer for mobile terminals and web terminals.
[0123] The Mock service provides a number of functions, including Mock service configuration, Mock scenario, Cloud CI triggering, and interface document parsing services. In addition, the Mock service also provides external docking functions, including docking with external systems such as YuanGe and SONA. The Mock service also includes a Dubbo plug-in, including Dubbo agent and DubboMock, which are used to manage the test rules of the Dubbo protocol. The support for these functions is achieved through proxy logs and rule storage such as Rule rules, Doc documents, and Log logs provided by Mysql. In this embodiment, first, the Mock service configuration allows users to flexibly configure the Mock service to meet different testing requirements. Secondly, the Mock scenario function enables users to create and manage Mock rules according to actual test scenarios, improving the accuracy and practicality of the test. The Cloud CI trigger function realizes integration with the cloud continuous integration system, so that the Mock service can be automatically triggered according to the test results, further improving the automation of the test. In addition, the Mock service also provides an interface document parsing service that can parse the information in the interface document and apply it to the creation and management of Mock rules. In addition, the Mock service also has an external docking function, which can be docked with external systems such as YuanGe and SONA, achieving seamless integration with other testing and development tools. In particular, the Mock service also includes the Dubbo plug-in, including the Dubbo agent and DubboMock, which are specifically used to manage the test rules of the Dubbo protocol. The support of these functions mainly relies on the proxy logs and rule storage such as Rule rules, Doc documents, and Log logs provided by MySQL, which ensures the stability and reliability of the Mock service. The Mock service provides users with efficient and convenient multi-protocol test rule sharing management and sharing services by providing rich functions and flexible configuration options. Through integration with the cloud continuous integration system and docking with other external systems, the Mock service can achieve a higher level of automated testing, and can flexibly respond to different testing requirements, improving the efficiency and quality of testing.
[0124] The main functions of the Proxy service include implementing a global interception service (Global Proxy-Filter) and using Redis and Kafka to provide multiple services, such as device management, WebSocket client monitoring management, proxy data processing, and Mock rule processing. First, the Proxy service implements a global interception service, which can intercept and process all requests in the system, ensuring that each request is processed and managed uniformly, thereby improving the controllability and stability of the system. Secondly, the Proxy service provides device management functions through Redis and Kafka, which can effectively manage the devices in the system, including operations such as device registration, monitoring, and status updates, providing the system with device-level management and monitoring capabilities. In addition, the Proxy service also implements the WebSocket client monitoring and management function, which can monitor the connection status and data transmission of the WebSocket client in the system, and respond and process in a timely manner to ensure the stability and reliability of the WebSocket service. In addition, the Proxy service also provides a proxy data processing function, which can proxy and process the data in the system, including operations such as data forwarding, parsing, and filtering, providing the system with data-level management and processing capabilities. Finally, the Proxy service is also responsible for Mock rule processing, and can process and respond to requests according to the Mock rules in the system, thereby realizing the simulation and debugging of requests, and providing convenience for system testing and debugging. The Proxy service provides comprehensive device management, WebSocket client monitoring management, proxy data processing, and Mock rule processing functions for the system by implementing global interception services and using Redis and Kafka to provide multiple services, thereby realizing comprehensive management and processing of system requests and improving the controllability, stability, and reliability of the system.
[0125] The service access layer for mobile and web terminals is designed to provide multi-terminal and multi-protocol testing services for mobile and web terminals, so as to meet the testing needs of different types of applications and scenarios. For mobile terminals, the service access layer can support multiple application types, including APP, H5, Doric, etc., and can provide corresponding testing services for different application types. For example, for native applications (APP), the service access layer can provide testing services based on the HTTP protocol; for H5 applications, it provides testing services suitable for H5 pages; and for Doric applications, it provides testing services suitable for the Doric framework. In addition, the service access layer can also support protocols such as Dubbo and SONA, providing richer and more comprehensive testing services for mobile terminals. For web terminals, the service access layer provides more diverse and comprehensive testing services. In addition to providing basic API testing services, it also includes functions such as embedded point testing, long connection testing, and H5 remote debugging, which can meet the testing needs of web terminals in different scenarios. In addition, the service access layer also provides interface and scenario-based Mock testing services, which can help developers quickly build a test environment and perform interface and scenario-based simulation tests. The service access layer provides comprehensive, flexible and efficient testing solutions for mobile and web terminals by supporting multi-terminal and multi-protocol testing services. It can meet the testing needs in different application scenarios and improve the efficiency and quality of testing.
[0126] like Figure 3As shown, the schematic diagram of the multi-protocol test rule sharing management system provided by the embodiment of the present invention supports dubbo service. The mock solution of the Dubbo interface provided by the multi-protocol test rule sharing management system is implemented as follows: in the middle of the service container to the backend service process, the DUBBO interface is loaded through BeanPostProcesser and MockInvocationHandler to provide the Invocation proxy interface to realize data simulation service and interface document parsing. The characteristic of this solution is that it is implemented based on the consumer, and the service party does not need to modify any data or simulate a new service party. When the Dubbo interface call occurs, the consumer service will obtain the simulated data from the mock rule and perform different processing and judgment according to the acquisition result. This implementation method helps to realize the efficient implementation of data simulation service and interface document parsing, while reducing the workload and dependence of the service party. The implementation of this technical solution makes the mock of the Dubbo interface more flexible and efficient. The consumer service can quickly obtain the simulated data according to the mock rule, thereby realizing the simulated call of the Dubbo interface. This method not only simplifies the operation of the service party, reduces the intervention of the service party, but also improves the efficiency and accuracy of the test. Through interface document parsing and data simulation services, developers can more easily conduct interface testing and functional verification, shorten the development cycle, and reduce the cost of system development and maintenance. At the same time, the flexibility and scalability of consumer services have also been improved, facilitating further optimization and expansion of the system.
[0127] like Figure 4As shown, the schematic diagram of the multi-protocol test rule sharing management system provided by the embodiment of the present invention supporting the Socket Mock service, the technical solution adopted for the mock implementation of the Socket message, first, the system can capture the Socket message in real time by monitoring the communication between the application server and the client. This process realizes the dynamic monitoring and data capture of the Socket communication, and provides the necessary data support for the subsequent mock service. Specifically, using kafka as the message middleware, when the application server and the client communicate, the Socket message is sent to the kafka queue, thereby realizing the real-time capture and transmission of the message. Secondly, in order to simulate the sending process of the Socket message, the back-end service API interface of the application server is called through the mock service. This process uses the powerful function of the Dubbo framework, can flexibly call the interface of the back-end service, and simulate the sending process of the Socket message. In this way, the system can accurately simulate the sending and receiving of the Socket message in the simulated environment, and provide a reliable basis for the testing and verification of the system. Through the implementation of this technical solution, the multi-protocol test rule sharing management system can effectively support the implementation of the Socket Mock service. By capturing Socket messages in real time and simulating the message sending process, the system can perform comprehensive Socket communication tests in a simulated environment, including message transmission and processing under normal and abnormal conditions. This helps improve the stability and reliability of the system, while accelerating the development and testing cycle and improving the overall quality and performance of the system.
[0128] like Figure 5 As shown, a flow chart of a multi-protocol test rule sharing management method provided by an embodiment of the present invention is provided, and the multi-protocol test rule sharing management method comprises the following steps:
[0129] S100, create a test rule, select the protocol supported by the test rule, and edit the content of the test rule; in this embodiment, the user can specify the protocol type applicable to the test rule, set related rule conditions and actions, and define other rule parameters.
[0130] Optionally, the step of creating a test rule includes using an intelligent rule template to automatically match a test rule template according to a test scenario. This function can greatly simplify the test rule creation process and improve user work efficiency.
[0131] S200, applying the test rules to the actual test scenario, matching the protocols supported by the test rules with the protocols of the actual test scenario, and executing the test rules; this helps ensure that the test rules can be accurately applied in the actual test environment, thereby improving the reliability and effectiveness of the test.
[0132] Optionally, the step of applying the test rules to the actual test scenario includes using a rule conflict resolver to resolve the test rule conflicts. Through the rule conflict resolver, the system can automatically detect and resolve conflicts between test rules to ensure the smooth progress of the test process.
[0133] S300, managing test rules, storing test rules. In this embodiment, this step is used to manage test rules, including storing and maintaining test rules. The system will store the created test rules in a database or other storage medium, and provide corresponding management functions, such as editing, deleting and querying. This helps users to conveniently manage a large number of test rules and ensure the validity and availability of the test rules.
[0134] The multi-protocol test rule sharing management method can realize the flexible creation, accurate application and efficient management of test rules, providing testers with a convenient, fast and reliable test rule management solution.
[0135] like Figure 6 As shown, a schematic diagram of the test rule creation and test rule sharing process of the multi-protocol test rule sharing management method provided by an embodiment of the present invention includes a test rule creation process and a test rule sharing process.
[0136] Create test rule process: Users can create test rules by interacting with the front-end page. In this process, users can choose one of two ways to define rules according to actual needs: one is to simulate and capture interface information, and the other is to manually fill in rule information. No matter which method is chosen, users can create private rules. During the creation of test rules, the system provides support for multiple network protocols, including http, dubbo, and socket, etc. Users can select appropriate network protocols according to specific needs to define and configure rules. The test rule creation process of the present invention simplifies the user's definition and configuration process of test rules and improves the user's operation convenience and efficiency. Users can choose a suitable rule creation method according to actual conditions, and flexibly configure rules under multiple network protocols to meet the testing needs in different scenarios. Such a technical solution helps to improve the customization and flexibility of test rules, shorten the creation cycle of test rules, and improve the efficiency and quality of testing work. At the same time, the simplified creation process also reduces the user's learning cost and promotes the wide application and promotion of test rules.
[0137] Test rule sharing process: After the test rule is created, users can enable sharing of the rule according to different message types. Specifically, different types of messages, including dubbo interface, http interface and socket interface, will be different when enabling rule sharing. For example, for dubbo interface, rule sharing is enabled by default, while for http interface and socket message, sharing needs to be enabled manually on the private page. Users can flexibly choose the sharing method according to actual needs.
[0138] like Figure 7 As shown, a schematic diagram of the test rule viewing process of the multi-protocol test rule sharing management method provided by an embodiment of the present invention is shown. In this process, the rule viewing is divided into three parts: http rules, dubbo rules, and socket message rules. Users can select the corresponding rule type for viewing as needed. After selecting the rule, the system will determine whether the rule is a private rule. If it is a private rule, it will only be displayed on the private rule page; if it is not a private rule, the rule of the corresponding network protocol will be returned according to the appid. At the same time, the rules are grouped and managed according to different dimensions such as message type, viewing scope, and appid to enhance the scenario of the rule and the scope of use of the rule, and improve the readability and reusability of the rule. In this embodiment, the user can quickly browse and manage various types of test rules, including HTTP, Dubbo, and Socket messages, etc., through a simple and intuitive interface operation. After the rule is selected, the system will intelligently determine the attributes of the rule. If it is a private rule, it will only be displayed on the user's private rule page, ensuring privacy and security; if it is not a private rule, the corresponding network protocol rule will be returned according to the user's identity and authority, ensuring the validity and applicability of the rule. In addition, the group management function of rules enhances the organizational structure of rules. Users can classify and manage rules according to dimensions such as message type, viewing scope, and appid, making the use of rules more flexible and efficient. For example, users can group rules according to different projects, teams, or applications to facilitate the search and management of rules.
[0139] The test rule viewing process of this embodiment enables users to conveniently view and manage the test rules of various network protocols. Through the classification and group management of rules, users can quickly locate the required rules, which improves the readability and retrieval efficiency of the rules. In addition, the sharing and reuse of rules have also been strengthened. Users can share rules with other users according to actual needs, realize cross-application and cross-team sharing of rules, thereby improving the reusability and applicability of rules. Such a technical solution helps to speed up the speed of problem location and resolution, improve the efficiency of team collaboration, reduce the cost of development and testing, and thus improve the quality and stability of software products.
[0140] like Figure 8 As shown, a schematic diagram of the front-end test rule configuration page of the multi-protocol test rule sharing management system provided by an embodiment of the present invention, taking the newly added HTTP rule as an example, the user can fill in or select key information such as the rule name, rule description, interface name, method, mock rule item, label, and mock item value on the page. Through such a front-end test rule configuration page, the user can easily create and edit various types of test rules, including rules for different protocols such as HTTP, Dubbo, and Socket. The user can flexibly configure various rule information according to specific test requirements, realize the simulation of interface requests and the control of response data to meet the test requirements in different scenarios.
[0141] The multi-protocol test rule sharing management system of the present invention makes the creation and configuration of test rules simpler and more efficient by providing an intuitive and friendly front-end test rule configuration page. Users do not need to have an in-depth understanding of the underlying implementation and technical details of the system, and only need to complete the setting of rules through a graphical interface, which greatly reduces the user's learning cost and operation complexity. At the same time, through the standardization and modular design of the rule configuration page, the consistency and reliability of the rule configuration are guaranteed, and the errors and risks caused by human factors are reduced. Such a technical solution helps to improve the efficiency and quality of test rule creation, promote the standardization and automation of software testing processes, and thus improve the quality and stability of software products.
[0142] like Fig. 9 As shown, a schematic diagram of the front-end test rule management page of the multi-protocol test rule sharing management system provided by an embodiment of the present invention shows a dashboard for viewing test rules. The page is designed with a variety of filtering and viewing methods to meet the different needs of users. Users can view rules according to different network protocols, or filter by rule ID. In addition, users can also choose to view private rules or shared rules to better manage and control the use of rules. On the rule management page, each rule displays a wealth of main information, including rule ID, method, rule name, interface name, Mock rule, rule label, and options for whether to open and whether to share. The presentation of this information enables users to clearly understand the basic situation and status of each rule, and facilitates users to manage and operate rules. In addition, the page also provides the function of editing or deleting operations, so that users can easily modify and delete rules, so as to better meet the testing requirements. Through such a front-end test rule management page, users can efficiently manage and control test rules, improve the flexibility and efficiency of testing, and thus better support software development and testing work.
[0143] The multi-protocol test rule sharing management system of the present invention realizes the centralized management and visual operation of test rules by providing an intuitive and friendly front-end test rule management page. Users can complete operations such as viewing, filtering, editing and deleting rules through a simple and intuitive interface without having to deeply understand the underlying implementation and technical details of the system, which greatly reduces the user's operating difficulty and learning cost. At the same time, the rich rule information display and operation functions on the page help users to understand and manage various test rules more clearly, improve the controllability and manageability of test rules, and thus improve the efficiency and quality of software testing.
[0144] An embodiment of the present invention further provides a multi-protocol test rule sharing management program product, including computer instructions, which implement the steps of the above method when executed by a processor.
[0145] The functions of each module of the multi-protocol test rule sharing management program product of the present invention can be implemented by using the specific implementation of the multi-protocol test rule sharing management method as described above, which will not be described in detail here.
[0146] The program product includes a program code, which can be executed on a terminal device, such as a personal computer, a server, or a mobile device. However, the program product of the present invention is not limited thereto. In this document, the program can be used by an instruction execution system, an apparatus, or a device or used in combination with it. In addition, the program code for performing the operation of the present invention can be written in any combination of one or more programming languages, and the programming language includes an object-oriented programming language, such as Java, C++, etc., and also includes a conventional procedural programming language, such as "C" language or similar programming language. The program code can be executed completely on a user computing device, partially on a user device, as an independent software package, partially on a user computing device, partially on a remote computing device, or completely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet). The steps of the multi-protocol test rule sharing management method implemented when the program is executed by the processor, therefore, the program product can also obtain the technical effect of the above-mentioned multi-protocol test rule sharing management method.
[0147] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A multi-protocol test rule sharing management system, characterized in that: The system comprises: A rule creation module, used for creating a test rule, wherein the test rule supports at least one network protocol; A rule sharing management module, used for sharing management of the test rules; The rule application module is used to apply the test rules to the actual test scenario.
2. The multi-protocol test rule sharing management system according to claim 1, characterized in that: The rule creation module includes: A rule editor, used for editing the test rules; A rule tester is used to test the validity of the test rule.
3. The multi-protocol test rule sharing management system according to claim 1, characterized in that: The rule sharing management module includes: A rule storage device for storing the test rules; A rule query device is used to query the test rules.
4. The multi-protocol test rule sharing management system according to claim 1, characterized in that: The rule application module includes: A rule matcher, used to match the test rules with the network protocol required by the actual test scenario; A rule executor is used to execute the test rule.
5. The multi-protocol test rule sharing management system according to claim 1, characterized in that: The rule creation module also includes: an intelligent rule template, which is used to automatically match the test rule template according to the test scenario.
6. The multi-protocol test rule sharing management system according to claim 1, characterized in that: The rule sharing management module also includes: rule version management, which is used to manage the version of the test rule.
7. The multi-protocol test rule sharing management system according to claim 1, characterized in that: The test rule also includes: a rule priority, which is used to describe the priority of the test rule.
8. The multi-protocol test rule sharing management system according to any one of claims 1 to 7, characterized in that: The test rules include: Rule conditions, used to describe the applicable conditions of the test rule; Rule action, used to describe the execution action of the test rule.
9. A multi-protocol test rule sharing management method, characterized in that: The following steps are involved: Create test rules, select the protocols supported by the test rules, and edit the contents of the test rules; Apply the test rules to the actual test scenario, match the protocols supported by the test rules with the protocols of the actual test scenario, and execute the test rules; Manage test rules and store test rules.
10. The multi-protocol test rule sharing management method according to claim 9, characterized in that: The step of creating the test rules includes using an intelligent rule template to automatically match the test rule template according to the test scenario.
11. The multi-protocol test rule sharing management method according to claim 9, characterized in that: The step of applying the test rules to the actual test scenario includes using a rule conflict resolver to resolve test rule conflicts.
12. A multi-protocol test rule sharing management program product, comprising computer instructions, characterized in that: When the computer instruction is executed by a processor, the steps of the multi-protocol test rule sharing management method described in any one of claims 9 to 11 are implemented.
