Test processing method and device for operation and maintenance service and electronic equipment
By building a service test plan for operation and maintenance services, using microservice modules and functional nodes characterized by service data, the problem of high complexity of test plans under the microservice mode of the operation and maintenance platform is solved, and effective testing of the operation and maintenance service business link is realized.
Patent Information
- Application Number
- CN202411742752.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
AI Technical Summary
Operation and maintenance platforms are mostly developed using microservice models, resulting in a huge number of microservices and high complexity in building test solutions.
By obtaining the service data corresponding to the operation and maintenance service, a service test plan is built for the operation and maintenance service, and the service data characterizes the microservice modules and functional nodes used by the operation and maintenance service to achieve the target business, and a test plan is built for each microservice module and functional node.
It reduces the complexity of building test solutions for operation and maintenance services, and can effectively test the business links of operation and maintenance services. No matter how long the business link is, it can build the test solutions for operation and maintenance services.
Smart Images

Figure CN119669072A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of service testing technology, and in particular to a test processing method, device and electronic equipment for operation and maintenance services. Background Art
[0002] At present, most operation and maintenance platforms are developed in microservice mode. Because there are many operation and maintenance projects, the number of microservices is huge. For example, monitoring, operation, configuration, and public services alone include dozens of microservice applications. A business flow spans seven or eight or even ten microservice modules. The business chain is long and the complexity of building test solutions is high. Summary of the invention
[0003] In view of the above problems, the present application provides a test processing method, device and electronic device for operation and maintenance services to reduce the complexity of constructing a test solution for operation and maintenance services. The specific solution is as follows:
[0004] A first aspect of the present application provides a test processing method for an operation and maintenance service, the method comprising:
[0005] Obtaining service data corresponding to the operation and maintenance service; the service data represents a microservice module used by the operation and maintenance service to implement at least one target business and a function node called by the microservice module;
[0006] Constructing a service test solution for the operation and maintenance service according to the service data; the service test solution is used to test the business link of the operation and maintenance service;
[0007] The service testing scheme includes: a testing scheme for each of the microservice modules and each of the functional nodes.
[0008] In a possible implementation, obtaining service data corresponding to the operation and maintenance service includes:
[0009] Reading basic data corresponding to the operation and maintenance service from a database; the basic data includes: a processing flow chart of the target business and an interface design document of the operation and maintenance service; the processing flow chart represents the microservice modules sequentially called to implement the target business and the function nodes sequentially called by the microservice modules;
[0010] Based on the basic data, sorting out the business links of the operation and maintenance service to realize the target business, so as to obtain service data corresponding to the operation and maintenance service;
[0011] Among them, the service data includes: a business data flow diagram of the operation and maintenance service to implement the target business, and the business data flow diagram includes: at least one microservice module called in sequence to implement the target business, at least one functional node called in sequence by each of the microservice modules to implement the target business, and node information corresponding to each of the functional nodes.
[0012] In a possible implementation, the node information includes: a front-end page corresponding to the function node, a service interface corresponding to the function node, and a back-end data drop table corresponding to the function node;
[0013] Among them, the front-end page is the service interface of the functional node; the service interface is used to implement the front-end page; and the back-end data table is used to provide table data to the functional node.
[0014] In a possible implementation, constructing a service test solution for the operation and maintenance service according to the service data includes:
[0015] According to the calling order between the functional nodes in the business data flow diagram, traverse each functional node and execute the following process for each functional node:
[0016] Determining whether the functional node is a transformation node;
[0017] If the functional node is a modified node, constructing a node test solution corresponding to the functional node in a first manner according to the node information;
[0018] If the functional node is not a modified node, constructing a node test solution corresponding to the functional node in a second manner according to the node information; the second manner is different from the first manner;
[0019] According to the node testing plan corresponding to each of the functional nodes, a service testing plan for the operation and maintenance service is obtained.
[0020] In a possible implementation, constructing a node test solution corresponding to the functional node in a first manner according to the node information includes:
[0021] Constructing a function test scheme corresponding to the function node according to the node information, wherein the function test scheme is used to verify the service function implemented by the function node;
[0022] According to the node information, a table drop test scheme corresponding to the functional node is constructed, and the table drop test scheme is used to verify the table drop data corresponding to the functional node;
[0023] According to the functional test plan and the drop-table test plan, a node test plan corresponding to the functional node is obtained.
[0024] In a possible implementation, constructing a node test solution corresponding to the functional node in a second manner according to the node information includes:
[0025] Determining whether the functional node is the first node in the service link;
[0026] If the functional node is the first node in the service link, construct a first test scheme corresponding to the functional node, the first test scheme comprising: a service link function verification scheme with the first node as the starting node, and a service link fault tolerance verification scheme with the first node as the starting node;
[0027] If the functional node is not the first node in the service link, construct a second test plan corresponding to the functional node, the second test plan including: a branch link function verification plan with the functional node as the starting node, and a branch link fault tolerance verification plan with the functional node as the starting node.
[0028] A second aspect of the present application provides a test processing device for operation and maintenance services, the device comprising:
[0029] A data acquisition unit, used to obtain service data corresponding to the operation and maintenance service; the service data represents the microservice module used by the operation and maintenance service to implement at least one target business and the function node called by the microservice module;
[0030] A solution construction unit, configured to construct a service test solution for the operation and maintenance service according to the service data; the service test solution is used to test the business link of the operation and maintenance service;
[0031] The service testing scheme includes: a testing scheme for each of the microservice modules and each of the functional nodes.
[0032] The third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the test processing method for the operation and maintenance service of the above-mentioned first aspect or any implementation method of the first aspect.
[0033] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0034] The memory is used to store computer programs;
[0035] The processor is used to execute the computer program so that the electronic device can implement the test processing method for operation and maintenance services of the above-mentioned first aspect or any implementation manner of the first aspect.
[0036] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can perform a test processing method for the operation and maintenance service of the above-mentioned first aspect or any implementation method of the first aspect.
[0037] By means of the above technical solution, in a test processing method, device and electronic device for operation and maintenance services provided by the present application, by obtaining the service data corresponding to the operation and maintenance service, a service test scheme for the operation and maintenance service can be constructed, and the service data represents the microservice modules used by the operation and maintenance service to implement at least one target business and the functional nodes called by the microservice modules, and the service test scheme thus constructed may include a test scheme for each microservice module and each functional node, so that the service test scheme can be used to test the business link of the operation and maintenance service. It can be seen that the present application constructs a scheme for testing all the microservice modules and functional nodes involved in the business link to implement the target business based on the microservice modules and functional nodes that implement the business, so that no matter how long the business link is, a test scheme for the operation and maintenance service can be constructed, thereby reducing the complexity of constructing a test scheme for the operation and maintenance service. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0039] Figure 1 A flowchart of a test processing method for an operation and maintenance service provided in an embodiment of the present application;
[0040] Figure 2 This is an example diagram of a business data flow diagram in an embodiment of the present application;
[0041] Figure 3 A partial flow chart of a test processing method for an operation and maintenance service provided in an embodiment of the present application;
[0042] Figure 4 Another partial flow chart of a test processing method for an operation and maintenance service provided in an embodiment of the present application;
[0043] Figure 5 A flowchart of another part of a test processing method for an operation and maintenance service provided in an embodiment of the present application;
[0044] Figure 6 Another partial flow chart of a test processing method for an operation and maintenance service provided in an embodiment of the present application;
[0045] Figure 7 A schematic diagram of the structure of a test processing device for an operation and maintenance service provided in an embodiment of the present application;
[0046] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0047] Fig. 9 A flowchart for implementing test design in the test scenario of operation and maintenance services for financial enterprises applicable to this application;
[0048] Fig.10 This is an example diagram of a processing flow chart in a test scenario of operation and maintenance services for financial enterprises applicable to this application;
[0049] Fig.11 This is an example diagram of the interface design document in the test scenario of the operation and maintenance service of a financial enterprise applicable to this application;
[0050] Fig.12 A schematic diagram of the infrastructure monitoring business data flow sorted out in the test scenario of the operation and maintenance service applicable to financial enterprises in this application;
[0051] Fig.13 A flowchart of the design rules for key test points in the test scenario of the operation and maintenance service applicable to financial enterprises in this application. DETAILED DESCRIPTION
[0052] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0053] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0054] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0055] Reference Figure 1 , is a flow chart of a test processing method for an operation and maintenance service provided in an embodiment of the present application, which method can be applied to electronic devices capable of data processing, such as computers or servers. The technical solution in this embodiment is mainly used to reduce the complexity of testing the operation and maintenance service.
[0056] Specifically, the method in this embodiment may include the following steps:
[0057] Step 101: Obtain service data corresponding to the operation and maintenance service.
[0058] The service data represents the microservice modules used by the operation and maintenance service to implement at least one target business and the function nodes called by the microservice modules.
[0059] Specifically, the service data may be: a business data flow diagram of the operation and maintenance service to achieve the target business. Figure 2 As shown in , the business data flow diagram includes: at least one microservice module called in sequence to implement the target business, at least one function node called in sequence by each microservice module to implement the target business, and node information corresponding to each function node.
[0060] The node information may include: a front-end page corresponding to the function node, a service interface corresponding to the function node, and a back-end data table corresponding to the function node.
[0061] In a specific implementation, the front-end page is a service interface of a function node. For example, a user can perform input operations through the front-end page of a function node.
[0062] The service interface is used to implement the front-end page. For example, the corresponding front-end page can be started through the service interface.
[0063] The backend data drop table is used to provide the drop table data to the functional node, and the drop table data can specifically be the field information in the data drop table.
[0064] Step 102: Construct a service test plan for the operation and maintenance service based on the service data.
[0065] The service test solution is used to test the business link of the operation and maintenance service. The service test solution includes: a test solution for each microservice module and each functional node.
[0066] By means of the above technical solution, in a test processing method for an operation and maintenance service provided in an embodiment of the present application, by obtaining the service data corresponding to the operation and maintenance service, a service test scheme for the operation and maintenance service can be constructed, and the service data represents the microservice modules used by the operation and maintenance service to implement at least one target business and the functional nodes called by the microservice modules, and the service test scheme thus constructed may include a test scheme for each microservice module and each functional node, so that the service test scheme can be used to test the business link of the operation and maintenance service. It can be seen that the present application constructs a scheme for testing all the microservice modules and functional nodes involved in the business link to implement the target business based on the microservice modules and functional nodes that implement the business, so that no matter how long the business link is, a test scheme for the operation and maintenance service can be constructed, thereby reducing the complexity of constructing a test scheme for the operation and maintenance service.
[0067] In one implementation, in step 101, the service data corresponding to the operation and maintenance service can be obtained in the following manner, such as Figure 3 As shown in:
[0068] Step 301: Read basic data corresponding to the operation and maintenance service from the database.
[0069] Among them, the basic data includes: the processing flow chart of the target business and the interface design document of the operation and maintenance service.
[0070] It should be noted that the process flow diagram represents the microservice modules that are called in sequence by the operation and maintenance service to achieve the target business and the functional nodes that are called in sequence by the microservice modules. The interface design document is the document deployed by the operation and maintenance service during the project design phase. The interface design document is used for the service interface involved in the operation and maintenance service to achieve the target business.
[0071] Step 302: Based on the basic data, the business links of the operation and maintenance service to achieve the target business are sorted out to obtain service data corresponding to the operation and maintenance service.
[0072] Specifically, in this embodiment, the business links of the target business can be sorted out according to each microservice module and the functional nodes corresponding to the microservice modules in the processing flow chart, thereby generating a business data flow chart.
[0073] Among them, the business link refers to the execution link of the operation and maintenance service to achieve the target business, which is composed of the functional nodes in the microservice modules involved. Figure 2As shown in , a business link is formed between all functional nodes. The corresponding generated business data flow diagram contains all functional nodes called by each microservice module and the node information corresponding to the functional nodes, such as the front-end page, service interface, back-end data drop table, etc.
[0074] In one implementation, when constructing a service test solution for the operation and maintenance service in step 102, each function node is traversed according to the calling order between the function nodes in the business data flow diagram, and the following process is performed on each function node, such as Figure 4 As shown in:
[0075] Step 401: Determine whether the function node is a transformation node; if the function node is a transformation node, execute step 402; if the function node is not a transformation node, execute step 403.
[0076] Among them, the transformation node refers to: the functional node for business data flow reset and optimization transformation.
[0077] Step 402: Construct a node test plan corresponding to the functional node in a first manner according to the node information.
[0078] Step 403: constructing a node test solution corresponding to the functional node in a second manner according to the node information; the second manner is different from the first manner;
[0079] Finally, based on the node test plan corresponding to each functional node, the service test plan for the operation and maintenance service is obtained.
[0080] For example, in this embodiment, the node testing schemes corresponding to all functional nodes can be integrated to obtain a service testing scheme for the operation and maintenance service, which can test the business link of the operation and maintenance service to verify whether the operation and maintenance service can normally implement the corresponding target business.
[0081] It can be seen that in this embodiment, corresponding node test schemes are constructed in different ways for the functional nodes in the service link according to whether the nodes are modified, so as to form a service test scheme for the operation and maintenance service.
[0082] In one implementation, when building a node test solution corresponding to a functional node in the first manner in step 402, it can be implemented in the following manner: Figure 5 As shown in:
[0083] Step 501: Construct a function test plan corresponding to the function node according to the node information.
[0084] Among them, the functional testing solution is used to verify the business functions implemented by the functional nodes.
[0085] Step 502: Construct a drop-table test plan corresponding to the functional node according to the node information.
[0086] Among them, the drop table test scheme is used to verify the drop table data corresponding to the functional node;
[0087] The execution order between step 501 and step 502 is not limited to the order shown in the figure, and step 502 may be executed first and then step 501, or step 501 and step 502 may be executed simultaneously. Different technical solutions formed by different execution orders between step 501 and step 502 are all within the protection scope of this application.
[0088] Step 503: Obtain a node test plan corresponding to the functional node according to the functional test plan and the drop test plan.
[0089] For example, in this embodiment, the functional testing scheme and the drop-table testing scheme corresponding to the functional node can be integrated to obtain the node testing scheme corresponding to the functional node, and then the node testing scheme corresponding to the functional node can be integrated to obtain the service testing scheme for the operation and maintenance service, which can realize the testing of the business link of the operation and maintenance service to verify whether the operation and maintenance service can normally realize the corresponding target business.
[0090] In one implementation, when constructing a node test solution corresponding to a functional node in the second manner in step 403, it can be implemented in the following manner: Figure 6 As shown in:
[0091] Step 601: Determine whether the functional node is the first node in the service link; if the functional node is the first node in the service link, execute step 602; if the functional node is not the first node in the service link, execute step 603.
[0092] The first node refers to the first functional node that realizes the target business.
[0093] Step 602: Construct a first test plan corresponding to the functional node.
[0094] The first test scheme includes: a service link function verification scheme with the first node as the starting node, and a service link fault tolerance verification scheme with the first node as the starting node. It can be seen that the first test scheme can cover all branch links of the service link involving functional nodes.
[0095] Specifically, the first test plan includes a request that can initiate a normal transaction. After sending the request to the first node, it determines whether the business link is normal based on the transaction processing result output by the last functional node in the business link, that is, whether the operation and maintenance service can normally implement the target business.
[0096] Step 603: Construct a second test plan corresponding to the functional node.
[0097] Among them, the second test scheme includes: a branch link function verification scheme with a functional node as a starting node, and a branch link fault tolerance verification scheme with a functional node as a starting node.
[0098] Specifically, the second test scheme includes a request that can initiate an abnormal transaction. After sending the request to the first node, it is determined whether other functional nodes in the business chain can tolerate faults based on the transaction processing result output by the last functional node in the business chain.
[0099] A test processing method for an operation and maintenance service provided in an embodiment of the present application is introduced above, and a device for executing the test processing method for the operation and maintenance service described above will be introduced below.
[0100] See also Figure 7 , is a schematic diagram of a test processing device for operation and maintenance services provided in an embodiment of the present application. The device can be applied to electronic devices capable of data processing, such as computers or servers. The technical solution in this embodiment is mainly used to reduce the complexity of testing operation and maintenance services.
[0101] Specifically, the device in this embodiment may include the following units:
[0102] The data acquisition unit 701 is used to obtain service data corresponding to the operation and maintenance service; the service data represents the microservice module used by the operation and maintenance service to implement at least one target business and the function node called by the microservice module;
[0103] A solution construction unit 702 is used to construct a service test solution for the operation and maintenance service according to the service data; the service test solution is used to test the business link of the operation and maintenance service;
[0104] The service testing scheme includes: a testing scheme for each of the microservice modules and each of the functional nodes.
[0105] By means of the above technical solution, in a test processing device for an operation and maintenance service provided by the present application, by obtaining the service data corresponding to the operation and maintenance service, a service test scheme for the operation and maintenance service can be constructed, and the service data represents the microservice modules used by the operation and maintenance service to implement at least one target business and the functional nodes called by the microservice modules, and the service test scheme thus constructed may include a test scheme for each microservice module and each functional node, so that the service test scheme can be used to test the business link of the operation and maintenance service. It can be seen that the present application constructs a scheme for testing all the microservice modules and functional nodes involved in the business link to implement the target business based on the microservice modules and functional nodes that implement the business, so that no matter how long the business link is, a test scheme for the operation and maintenance service can be constructed, thereby reducing the complexity of constructing a test scheme for the operation and maintenance service.
[0106] In one implementation, the data acquisition unit 701 is specifically used to: read basic data corresponding to the operation and maintenance service from a database; the basic data includes: a processing flow chart of the target business and an interface design document of the operation and maintenance service; the processing flow chart represents the microservice modules that are called in sequence to implement the target business and the functional nodes that are called in sequence by the microservice modules; based on the basic data, the business links of the operation and maintenance service to implement the target business are sorted out to obtain service data corresponding to the operation and maintenance service; wherein the service data includes: a business data flow chart of the operation and maintenance service to implement the target business, and the business data flow chart includes: at least one microservice module that is called in sequence to implement the target business, at least one functional node that each of the microservice modules calls in sequence to implement the target business, and node information corresponding to each of the functional nodes.
[0107] Among them, the node information includes: the front-end page corresponding to the functional node, the service interface corresponding to the functional node, and the back-end data drop table corresponding to the functional node; wherein the front-end page is the service interface of the functional node; the service interface is used to implement the front-end page; the back-end data drop table is used to provide drop table data to the functional node.
[0108] In one implementation, the solution construction unit 702 is specifically configured to: traverse each of the function nodes in the service data flow diagram according to the calling sequence between the function nodes, and execute the following process for each of the function nodes:
[0109] Determine whether the functional node is a modified node; if the functional node is a modified node, construct a node test scheme corresponding to the functional node in a first manner according to the node information; if the functional node is not a modified node, construct a node test scheme corresponding to the functional node in a second manner according to the node information; the second manner is different from the first manner;
[0110] Finally, according to the node test plan corresponding to each functional node, a service test plan for the operation and maintenance service is obtained.
[0111] In a specific implementation, when the solution construction unit 702 constructs the node test solution corresponding to the functional node in a first manner according to the node information, it is specifically used to:
[0112] Constructing a function test scheme corresponding to the function node according to the node information, wherein the function test scheme is used to verify the service function implemented by the function node;
[0113] According to the node information, a table drop test scheme corresponding to the functional node is constructed, and the table drop test scheme is used to verify the table drop data corresponding to the functional node;
[0114] According to the functional test plan and the drop-table test plan, a node test plan corresponding to the functional node is obtained.
[0115] In a specific implementation, when the solution construction unit 702 constructs the node test solution corresponding to the functional node in the second manner according to the node information, it is specifically used to:
[0116] Determining whether the functional node is the first node in the service link;
[0117] If the functional node is the first node in the service link, construct a first test scheme corresponding to the functional node, the first test scheme comprising: a service link function verification scheme with the first node as the starting node, and a service link fault tolerance verification scheme with the first node as the starting node;
[0118] If the functional node is not the first node in the service link, construct a second test plan corresponding to the functional node, the second test plan including: a branch link function verification plan with the functional node as the starting node, and a branch link fault tolerance verification plan with the functional node as the starting node.
[0119] It should be noted that the specific implementation method of each unit in this embodiment can refer to the corresponding content in the previous text and will not be described in detail here.
[0120] The present application also provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0121] The memory is used to store computer programs;
[0122] The processor is used to execute the computer program so that the electronic device can implement any test processing method for operation and maintenance services provided in the embodiments of the present application.
[0123] refer to Figure 8 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may include but is not limited to fixed terminals such as mobile phones, notebook computers, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0124] like Figure 8 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0125] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a memory card, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0126] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements a test processing method for any operation and maintenance service provided in the embodiment of the present application.
[0127] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When one or more computer programs are executed by an electronic device, the electronic device can implement a test processing method for any operation and maintenance service provided in an embodiment of the present application.
[0128] Taking the operation and maintenance services of a financial enterprise as an example, the technical solution of this application is illustrated below:
[0129] This application mainly provides a full business flow test design method suitable for operation and maintenance platform microservice applications, including business data flow combing and full business flow test key point design. This method combs the front-end business flow and back-end data flow links from a global perspective, and designs test points based on the business data flow to achieve full business flow testing of operation and maintenance systems. It solves the problems of test fragmentation and test point omissions between multiple modules of the microservice architecture of the operation and maintenance system, improves test quality, and reduces production risks.
[0130] The specific plan is as follows:
[0131] First, this application mainly aims at the coverage problem of long-link complex business test scenarios encountered in the operation and maintenance platform test, and proposes a full business flow test design method, including two steps: business data flow combing and test key point design. The steps of the full business flow test design method for the operation and maintenance platform proposed in this application are as follows: Fig. 9 As shown:
[0132] Step 901: Business data flow sorting. Based on the long link business as the granularity, sort out the modules and function nodes that are crossed, the front-end page operations or service interfaces corresponding to the function nodes, the back-end data table status and other information to form a business data flow diagram as the design basis for step 902.
[0133] Step 902: Design of key points for full service flow testing. Based on the service function characteristics of the functional node and the link service data flow diagram compiled in step 901, design of key points for testing is performed from a global perspective to form a test key point document.
[0134] The detailed implementation of each step is as follows:
[0135] 1. The input data for business data flow combing in step 901 include: business data flow combing requires business process flow chart (i.e., the process flow chart mentioned above) and interface design document. An example of a process flow chart is as follows: Fig.10 As shown in , an example of an interface design document is Fig.11 as shown in .
[0136] The premise of the automatic combing in step 901 is that the program DAO layer (i.e., the persistence layer, the part that operates the database. The layer used to implement data object persistence) code requires annotation interface information to automatically obtain the relationship between the service interface and the database table. The annotation format can be flexibly defined according to requirements.
[0137] The automated combing process in step 901 is as follows: based on the function nodes in the input processing flow chart and the interface names of the corresponding service interfaces, the database table (i.e., data drop table) and field information of the database corresponding to the service interface are automatically pulled from the program DAO layer code through the interface names, and finally the business data flow chart is output in combination with the processing flow chart, such as Figure 2 shown.
[0138] The output data of the automated combing in step 901 include: business data flow diagram. Based on the granularity of the long link business, starting from the function node initiated by the business, it displays the modules and function nodes spanned by the long link business, the front-end page operations or service interfaces corresponding to the function nodes, and the back-end data table status.
[0139] Taking infrastructure monitoring as an example, this paper introduces the method of sorting business data flow diagrams. The generation of an infrastructure alarm involves more than ten functional nodes in five microservice modules: an** (collection control module), mon** (monitoring module), data** (alarm calculation engine module), al** (alarm module), and work**t (alarm closed-loop management module). The links are long and complex. The business data flow is sorted out based on all the link nodes that an alarm passes through, and on this basis, different types of alarm sources are included to cover various alarm situations. The sorted infrastructure monitoring business data flow is as follows: Fig.12 shown.
[0140] Among them, an alarm is generated from multiple sources and passes through different links:
[0141] 1. According to the indicators matching the data collected by the acquisition and control agent and the monitoring strategy, the original event data is generated through the subsequent indicator model and indicator threshold analysis, and then the original alarm data is generated through the event model and real-time alarm threshold rule analysis. Finally, through the alarm model analysis, the real-time alarm display is entered to wait for subsequent processing or enter the historical alarm for subsequent evaluation process;
[0142] 2. The performance data sent by the third party is analyzed through the subsequent indicator model and indicator threshold to generate original event data, and then through the event model and real-time alarm threshold rule analysis to generate original alarm data. Finally, through the alarm model analysis, it enters the real-time alarm display and waits for subsequent processing or enters the historical alarm for subsequent evaluation process;
[0143] 3. The event data sent by the third party is directly analyzed through the event model and real-time alarm threshold rules to generate original alarm data, and then analyzed through the alarm model to enter the real-time alarm display and wait for subsequent processing or enter the historical alarm for subsequent evaluation process;
[0144] 4. The alarm data sent by the third party is directly analyzed by the alarm model and enters the real-time alarm display to wait for subsequent processing or enters the historical alarm for subsequent evaluation process;
[0145] 2. Design of key points of full business flow test in step 902, based on the business data flow diagram sorted out in step 901 and the test points of each functional node, combined with Fig.13 The test point design rules (i.e., process) shown in the figure automatically generate the test points of the entire business flow, i.e., the service test plan.
[0146] Specifically, in this embodiment, according to the test point design rules, combined with the business data flow diagram, the full business flow test points shown in the following table are automatically generated. The full business flow test points are shown in Table 1:
[0147] Table 1 Key points of full service flow test
[0148]
[0149]
[0150] Taking the optimization of real-time alarm function as an example, we design the key points of full business flow test. The generation of real-time alarm has multiple preceding nodes and subsequent nodes, such as Fig.12 As shown in the infrastructure monitoring business data flow diagram, combined with the real-time alarm function's own test points (infrastructure, network, third-party, application alarms and other different types of alarm sending, repeated alarm sending, historical alarm sending, etc.), the real-time alarm function optimization full business flow test points shown in Table 2 can be generated.
[0151] Table 2 Key points for real-time alarm function optimization test of full service flow
[0152]
[0153]
[0154] In summary, this application has the following advantages:
[0155] 1. The business data flow diagram in this application includes a full-link view of the business and a full-link view of the data, which clearly displays the front-end functions of the entire business link and the corresponding back-end data storage, helping testers to have a more comprehensive understanding of the business and storage processes and better design test points.
[0156] 2. In this application, the design of test points based on the business data flow diagram can not only take into account the functional verification of the entire business link, but also verify the back-end link storage data, and can also flexibly prepare test data according to the data flow. On the one hand, it improves the test quality, and on the other hand, it also provides multiple options for test data preparation.
[0157] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0158] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0159] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0160] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A test processing method for operation and maintenance services, characterized in that: The method comprises: Obtaining service data corresponding to the operation and maintenance service; the service data represents a microservice module used by the operation and maintenance service to implement at least one target business and a function node called by the microservice module; Constructing a service test solution for the operation and maintenance service according to the service data; the service test solution is used to test the business link of the operation and maintenance service; The service testing scheme includes: a testing scheme for each of the microservice modules and each of the functional nodes.
2. The method according to claim 1, characterized in that Obtain service data corresponding to the operation and maintenance service, including: Reading basic data corresponding to the operation and maintenance service from a database; the basic data includes: a processing flow chart of the target business and an interface design document of the operation and maintenance service; the processing flow chart represents the microservice modules sequentially called to implement the target business and the function nodes sequentially called by the microservice modules; Based on the basic data, the business links of the operation and maintenance service to realize the target business are sorted out to obtain service data corresponding to the operation and maintenance service; Among them, the service data includes: a business data flow diagram of the operation and maintenance service to implement the target business, and the business data flow diagram includes: at least one microservice module called in sequence to implement the target business, at least one functional node called in sequence by each of the microservice modules to implement the target business, and node information corresponding to each of the functional nodes.
3. The method according to claim 2, characterized in that The node information includes: the front-end page corresponding to the function node, the service interface corresponding to the function node, and the back-end data table corresponding to the function node; Among them, the front-end page is the service interface of the functional node; the service interface is used to implement the front-end page; and the back-end data table is used to provide table data to the functional node.
4. The method according to claim 3, characterized in that According to the service data, a service test plan for the operation and maintenance service is constructed, including: According to the calling order between the functional nodes in the business data flow diagram, traverse each functional node and execute the following process for each functional node: Determining whether the functional node is a transformation node; If the functional node is a modified node, constructing a node test solution corresponding to the functional node in a first manner according to the node information; If the functional node is not a modified node, constructing a node test solution corresponding to the functional node in a second manner according to the node information; the second manner is different from the first manner; According to the node testing plan corresponding to each of the functional nodes, a service testing plan for the operation and maintenance service is obtained.
5. The method according to claim 4, characterized in that According to the node information, a node test scheme corresponding to the functional node is constructed in a first manner, including: Constructing a function test scheme corresponding to the function node according to the node information, wherein the function test scheme is used to verify the service function implemented by the function node; According to the node information, a table drop test scheme corresponding to the functional node is constructed, and the table drop test scheme is used to verify the table drop data corresponding to the functional node; According to the functional test plan and the drop-table test plan, a node test plan corresponding to the functional node is obtained.
6. The method according to claim 4, characterized in that According to the node information, a node test scheme corresponding to the functional node is constructed in a second manner, including: Determining whether the functional node is the first node in the service link; If the functional node is the first node in the service link, construct a first test scheme corresponding to the functional node, the first test scheme comprising: a service link function verification scheme with the first node as the starting node, and a service link fault tolerance verification scheme with the first node as the starting node; If the functional node is not the first node in the service link, construct a second test plan corresponding to the functional node, the second test plan including: a branch link function verification plan with the functional node as the starting node, and a branch link fault tolerance verification plan with the functional node as the starting node.
7. A test processing device for operation and maintenance services, characterized in that: The device comprises: A data acquisition unit, used to obtain service data corresponding to the operation and maintenance service; the service data represents the microservice module used by the operation and maintenance service to implement at least one target business and the function node called by the microservice module; A solution construction unit, configured to construct a service test solution for the operation and maintenance service according to the service data; the service test solution is used to test the business link of the operation and maintenance service; The service testing scheme includes: a testing scheme for each of the microservice modules and each of the functional nodes.
8. A computer program product, characterized in that It includes computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the test processing method for operation and maintenance services as claimed in any one of claims 1 to 6.
9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the test processing method for operation and maintenance services as described in any one of claims 1 to 6.
10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the test processing method for operation and maintenance services as described in any one of claims 1 to 6.