Testing Method, Device, Readable Medium and Electronic Device for Service Node

Through automated testing methods, the problem of low manual testing efficiency of CDN nodes is solved, efficient and accurate node testing is achieved, and the stability of network live broadcast is ensured.

CN115996179BActive Publication Date: 2025-08-05DOUYIN VISION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111205774.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2025-08-05
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

In live broadcasting in networks, due to the huge number of nodes and the large amount of manual testing, it is difficult to achieve efficient and accurate testing of CDN nodes, resulting in configuration errors and large-scale failures that affect users' use.

Method used

Provide a test method for business nodes, which realizes automated testing by receiving test requests, obtaining node information, selecting test cases, and controlling nodes to execute use cases, record results.

Benefits of technology

It improves testing efficiency and accuracy, ensures the quality of the CDN node network system, and reduces the occurrence of failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115996179B_ABST
    Figure CN115996179B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a testing method, device, readable medium and electronic device for a service node, and relates to the field of electronic information technology. The method comprises: receiving a service network node test request, wherein the service network node test request is used to indicate the test service type, target test mode and target service node to be tested. According to the service network node test request, the node information of the target service node is obtained from a node information database, wherein the node information database stores node information synchronized from a service network node system, and the service network node system stores and dynamically updates the node information of the service node. According to the node information of the target service node, a target test case corresponding to the target service node is selected from a test case set, the target service node is controlled to execute the target test case according to the target test mode, and the execution result of the target service node executing the target test case is recorded. The present disclosure can improve the efficiency and accuracy of testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of electronic information technology, and in particular to a service node testing method, device, readable medium, and electronic device. Background Art

[0002] With the continuous development of electronic information technology, live streaming has been widely applied in various technical fields. Live streaming services have a large number of users and high latency requirements. CDN (Content Delivery Network) technology is commonly used. Through a distributed network caching structure, a new layer of network architecture is added to the existing network structure. This layer distributes website content to the nodes closest to users, thereby solving network congestion problems and allowing users to access content from the node closest to them, thereby improving speed.

[0003] Implementing CDN technology requires deploying a large number of nodes in various regions to support users in each region. Due to the wide range of services covered by live streaming and the flexible deployment requirements, node adjustments are often necessary. During these adjustments, configuration errors, application bugs, and other issues can cause widespread failures, severely impacting user experience. Therefore, ensuring that every node is functioning properly is crucial. However, due to the large number of nodes, manually testing each node is prohibitively labor-intensive and time-consuming, making it difficult to implement. Summary of the Invention

[0004] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a method for testing a service node, the method comprising:

[0006] Receive a service network node test request, the service network node test request being used to indicate a test service type, a target test mode, and a target service node to be tested; the target test mode being used to specify at least one of a test execution scope, a test execution flow, and a test execution scenario;

[0007] Obtaining, according to the service network node test request, node information of the target service node from a node information database, wherein the node information database stores node information synchronized from a service network node system, and the service network node system stores and dynamically updates the node information of the service node;

[0008] Selecting, according to the node information of the target service node, a target test case corresponding to the target service node from a test case set, wherein the test case set includes corresponding test cases configured for different node information;

[0009] The target service node is controlled to execute the target test case according to the target test mode, and an execution result of the target service node executing the target test case is recorded.

[0010] In a second aspect, the present disclosure provides a testing device for a service node, the device comprising:

[0011] a receiving module configured to receive a service network node test request, wherein the service network node test request is configured to indicate a test service type, a target test mode, and a target service node to be tested; wherein the target test mode is configured to specify at least one of a test execution scope, a test execution flow, and a test execution scenario;

[0012] an information determination module, configured to obtain, based on the service network node test request, node information of the target service node from a node information database, wherein the node information database stores node information synchronized from a service network node system, and the service network node system stores and dynamically updates the node information of the service node;

[0013] A use case determination module, configured to select a target test case corresponding to the target service node from a test case set according to the node information of the target service node, wherein the test case set includes corresponding test cases configured for different node information;

[0014] The test module is used to control the target service node to execute the target test case according to the target test mode, and record the execution result of the target service node executing the target test case.

[0015] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect of the present disclosure.

[0016] In a fourth aspect, the present disclosure provides an electronic device, comprising:

[0017] a storage device having a computer program stored thereon;

[0018] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect of the present disclosure.

[0019] Through the above technical solution, the present disclosure first receives a service network node test request, which is used to indicate the test service type, target test mode, and target service node to be tested. Afterwards, according to the service network node test request, the node information of the target service node is obtained from the node information database, wherein the node information database stores the latest node information. Then, according to the node information of the target service node, the target test case corresponding to the node information of the target service node is selected from the test case set, and finally the target service node is controlled to execute the target test case according to the target test mode, and the execution result of the target service node executing the target test case is recorded. The present disclosure can realize the automated testing of the service node network system, improve the efficiency and accuracy of the test, and thus ensure the quality of the service node network system.

[0020] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings:

[0022] Figure 1 is a schematic diagram of a test system and a node system according to an exemplary embodiment;

[0023] Figure 2 is a flowchart of a method for testing a service node according to an exemplary embodiment;

[0024] Figure 3 is a flowchart of another service node testing method according to an exemplary embodiment;

[0025] Figure 4 is a schematic diagram of a test system display interface according to an exemplary embodiment;

[0026] Figure 5 is a flowchart of another service node testing method according to an exemplary embodiment;

[0027] Figure 6 is a flowchart of another service node testing method according to an exemplary embodiment;

[0028] Figure 7 is a flowchart of another service node testing method according to an exemplary embodiment;

[0029] Figure 8is a flowchart of another service node testing method according to an exemplary embodiment;

[0030] Figure 9 is a block diagram of a service node testing device according to an exemplary embodiment;

[0031] Figure 10 is a block diagram showing another service node testing device according to an exemplary embodiment;

[0032] Figure 11 is a block diagram showing another service node testing device according to an exemplary embodiment;

[0033] Figure 12 is a block diagram showing another service node testing device according to an exemplary embodiment;

[0034] Figure 13 is a block diagram showing another service node testing device according to an exemplary embodiment;

[0035] Figure 14 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0036] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0037] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0038] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0039] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0040] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0041] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0042] Before introducing the service node testing method, device, readable medium and electronic device provided by the present disclosure, the application scenarios involved in each embodiment of the present disclosure are first introduced. The application scenario can be an automated testing system for testing multiple service nodes included in a service node network system, such as Figure 1 As shown. The test system can be deployed on a server, and technicians can access and use the test system through a web page or a specified application. Furthermore, the test system can also simulate a large number of high-configuration client resources to implement testing of business nodes. For example, the client resources can be multi-core (for example, 48 cores) and large memory (for example, 40G) terminal devices. The business node network system can be understood as a network system composed of multiple business nodes deployed in different locations. The business node network system can be understood as a general term for multiple systems, which can include: a business node management system, a business node upgrade system, a business node configuration system, etc., for operating each business node. The business node network system can be, for example, a CDN system, which can include multiple CDN nodes (i.e., business nodes). Furthermore, the above-mentioned business node can be a device (for example, a server) or a collection of multiple devices, which can be understood as a device cluster. This disclosure does not make specific limitations on this.

[0043] Figure 2 FIG. 1 is a flow chart showing a method for testing a service node according to an exemplary embodiment. Figure 2 As shown, the method includes the following steps:

[0044] Step 101: Receive a service network node test request, where the service network node test request is used to indicate the test service type, target test mode, and target service node to be tested; the target test mode is used to specify at least one of the test execution scope, test execution traffic, and test execution scenario.

[0045] For example, a service network node test request can be first obtained to determine the test service type, target test mode, and target service node to be tested based on the service network node test request. The service network node test request can include: the identification of the target service node, the identification of the test service type, and the identification of the target test mode. Among them, the test service type can be understood as the trigger type of the service network node test request, for example, it can include: active trigger type and automatic trigger type. The active trigger type indicates that the network node test request is manually triggered by the developer based on specific needs, and the automatic trigger type indicates that the network node test request is automatically triggered by the service network node system based on actual business.

[0046] The target test mode is used to specify at least one of the test execution scope, test execution traffic, and test execution scenario. The test execution scope can limit the scope of the test, for example, it can be a single target business node or multiple target business nodes (i.e., batch). The test execution traffic can limit the test traffic, for example, it can be a low-traffic test or a full-volume test. The test execution scenario can limit the test scenario, for example, it can be a regression test or a delivery acceptance test.

[0047] Step 102: According to the service network node test request, the node information of the target service node is obtained from the node information database. The node information database stores the node information synchronized from the service network node system. The service network node system stores and dynamically updates the node information of the service node.

[0048] For example, after determining the target service node based on the service network node test request, the node information of the target service node can be obtained from the node information database. Specifically, the service network node system stores and dynamically updates the node information of each service node (for example, it can be stored in the service node management system). Accordingly, the node information database can synchronize node information from the service network node system according to a preset synchronization period (for example, 10 minutes). In other words, the node information database stores the latest node information. Node information can include the corresponding service node's node type (which can be understood as the role of the service node), service type (which can be understood as the purpose of the service node), geographic location, supported protocols, etc. Taking the service node as a CDN node as an example, node types can include: edge push node, edge pull node, central source node, internal live broadcast node, etc. Service types can include: intranet access, layer 4 access, layer 7 access, etc. Supported protocols can include: RTMP, RTMPK, RTMPS, RTMPQ, HTTP, HttpK, HTTP2, HttpQ, HTTPS, HLS, etc.

[0049] Step 103 : Select a target test case corresponding to the target service node from a test case set according to the node information of the target service node. The test case set includes corresponding test cases configured for different node information.

[0050] Step 104 : Control the target service node to execute the target test case according to the target test mode, and record the execution result of the target service node executing the target test case.

[0051] For example, after determining the node information of the target business node, the target test case corresponding to the target business node can be determined from the pre-established test case set based on the node information. The test case set includes corresponding test cases configured for different node information, that is, the test case set includes a large number of test cases, and the node information corresponding to each test case. It can be understood that different test cases are set in advance for different node information. For example, in the test case set, different test cases can be set according to different node types, different test cases can be set according to different business types, and different test cases can be set according to different support protocols. This is not specifically limited in the present disclosure. In the test case set, the test case corresponding to the node information of the target business node can be searched as the target test case. The target test case can be one or more.

[0052] Finally, the target business node can be controlled to execute the target test case according to the target test mode. At the same time, each target test case of each target business node can be polled according to a preset cycle (for example, 2 minutes) to see if it has been executed. If it has been executed, the execution result corresponding to each target test case executed by the target business node is recorded. Finally, when all target business nodes have executed all target test cases, all recorded execution results can be output as test results. The display form of the test results can be, for example, a log, a table, a graph, etc. The output method of the test results can be stored in a specified database for user query, or displayed in the web page corresponding to the test system or the display interface of the application program through email, push messages, etc. Further, the test results can also be analyzed for data to obtain an analysis report that can reflect the quality of the business network node system, such as: bug occurrence ranking, fault node ranking, fault occurrence time statistics, etc.

[0053] In summary, the present disclosure first receives a service network node test request, which is used to indicate the test service type, target test mode, and target service node to be tested. Afterwards, based on the service network node test request, the node information of the target service node is obtained from the node information database, wherein the node information database stores the latest node information. Then, based on the node information of the target service node, the target test case corresponding to the node information of the target service node is selected from the test case set. Finally, the target service node is controlled to execute the target test case according to the target test mode, and the execution result of the target service node executing the target test case is recorded. The present disclosure can realize automated testing of the service node network system, improve the efficiency and accuracy of the test, and thus ensure the quality of the service node network system.

[0054] Figure 3 FIG. 1 is a flow chart showing another method for testing a service node according to an exemplary embodiment. Figure 3 As shown, the implementation of step 101 may include:

[0055] Step 1011: Receive a service network node test request triggered by a selection instruction, the test service type is an active trigger type, and the selection instruction includes a target test mode and an identifier of a target service node. Or,

[0056] Step 1012: Receive a service network node test request triggered by an operation instruction. The test service type is an automatic trigger type. The operation instruction is at least one of an upgrade instruction, an initialization instruction, and a configuration modification instruction in the service network node system. The target service node is the service node in the service network node system on which the operation instruction is to be executed. The target test mode is determined based on the target service node.

[0057] In one application scenario, the user can issue a selection instruction to trigger a business network node test request through the web page or application corresponding to the test system. The selection instruction may include the target test mode and the identifier of the target business node. Accordingly, the business network node test request may indicate that the test business type is an active trigger type, and determine the target test mode and the identifier of the target business node. Specifically, the node identifier can be the name of the business node, or the IP address of the node, etc. When issuing a selection instruction, the user can enter a keyword, and the test system can perform keyword association based on the keyword, determine the business nodes related to the keyword, and display the related business nodes on the web page or the display interface of the application for the user to select. For example, if the keyword entered by the user is "Place A", then the display interface can display multiple business nodes including "Place A" for the user to select, such as Figure 4 As shown in (a) in the figure, the user can select one or more nodes in the list as target business nodes.

[0058] In another application scenario, the test system can use the Hook method to detect in real time whether there are preset operation instructions to be executed in the business network node system. If it is detected that there are operation instructions to be executed in the business network node system, a business network node test request can be triggered, and the business node in the business network node system where the operation instruction is to be executed is used as the target business node. Specifically, the operation instruction can be one or more of an upgrade instruction, an initialization instruction, and a configuration modification instruction in the business network node system. For example, the test system can provide an external call interface for the business node upgrade system in the business network node system. When the business node upgrade system executes an upgrade instruction or an initialization instruction on one or more business nodes, it will call the interface to trigger the business network node test request. At the same time, the node identifier of the business node to be executed with the upgrade instruction or the initialization instruction can also be sent to the test system through the interface, so that the test system can determine the target business node. Among them, executing the initialization instruction on the business node can be understood as adding a new node to the business network node system. For another example, the test system can also provide an external call interface for the business node configuration system in the business network node system. When the business node configuration system executes a configuration modification instruction on one or more business nodes, it will call the interface to trigger a business network node test request. At the same time, the node identifier of the business node to be executed with the configuration modification instruction can be sent to the test system so that the test system can determine the target business node. The configuration modification instruction can be understood as issuing a modified configuration to one or more business nodes. Furthermore, the determined target business node, the node information of the target business node, etc. can also be displayed on the corresponding web page of the test system or the display interface of the application. For example, there are two target business nodes, and the corresponding node information includes: node identifier, node type, node IP, node status, software version, etc. Figure 4 As shown in (b) in .

[0059] In one application scenario, if the test service type is an active trigger type, the target test mode includes: single node regression test, batch regression test, and delivery acceptance test.

[0060] If the test service type is the automatic trigger type, the target test mode is the preset automatic test mode.

[0061] For example, different target test modes can be used for different test service types. If the test service type is an active trigger type (i.e., the service network node test request is triggered by a selection instruction), then the target test mode can include: single node regression test, batch regression test, and delivery acceptance test. If the test service type is an automatic trigger type (i.e., the service network node test request is triggered by an operation instruction), then the target test mode can be a preset automatic test mode.

[0062] Figure 5 FIG. 1 is a flow chart showing another method for testing a service node according to an exemplary embodiment. Figure 5 As shown, if the target test mode is the preset automatic test mode, step 104 can be implemented by the following steps:

[0063] Step 1041: Determine a target designated service node among multiple target service nodes.

[0064] Step 1042: Send a local control instruction to the service network node system so that the service network node system executes the operation instruction on the target designated service node.

[0065] Step 1043: Control the target designated service node to execute the target test case.

[0066] Step 1044 : If the target designated service node passes the target test case, a full control instruction is sent to the service network node system so that the service network node system executes the operation instruction on all target service nodes.

[0067] Step 1045: Control all target service nodes to execute the target test case.

[0068] For example, the following specifically describes controlling a target service node to execute a target test case according to a preset automatic test mode. First, a target designated service node can be determined from multiple target service nodes. The target designated service node can be understood as a sample service node selected from the multiple target service nodes, i.e., a target designated service node is a portion of the target service nodes, and can be one or more target service nodes.

[0069] Afterwards, the test system can send a local control instruction to the business network node system so that the business network node system executes the operation instruction on the target designated business node. That is to say, the operation instruction is first made effective on the target designated business node, and temporarily not effective on other target business nodes. When the operation instruction is an upgrade instruction or an initialization instruction, the test system can send a local control instruction to the business node upgrade system of the business network node system so that the business node upgrade system executes the upgrade instruction or initialization instruction on the target designated business node. When the operation instruction is a configuration modification instruction, the test system can send a local control instruction to the business node configuration system of the business network node system so that the business node configuration system executes the configuration modification instruction on the target designated business node. Then, the target designated business node is controlled to execute the target test case. That is to say, the business node that has executed the operation instruction is controlled to execute the target test case to test whether the operation instruction is correct with small traffic (i.e., small traffic test).

[0070] If the target designated service node passes the target test case, a full control instruction is sent to the service network node system, causing the service network node system to execute the operation instruction on all target service nodes. In other words, once the target designated service node passes the test, the operation instruction is then made effective on all target service nodes. If the operation instruction is an upgrade instruction or an initialization instruction, the test system can send a full control instruction to the service node upgrade system of the service network node system, causing the service node upgrade system to execute the upgrade instruction or initialization instruction on all target service nodes. If the operation instruction is a configuration modification instruction, the test system can send a full control instruction to the service node configuration system of the service network node system, causing the service node configuration system to execute the configuration modification instruction on all target service nodes. All target service nodes are then controlled to execute the target test case. In other words, the operation instruction is tested for correctness using full traffic (i.e., a full test). In this way, by first controlling some target service nodes for a low-traffic test, problems can be quickly discovered, and then controlling all target service nodes for a full test ensures the quality of the service network node system, achieving a balanced test efficiency and accuracy.

[0071] Figure 6 FIG. 1 is a flow chart showing another method for testing a service node according to an exemplary embodiment. Figure 6 As shown, the method may further include:

[0072] Step 105: Receive a setup request, where the setup request is used to indicate target node information, at least one target function script, and an execution order corresponding to each target function script.

[0073] Step 106: Generate a test case based on at least one target function script and the execution order corresponding to each target function script.

[0074] Step 107: Store the test cases into a test case set according to the corresponding target node information.

[0075] For example, since the business network node system includes a large number of business nodes, manually editing test cases for each business node would be difficult to ensure efficiency and accuracy. Therefore, the test system can also provide a unified management interface for test cases, allowing users to add test cases, view, edit, and delete test cases through the management interface, thereby achieving unified management, scheduling, and deployment of test cases, thereby ensuring the quality of test cases and reducing test case maintenance costs. Specifically, the test system can maintain a test case set, which includes multiple test cases, each corresponding to a type of node information. The test system can also provide multiple function scripts. Function scripts can be understood as pre-written scripts divided by function, such as push scripts, pull scripts, recording scripts, screenshot scripts, etc. When a user needs to create a new test case, they can issue a creation request through the test system's corresponding web page or application. The creation request is used to indicate at least one target function script and the execution order corresponding to each target function script. For example, the script identifier can include the script name or script path of the target function script. After receiving the establishment request, the test system can determine the target function script from multiple preset function scripts, and then generate a test case based on at least one target function script and the execution order corresponding to each target function script. The test case can execute the target function script in sequence according to the execution order. The establishment request can also indicate the target node information corresponding to the test case, and the test system can store the generated test case in the test case set according to the corresponding target node information. Accordingly, when determining the target test case, the corresponding target test case can be selected in the test case set based on the node information of the target node.

[0076] Figure 7 FIG. 1 is a flow chart showing another method for testing a service node according to an exemplary embodiment. Figure 7 As shown, the method may further include the following steps:

[0077] Step 108: Receive an edit request, where the edit request is used to indicate a test case to be edited in the test case set.

[0078] Step 109: Edit the test case to be edited, and / or edit the node information corresponding to the test case to be edited.

[0079] For example, when a user needs to edit one or more test cases in a test case collection, they can do so by issuing an edit request through the test system's corresponding web page or application. The edit request can include the identifier of the test case to be edited. The test system can then determine the corresponding test case in the test case collection based on the edit request. The test case can then be edited based on the edit content included in the edit request, and the node information corresponding to the test case to be edited can also be edited based on the node information included in the edit request.

[0080] Furthermore, the user may also issue a viewing request or a deletion request through a web page or application corresponding to the test system to view or delete one or more test cases in the test case set.

[0081] Figure 8 FIG. 1 is a flow chart showing another method for testing a service node according to an exemplary embodiment. Figure 8 As shown, the implementation of step 104 may include:

[0082] Step 1046: Verify the identity information of the test initiator, which is the terminal that issues the selection instruction or the service network node system that issues the operation instruction.

[0083] Step 1047: If the identity information of the test initiator passes the verification, the target test task is written into the pending list at a preset time interval. The target test task is used to instruct the target service node to execute the target test case according to the target test mode.

[0084] Step 1048: Read the target test task from the pending list in a polling manner, and execute the target test task if the current task volume is less than a preset task volume threshold.

[0085] For example, the test system can support simultaneous use by multiple users and testing of multiple service network node systems. Consequently, concurrent, high-volume test tasks may occur. A test task can be understood as controlling service nodes to execute test cases. The test system also provides a unified management interface for test tasks, allowing users to add, view, edit, and delete test tasks. To ensure the stability of the test system, test tasks can be subject to flow control. Specifically, when a test initiator triggers a target test task, the test initiator's identity information can be verified. This identity information uniquely identifies the test initiator. A target test task can be understood as controlling a target service node to execute a target test case according to a target test mode. If the target service node is instructed by a selection instruction, the test initiator can be understood as the terminal device that issued the selection instruction. If the target service node is a service node in the service network node system to execute an operation instruction, the test initiator can be understood as the service network node system. Identity information verification can be performed, for example, by verifying whether the test initiator is registered with the test system based on the identity information. If so, verification is successful. The test initiator can also be verified to be legal based on the identity information. If it is legal, the verification is passed. A unique authentication code can also be generated for each test initiator. If the authentication code matches the identity information, the verification is passed. This disclosure does not specifically limit the method of verifying identity information.

[0086] After determining that the identity information of the test initiator has passed the verification, the target test task can be written into the pending list at a preset time interval. The time interval can be understood as 1 / QPS, where QPS (English: Query Per Second, Chinese: Query rate per second) can be set to 1000, for example. There are multiple test tasks recorded in the pending list. Every time a test task is written to the test list, the status of the test task will be recorded as "to be executed" (i.e. todo). Afterwards, the target test task can be read from the pending list in a polling manner, and then the target test task can be deleted from the pending list, or the status of the target test task in the pending list can be recorded as "executed".

[0087] After reading the target test task, you can query the current task volume of the test system. If the current task volume is less than the preset task volume threshold (for example, it can be set to 500 or 1000), execute the target test task. The current task volume can be understood as the number of test tasks currently executed in parallel by the test system. In this way, by using the time interval, the number of concurrent test tasks of the test system at each moment can be controlled to be less than QPS. By using the preset task volume threshold, it can be ensured that the number of test tasks processed simultaneously at each moment is less than the preset task volume threshold, thereby ensuring the stability of the test system.

[0088] In summary, the present disclosure first receives a service network node test request, which is used to indicate the test service type, target test mode, and target service node to be tested. Afterwards, based on the service network node test request, the node information of the target service node is obtained from the node information database, wherein the node information database stores the latest node information. Then, based on the node information of the target service node, the target test case corresponding to the node information of the target service node is selected from the test case set. Finally, the target service node is controlled to execute the target test case according to the target test mode, and the execution result of the target service node executing the target test case is recorded. The present disclosure can realize automated testing of the service node network system, improve the efficiency and accuracy of the test, and thus ensure the quality of the service node network system.

[0089] Figure 9 FIG. 1 is a block diagram of a testing device for a service node according to an exemplary embodiment. Figure 9 As shown, the device 200 includes:

[0090] Receiving module 201 is used to receive a service network node test request, which is used to indicate the test service type, target test mode and target service node to be tested; the target test mode is used to specify at least one of the test execution scope, test execution traffic and test execution scenario.

[0091] The information determination module 202 is used to obtain the node information of the target business node from the node information database according to the business network node test request. The node information database stores the node information synchronized from the business network node system. The business network node system stores and dynamically updates the node information of the business node.

[0092] The use case determination module 203 is configured to select a target test case corresponding to the target service node from a test case set according to the node information of the target service node. The test case set includes corresponding test cases configured for different node information.

[0093] The testing module 204 is configured to control the target service node to execute the target test case according to the target test mode, and record the execution result of the target service node executing the target test case.

[0094] In one implementation, the receiving module 201 may be configured to:

[0095] Receive a service network node test request triggered by a selection instruction, the test service type is an active trigger type, and the selection instruction includes a target test mode and an identifier of a target service node. Or,

[0096] Receive a business network node test request triggered by an operation instruction, where the test business type is an automatic trigger type, the operation instruction is at least one of an upgrade instruction, an initialization instruction, and a configuration modification instruction in the business network node system, the target business node is the business node in the business network node system where the operation instruction is to be executed, and the target test mode is determined based on the target business node.

[0097] In another implementation, if the test service type is an active trigger type, the target test mode includes: any one of: single node regression test, batch regression test, and delivery acceptance test.

[0098] If the test service type is the automatic trigger type, the target test mode is the preset automatic test mode.

[0099] Figure 10 is a block diagram of another service node testing device according to an exemplary embodiment. Figure 10 As shown, the test module 204 may include:

[0100] The local test submodule 2041 is configured to, if the target test mode is the preset automatic test mode, identify a target designated service node from among multiple target service nodes. It then sends a local control instruction to the service network node system, causing the service network node system to execute the instruction on the target designated service node. This in turn controls the target designated service node to execute the target test case.

[0101] The global test submodule 2042 is configured to send a full control instruction to the service network node system if the target service node passes the target test case, causing the service network node system to execute the operation instruction on all target service nodes. This control controls all target service nodes to execute the target test case.

[0102] Figure 11 is a block diagram of another service node testing device according to an exemplary embodiment. Figure 11 As shown, the apparatus 200 may further include:

[0103] Establishment module 205 is configured to receive an establishment request, the establishment request being configured to indicate target node information, at least one target function script, and the execution order corresponding to each target function script. Test cases are generated based on the at least one target function script and the execution order corresponding to each target function script. The test cases are stored in a test case set according to the corresponding target node information.

[0104] Figure 12 is a block diagram of another service node testing device according to an exemplary embodiment. Figure 12 As shown, the apparatus 200 may further include:

[0105] The editing module 206 is configured to receive an editing request indicating a test case to be edited in the test case set, edit the test case to be edited, and / or edit the node information corresponding to the test case to be edited.

[0106] Figure 13 is a block diagram of another service node testing device according to an exemplary embodiment. Figure 13 As shown, the test module 204 may include:

[0107] The verification submodule 2043 is used to verify the identity information of the test initiator, which is the terminal that issues the selection instruction or the service network node system that issues the operation instruction.

[0108] The writing submodule 2044 is used to write the target test task into the pending list at a preset time interval if the identity information of the test initiator is verified. The target test task is used to instruct the target business node to execute the target test case according to the target test mode.

[0109] The testing submodule 2045 is configured to read target test tasks from the to-be-processed list in a polling manner, and execute the target test tasks when the current task amount is less than a preset task amount threshold.

[0110] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0111] In summary, the present disclosure first receives a service network node test request, which is used to indicate the test service type, target test mode, and target service node to be tested. Afterwards, based on the service network node test request, the node information of the target service node is obtained from the node information database, wherein the node information database stores the latest node information. Then, based on the node information of the target service node, the target test case corresponding to the node information of the target service node is selected from the test case set. Finally, the target service node is controlled to execute the target test case according to the target test mode, and the execution result of the target service node executing the target test case is recorded. The present disclosure can realize automated testing of the service node network system, improve the efficiency and accuracy of the test, and thus ensure the quality of the service node network system.

[0112] Reference below Figure 14, which shows a schematic structural diagram of an electronic device (e.g., a terminal device or a server) 300 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 14 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0113] like Figure 14 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. Various programs and data required for the operation of the electronic device 300 are also stored in the RAM 303. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0114] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 14 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0115] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0116] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0117] In some embodiments, the terminal devices and servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0118] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0119] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives a service network node test request, the service network node test request is used to indicate the test service type, the target test mode and the target service node to be tested; the target test mode is used to specify at least one of the test execution range, the test execution traffic, and the test execution scenario; obtains the node information of the target service node from a node information database according to the service network node test request, the node information database stores the node information synchronized from the service network node system, and the service network node system stores and dynamically updates the node information of the service node; selects a target test case corresponding to the target service node from a test case set according to the node information of the target service node, the test case set including corresponding test cases configured for different node information; controls the target service node to execute the target test case according to the target test mode, and records the execution result of the target service node executing the target test case.

[0120] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0121] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0122] The modules described in the embodiments of the present disclosure may be implemented in software or hardware. In some cases, the name of a module does not necessarily limit the module itself. For example, a node determination module may also be described as a "module for determining a target node."

[0123] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0124] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0125] According to one or more embodiments of the present disclosure, Example 1 provides a method for testing a business node, including: receiving a business network node test request, the business network node test request is used to indicate a test business type, a target test mode and a target business node to be tested; the target test mode is used to specify at least one of a test execution range, a test execution traffic, and a test execution scenario; according to the business network node test request, obtaining node information of the target business node from a node information database, the node information database stores node information synchronized from a business network node system, and the business network node system stores and dynamically updates the node information of the business node; according to the node information of the target business node, selecting a target test case corresponding to the target business node from a test case set, the test case set including corresponding test cases configured for different node information; controlling the target business node to execute the target test case according to the target test mode, and recording the execution result of the target business node executing the target test case.

[0126] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein receiving a business network node test request includes: receiving the business network node test request triggered by a selection instruction, the test business type is an active trigger type, and the selection instruction includes the target test mode and the identifier of the target business node; or, receiving the business network node test request triggered by an operation instruction, the test business type is an automatic trigger type, the operation instruction is at least one of an upgrade instruction, an initialization instruction, and a configuration modification instruction in the business network node system, the target business node is a business node in the business network node system to execute the operation instruction, and the target test mode is determined based on the target business node.

[0127] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, and if the test business type is an active trigger type, the target test mode includes: any one of: single node regression test, batch regression test, and delivery acceptance test; if the test business type is an automatic trigger type, the target test mode is a preset automatic test mode.

[0128] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 3, wherein if the target test mode is a preset automatic test mode, controlling the target business node to execute the target test case according to the target test mode includes: determining a target designated business node among multiple target business nodes; sending a local control instruction to the business network node system so that the business network node system executes the operation instruction on the target designated business node; controlling the target designated business node to execute the target test case; if the result of the target designated business node executing the target test case is passed, sending a full control instruction to the business network node system so that the business network node system executes the operation instruction on all target business nodes; and controlling all target business nodes to execute the target test case.

[0129] According to one or more embodiments of the present disclosure, Example 5 provides the method of Examples 1 to 4, which further includes: receiving an establishment request, the establishment request being used to indicate target node information, at least one target function script, and the execution order corresponding to each target function script; generating a test case based on at least one target function script and the execution order corresponding to each target function script; and storing the test case in the test case set according to the corresponding target node information.

[0130] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 5, which further includes: receiving an editing request, wherein the editing request is used to indicate a test case to be edited in the test case set; editing the test case to be edited, and / or editing node information corresponding to the test case to be edited.

[0131] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 2, wherein controlling the target business node to execute the target test case according to the target test mode includes: verifying the identity information of the test initiator, the test initiator being the terminal that issues the selection instruction, or the business network node system that issues the operation instruction; if the identity information of the test initiator passes the verification, writing the target test task into the pending list at a preset time interval, the target test task being used to instruct the target business node to execute the target test case according to the target test mode; reading the target test task from the pending list in a polling manner, and executing the target test task when the current task amount is less than a preset task amount threshold.

[0132] According to one or more embodiments of the present disclosure, Example 8 provides a testing device for a business node, including: a receiving module for receiving a business network node test request, the business network node test request is used to indicate a test business type, a target test mode and a target business node to be tested; the target test mode is used to specify at least one of a test execution range, a test execution traffic, and a test execution scenario; an information determination module for obtaining node information of the target business node from a node information database according to the business network node test request, the node information database storing node information synchronized from a business network node system, and the business network node system storing and dynamically updating the node information of the business node; a use case determination module for selecting a target test case corresponding to the target business node from a test case set according to the node information of the target business node, the test case set including corresponding test cases configured for different node information; a testing module for controlling the target business node to execute the target test case according to the target test mode, and recording the execution result of the target business node executing the target test case.

[0133] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon, which implements the steps of the methods described in Examples 1 to 7 when executed by a processing device.

[0134] According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of the method described in Examples 1 to 7.

[0135] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0136] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0137] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.

Claims

1. A service node testing method, characterized in that: The method comprises: receiving a service network node test request, the service network node test request being used to indicate a test service type, a target test mode, and a target service node to be tested; the test service type being a trigger type of the service network node test request, the target test mode being used to specify at least one of a test execution scope, a test execution flow, and a test execution scenario, and the target test mode being related to the test service type; Obtaining, according to the service network node test request, node information of the target service node from a node information database, wherein the node information database stores node information synchronized from a service network node system, and the service network node system stores and dynamically updates the node information of the service node; Selecting, according to the node information of the target service node, a target test case corresponding to the target service node from a test case set, wherein the test case set includes corresponding test cases configured for different node information; Controlling the target service node to execute the target test case according to the target test mode, and recording the execution result of the target service node executing the target test case; Wherein, the test service type includes an active trigger type or an automatic trigger type; if the test service type is the automatic trigger type, the target test mode is a preset automatic test mode; If the target test mode is a preset automatic test mode, controlling the target service node to execute the target test case according to the target test mode includes: Among the multiple target business nodes, determine the target designated business node; send a local control instruction to the business network node system to enable the business network node system to execute the operation instruction on the target designated business node; control the target designated business node to execute the target test case; if the result of the target designated business node executing the target test case is passed, send a full control instruction to the business network node system to enable the business network node system to execute the operation instruction on all the target business nodes; control all the target business nodes to execute the target test case.

2. The method according to claim 1, characterized in that The receiving of a service network node test request includes: receiving the service network node test request triggered by a selection instruction, wherein the test service type is an active trigger type, and the selection instruction includes the target test mode and an identifier of the target service node; or Receive the business network node test request triggered by an operation instruction, the test business type is an automatic trigger type, the operation instruction is at least one of an upgrade instruction, an initialization instruction, and a configuration modification instruction in the business network node system, the target business node is the business node in the business network node system to execute the operation instruction, and the target test mode is determined based on the target business node.

3. The method according to claim 2, characterized in that If the test service type is an active trigger type, the target test mode includes: any one of: single node regression test, batch regression test, and delivery acceptance test.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Receive a setup request, the setup request being used to indicate target node information, at least one target function script, and an execution order corresponding to each target function script; Generate a test case according to at least one target function script and the execution order corresponding to each target function script; The test cases are stored in the test case set according to the corresponding target node information.

5. The method according to claim 4, characterized in that The method further comprises: receiving an edit request, where the edit request is used to indicate a test case to be edited in the test case set; Edit the test case to be edited, and / or edit the node information corresponding to the test case to be edited.

6. The method according to claim 2, characterized in that The controlling the target service node to execute the target test case according to the target test mode includes: Verifying the identity information of a test initiator, where the test initiator is the terminal that issues the selection instruction or the service network node system that issues the operation instruction; If the identity information of the test initiator is verified, the target test task is written into the pending list according to the preset time interval, and the target test task is used to instruct the target service node to execute the target test case according to the target test mode; The target test task is read from the to-be-processed list in a polling manner, and the target test task is executed when the current task amount is less than a preset task amount threshold.

7. A service node testing device, characterized in that: The device comprises: a receiving module configured to receive a service network node test request, the service network node test request being used to indicate a test service type, a target test mode, and a target service node to be tested; the test service type being a trigger type of the service network node test request, the target test mode being used to specify at least one of a test execution scope, a test execution flow, and a test execution scenario, and the target test mode being related to the test service type; an information determination module, configured to obtain, based on the service network node test request, node information of the target service node from a node information database, wherein the node information database stores node information synchronized from a service network node system, and the service network node system stores and dynamically updates the node information of the service node; A use case determination module, configured to select a target test case corresponding to the target service node from a test case set according to the node information of the target service node, wherein the test case set includes corresponding test cases configured for different node information; A test module, configured to control the target service node to execute the target test case according to the target test mode, and record the execution result of the target service node executing the target test case; Among them, the test business type includes an active trigger type or an automatic trigger type; if the test business type is the automatic trigger type, the target test mode is a preset automatic test mode; if the target test mode is the preset automatic test mode, the test module is used to determine the target designated business node among multiple target business nodes; send a local control instruction to the business network node system so that the business network node system executes the operation instruction on the target designated business node; control the target designated business node to execute the target test case; if the result of the target designated business node executing the target test case is passed, send a full control instruction to the business network node system so that the business network node system executes the operation instruction on all the target business nodes; control all the target business nodes to execute the target test case.

8. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method according to any one of claims 1 to 6 are implemented.

9. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Test method and device, network equipment and storage medium

    CN112783778A