CN115484187A - Method, equipment and storage medium for testing container network interface in container environment - Google Patents

Method, equipment and storage medium for testing container network interface in container environment Download PDF

Info

Publication number
CN115484187A
CN115484187A CN202211360069.6A CN202211360069A CN115484187A CN 115484187 A CN115484187 A CN 115484187A CN 202211360069 A CN202211360069 A CN 202211360069A CN 115484187 A CN115484187 A CN 115484187A
Authority
CN
China
Prior art keywords
test
container
network interface
network
tool
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211360069.6A
Other languages
Chinese (zh)
Other versions
CN115484187B (en
Inventor
花磊
刘学聪
崔骥
赵安全
王亮
梁兵
高远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Boyun Technology Co ltd
Original Assignee
Jiangsu Boyun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Boyun Technology Co ltd filed Critical Jiangsu Boyun Technology Co ltd
Priority to CN202211360069.6A priority Critical patent/CN115484187B/en
Publication of CN115484187A publication Critical patent/CN115484187A/en
Application granted granted Critical
Publication of CN115484187B publication Critical patent/CN115484187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers

Abstract

The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a storage medium for testing a container network interface in a container environment. It includes: determining at least one test item corresponding to a container network interface to be tested; determining a network test tool; performing network performance test on the container network interface through a network test tool to obtain a first test result; storing the first test result in the target device; determining whether an untested container network interface exists; under the condition that the untested container network interface exists, performing network performance test on the untested container network interface according to at least one test item through a network test tool to obtain a second test result, and storing the second test result in the target equipment until the untested container network interface does not exist; obtaining a test result stored in target equipment; and generating a test report based on the test result. The problem of low testing efficiency of the container network interface can be solved.

Description

Method, equipment and storage medium for testing container network interface in container environment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a storage medium for testing a container network interface in a container environment.
Background
In recent years, as big data is rapidly developed, the container (kubernets, K8 s) technology has become mature. The container network interface is inevitably required to be set in the container environment, and the container network interface plays a role in data transmission in the container environment, so that the testing of the container network interface is indispensable.
The traditional container network interface test method comprises the following steps: and switching the plurality of network testing tools in a manual mode to respectively test the container network interface to obtain the testing results respectively corresponding to the plurality of network testing tools.
However, the manual switching of multiple network testing tools is complicated, the automation level is low, and the testing efficiency of the container network interface is low.
Disclosure of Invention
The application provides a method, equipment and a storage medium for testing a container network interface in a container environment, which can solve the problem of low efficiency of testing the container network interface, and provides the following technical scheme:
in a first aspect, a method for testing a container network interface in a container environment is provided, including: determining at least one test item corresponding to a container network interface to be tested; determining a network test tool corresponding to the container network interface based on the at least one test item; performing network performance test on the container network interface according to the at least one test item through the network test tool to obtain a first test result corresponding to the container network interface; storing the first test result in target equipment indicated by a preset storage address; determining whether an untested container network interface exists; under the condition that the untested container network interface exists, performing network performance test on the untested container network interface according to the at least one test item through the network test tool to obtain a second test result corresponding to the untested container network interface, and storing the second test result in the target device until the untested container network interface does not exist; obtaining a test result stored in the target device; generating a test report based on the test result.
Optionally, the generating a test report based on the test result includes: acquiring specified data in the test result; performing visualization processing on the specified data to obtain the test report; the test report comprises a visual chart corresponding to the specified data.
Optionally, before the performing, by the network testing tool, a network performance test on the container network interface according to the at least one test item and obtaining a first test result corresponding to the container network interface, the method further includes: determining whether load container information exists; in the case that the load container information is determined to exist, loading the load container indicated by the load container information; the load container is used to provide a load during testing.
Optionally, before the performing, by the network testing tool, a network performance test on the container network interface according to the at least one test item and obtaining a first test result corresponding to the container network interface, the method further includes: determining a service end node where a service end container is located and a client end node where a client end container is located; the server container and the client container are containers provided with the network testing tool; loading a server container corresponding to the network testing tool to the server node; and loading the client container corresponding to the network test tool to the client node.
Optionally, the determining a server node where the server container is located and a client node where the client container is located includes: determining whether designated node information exists; the designated node information includes information of the server node and information of the client node; and in the case that the designated node information is determined to exist, the service end node and the client node indicated by the designated node information are taken as the service end node and the client node.
Optionally, the performing, by the network testing tool, a network performance test on the container network interface according to the at least one test item to obtain a first test result corresponding to the container network interface further includes: generating a test command corresponding to the test item based on the test item; and sending the test command to the server container and the client container so that the server container and the client container complete the network performance test corresponding to the test item according to the test command.
Optionally, the network test tool comprises a first test tool, a second test tool, a third test tool and a fourth test tool; the test items corresponding to the first test tool comprise: the method comprises the following steps of testing throughput of a transmission control protocol, throughput of a user data protocol, jitter of the user data protocol, packet loss rate of the user data protocol and forwarding rate of the user data protocol packet; the test items corresponding to the second test tool comprise: a transmission control protocol delay test and a user data protocol delay test; the test items corresponding to the third test tool comprise: a transmission control protocol response efficiency test and a transmission control protocol response efficiency delay test; the test items corresponding to the fourth test tool comprise: IP address management test and flow table utilization test.
Optionally, before determining at least one test item corresponding to the container network interface, the method further includes: determining whether interface information to be received exists; and under the condition that the interface information to be received exists, receiving the interface information, and determining a container network interface indicated by the interface information as the container network interface to be tested.
In a second aspect, an electronic device is provided, which includes a memory, a controller, and a computer program stored on the memory and executable on the controller, and when the controller executes the computer program, the steps of the method for testing a container network interface in a container environment are implemented.
In a third aspect, a computer-readable storage medium is provided, where a program is stored in the storage medium, and the program is used to implement the method for testing the container network interface in the container environment provided in the first aspect when executed by a processor.
The beneficial effect of this application includes at least: determining at least one test item corresponding to a container network interface to be tested; determining a network test tool corresponding to the container network interface based on at least one test item; performing network performance test on the container network interface according to at least one test item through a network test tool to obtain a first test result corresponding to the container network interface; storing the first test result in target equipment indicated by a preset storage address; determining whether an untested container network interface exists; under the condition that the untested container network interface exists, performing network performance test on the untested container network interface according to at least one test item through a network test tool to obtain a second test result corresponding to the untested container network interface, and storing the second test result in the target equipment until the untested container network interface does not exist; obtaining a test result stored in target equipment; and generating a test report based on the test result. By determining whether the untested container network interface exists or not, and automatically performing network performance test on the untested container network interface under the condition that the untested container network interface exists, the problems that the network performance test is performed on the container network interface by manually switching a plurality of network test tools, the operation is complex, the automation degree is low, and the container network interface test efficiency is low can be solved.
In addition, by acquiring specified data in the test result; carrying out visualization processing on the specified data to obtain a test report; the test report comprises a visual chart corresponding to the specified data. The test results can be displayed in a form of a chart, and the test results of each test item are clearly displayed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following descriptions are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for testing a container network interface in a container environment according to an embodiment of the present application;
FIG. 2 is a flow diagram of determining specified node information and determining specified test item information provided by one embodiment of the present application;
FIG. 3 is a flow diagram of a network performance test of a container network interface according to an embodiment of the present application;
FIG. 4 is a block diagram of a device for testing a network interface of a container in a container environment according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device provided by an embodiment of the application.
Detailed Description
The technical solutions of the present application will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are only some embodiments of the present application, but not all embodiments. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In this application, where the contrary is not intended, directional words such as "upper, lower, top and bottom" are generally used with respect to the orientation shown in the drawings, or with respect to the component itself in the vertical, vertical or gravitational direction; likewise, for ease of understanding and description, "inner and outer" refer to the inner and outer relative to the profile of the components themselves, but the above directional words are not intended to limit the application.
First, a number of terms referred to in the present application will be described.
Container environment (Kubernetes, K8 s): the system is an open source system for automatic deployment, expansion and management and containerization of applications.
Node (Node) is a workload Node in a container environment, each Node being assigned a workload.
A container: the method is a sandbox technology, an application is operated in the sandbox technology and isolated from the outside, and the purpose of the sandbox technology is to provide an independent operation environment for a process set.
Container clustering: is a set of node computers for running containerized applications.
Container Network Interface (CNI): the specification of a container network interface is implemented in a container environment.
Internet Protocol Address (IP): the IP address is a uniform address format provided by the IP, and a logical address is allocated to each network and each host on the Internet, so as to shield the difference of physical addresses.
The following describes a method for testing a container network interface in a container environment in detail.
As shown in fig. 1, an embodiment of the present application provides a method for testing a container network interface in a container environment, where implementation of the method may rely on a computer program, and the computer program may be run on a computer device such as a smart phone, a tablet computer, a personal computer, or run on a server, and the embodiment does not limit an operation subject of the method. The method at least comprises the following steps:
step 101, determining at least one test item corresponding to a container network interface to be tested.
The container network interface to be tested refers to a container network interface which needs to be subjected to a network performance test. The test items refer to test items of network performance tests. For example, a Transmission Control Protocol (TCP) throughput test, a User Data Protocol (UDP) jitter test, and the like.
In this embodiment, the test items corresponding to the container network interface may be a transmission control protocol throughput test, a user data protocol jitter test, a user data protocol packet loss rate test, a user data protocol packet forwarding rate test, a transmission control protocol delay test, a user data protocol delay test, a transmission control protocol response efficiency delay test, an IP Address Management (IPAM) test, a flow table utilization rate test, and the like. The embodiment does not limit the test items corresponding to the container network interface.
In the network performance test of the primary container network interface, all test items are tested, and the test consumes a long time. In order to reduce the time consumption of network performance test, a user can specify a test item to carry out the network performance test on the container network interface, so that the test efficiency can be improved while the test requirement of the user is met.
Specifically, determining at least one test item corresponding to the container network interface includes: determining whether specified test item information exists; and under the condition that the specified test item information is determined to exist, taking the test item indicated by the specified test item information as the test item of the container network interface.
As shown in fig. 2, under the condition that it is determined that the specified test item information exists, the specified test item information is acquired, and the test item indicated by the specified test item information is taken as the test item of the container network interface. And under the condition that the specified test item information does not exist, all the test items are used as the test items of the container network interface.
Since multiple container network interfaces may be included in the same container cluster, the container network interface to be tested needs to be determined before performing the network performance test of the container network interfaces.
Specifically, before determining at least one test item corresponding to the container network interface, the method further includes: determining whether interface information to be received exists; and under the condition that the interface information to be received exists, receiving the interface information, and determining the container network interface indicated by the interface information as the container network interface.
The interface information to be received is used for indicating a user-specified container network interface to be tested.
In this embodiment, in the case that it is determined that there is interface information to be received, the interface information is received, and the container network interface indicated by the interface information is determined as the container network interface to be tested. In a case where it is determined that there is no interface information to be received, a container network interface currently used in the container cluster may be used as a container network interface to be tested, or all container network interfaces included in the container cluster may be used as container network interfaces to be tested.
Referring to fig. 3, in case it is determined that there is no interface information to be received, a current container network interface in the container cluster is taken as a container network interface to be tested. And under the condition that the interface information to be received exists, receiving the interface information, and determining the container network interface indicated by the interface information as the container network interface to be tested.
Step 102, determining a network test tool corresponding to the container network interface based on at least one test item.
The network testing tool is used for testing the network performance of the container network interface. The corresponding test items of each network test tool are different or the same.
In this embodiment, the network test tool includes a first test tool, a second test tool, a third test tool and a fourth test tool; the test items corresponding to the first test tool include: the method comprises the following steps of testing throughput of a transmission control protocol, throughput of a user data protocol, jitter of the user data protocol, packet loss rate of the user data protocol and forwarding rate of the user data protocol packet; the test items corresponding to the second test tool comprise: a transmission control protocol delay test and a user data protocol delay test; the test items corresponding to the third test tool include: a transmission control protocol response efficiency test and a transmission control protocol response efficiency delay test; the test items corresponding to the fourth test tool include: other test items than the above-described test items, for example, an IP address management test, a flow table utilization test, and the like.
Because the network test tools corresponding to different test items may be different, the corresponding network test tools need to be determined according to the test items in the process of performing the network performance test on the container network interface.
Such as: the test items designated by the user are a transmission control protocol throughput test and a transmission control protocol response efficiency test. Correspondingly, the network test tool corresponding to the transmission control protocol throughput test is the first test tool, and the network test tool corresponding to the transmission control protocol response efficiency test is the third test tool.
In this embodiment, the first test tool comprises an Iperf network test tool, the second test tool comprises a Qperf network test tool, the third test tool comprises a Netperf network test tool, and the fourth test tool comprises another network test tool. The other network testing tools may be existing network testing tools or user-defined network testing tools, and specific contents of the other network testing tools are not limited herein.
And 103, performing network performance test on the container network interface according to at least one test item through a network test tool to obtain a first test result corresponding to the container network interface.
Wherein, the first test result refers to the test result of the container network interface.
The output format of each network test tool may not be uniform, and the test result is in one format. Therefore, the output results of each network test tool need to be compiled and then summarized into a test result with a uniform format.
Specifically, an output result of the network test tool is obtained; and extracting data corresponding to the test items from the output result, and summarizing the data into a test result.
In this embodiment, each test item has a corresponding character string, data corresponding to the test item is extracted from the output result through the character string corresponding to the test item, and then the extracted data is summarized into the test result.
Since the network performance test is performed on the container network interface through the network test tool, the server container and the client container corresponding to the network test tool need to be loaded for performing the network performance test, and therefore, the server container and the client container need to be loaded before performing the network performance test. The server container and the client container are containers provided with network testing tools.
Specifically, before a network performance test is performed on the container network interface according to at least one test item by using a network test tool to obtain a first test result corresponding to the container network interface, the method includes: determining a service end node where a service end container is located and a client end node where a client end container is located; loading a server container corresponding to the network testing tool to a server node; and loading the client container corresponding to the network testing tool to the client node.
The server node is a node for loading a server container, and the client node is a node for loading a client container.
In this embodiment, determining the server node where the server container is located and the client node where the client container is located includes: determining whether designated node information exists; the designated node information includes information of the service end node and information of the client end node; in the case where it is determined that the designated node information exists, the service end node and the client node indicated by the designated node information are made to be the service end node and the client node.
And in the case that the designated node information does not exist, taking the nodes which are relatively idle in the container cluster as a service node and a client node for the network performance test. The nodes that are relatively idle are nodes that are not called temporarily.
Because the test contents corresponding to different test items are different, the server container and the client container need to receive different test commands to complete network performance tests corresponding to different test items.
Specifically, the method includes that a network test tool performs a network performance test on a container network interface according to at least one test item to obtain a first test result corresponding to the container network interface, and further includes: generating a test command corresponding to the test item based on the test item; and sending the test command to the server container and the client container so that the server container and the client container complete the network performance test corresponding to the test item according to the test command.
For example, as shown in fig. 2, after determining the test items of the network performance test, a corresponding test command is generated based on different test items, and the test command is sent to the server container and the client container. And obtaining corresponding test results after all the test items are completed.
In order to simulate the working condition of a real container cluster, before the network performance test is carried out on the container network interface, the actual working condition is simulated by loading a load container.
Specifically, before the network performance test is performed on the container network interface according to at least one test item by the network test tool to obtain a first test result corresponding to the container network interface, the method further includes: determining whether load container information exists; in the case that the load container information is determined to exist, loading the load container indicated by the load container information; the load container is used to provide a load during testing.
Wherein the load container information includes the specified load container and the number of load containers.
Such as: the load container information indicates that the load container is a load container a, and the number of the indicated load containers a is 10, then before performing a network performance test on the container network interface, 10 load containers a are loaded in the container cluster to simulate an actual working condition of the container cluster.
And 104, storing the first test result in the target equipment indicated by the preset storage address.
The target device indicated by the preset storage address may be a local device, or may be a remote device with a communication connection established.
Step 105, determine if there is an untested container network interface.
And 106, under the condition that the untested container network interface exists, carrying out network performance test on the untested container network interface according to at least one test item through the network test tool to obtain a second test result corresponding to the untested container network interface, and storing the second test result in the target equipment until the untested container network interface does not exist.
And the second test result refers to a test result corresponding to the untested container network interface. When the network container interface indicated by the interface information to be received includes a plurality of or defaults that network performance tests need to be performed on all the network container interfaces, after the network performance test of the first container network interface is completed, the untested container network interface also needs to be switched to perform the network performance test.
After the network performance test of one container network interface is completed, the server container, the client container and the load container remained in the network performance test affect the accuracy of the network performance test of the next container network interface, so that the test environment needs to be cleaned before the network performance test of the next container network interface. The testing environment comprises a server container, a client container, a load container and the like which are remained in the last testing.
Specifically, before the network performance test is performed on the container network interface according to at least one test item through the network test tool, the method further includes: and cleaning the test environment.
Step 107, obtaining the test result stored in the target device.
The test result stored in the target device comprises at least one test result.
Since the target device indicated by the preset storage address may store a historical test result, and the historical test result may affect the generation of the test report, the historical test result that may be stored in the target device needs to be deleted.
Specifically, before storing the first test result in the target device indicated by the preset storage address, the method further includes: and deleting the historical test result stored in the target equipment indicated by the preset storage address.
And step 108, generating a test report based on the test result.
The test report comprises data corresponding to each test item of the container network interface, and the test report is displayed in a chart form.
Specifically, generating a test report based on the test results includes: acquiring specified data in a test result; carrying out visualization processing on the specified data to obtain a test report; the test report comprises a visual chart corresponding to the specified data.
The designated data refers to data corresponding to the test item. The chart may be a bar graph, a table, a line graph, a tree graph, a contrast graph, etc.
Such as: taking the comparison graph as an example, in the case that there is more than one test result, the comparison graph in the test report generated based on the test result can clearly show the comparison result of each test item of the container network interface.
In this embodiment, the data corresponding to the test item exists in the test result in the form of a character string, the data corresponding to the test item is obtained by obtaining the corresponding character string, and the data is displayed in the form of a graph.
In summary, in the method for testing a container network interface in a container environment provided by this embodiment, at least one test item corresponding to the container network interface to be tested is determined; determining a network test tool corresponding to the container network interface based on at least one test item; performing network performance test on the container network interface according to at least one test item through a network test tool to obtain a first test result corresponding to the container network interface; storing the first test result in target equipment indicated by a preset storage address; determining whether an untested container network interface exists; under the condition that the untested container network interface exists, performing network performance test on the untested container network interface according to at least one test item through a network test tool to obtain a second test result corresponding to the untested container network interface, and storing the second test result in the target equipment until the untested container network interface does not exist; obtaining a test result stored in target equipment; and generating a test report based on the test result. By determining whether the untested container network interface exists or not and automatically testing the network performance of the untested container network interface under the condition that the untested container network interface exists, the problems that the network performance of the container network interface is tested by manually switching a plurality of network testing tools, the operation is complex, the automation degree is low and the testing efficiency of the container network interface is low can be solved.
In addition, by acquiring specified data in the test result; carrying out visualization processing on the specified data to obtain a test report; the test report comprises a visual chart corresponding to the specified data. The test results can be displayed in a form of a chart, and the test results of each test item are clearly displayed.
The present embodiment provides a device for testing a network interface of a container under a container environment, as shown in fig. 4. The device comprises at least the following modules: a first determination module 410, a second determination module 420, a result output module 430, a result storage module 440, a third determination module 450, a loop test module 460, a storage retrieval module 470, and a report generation module 480.
The first determining module 410 is configured to determine at least one test item corresponding to a container network interface to be tested.
The second determining module 420 is configured to determine, based on the at least one test item, a network test tool corresponding to the container network interface.
And the result output module 430 is configured to perform a network performance test on the container network interface according to the at least one test item through the network test tool, so as to obtain a first test result corresponding to the container network interface.
And a result storage module 440, configured to store the first test result in the target device indicated by the preset storage address.
A third determining module 450 for determining whether an untested container network interface exists.
And the loop test module 460 is configured to, under the condition that an untested container network interface exists, perform a network performance test on the untested container network interface according to at least one test item through a network test tool to obtain a second test result corresponding to the untested container network interface, and store the second test result in the target device until it is determined that the untested container network interface does not exist.
And a storage obtaining module 470, configured to obtain the test result stored in the target device.
And a report generating module 480 for generating a test report based on the test result.
Reference is made in relevant detail to the above method and apparatus embodiments.
It should be noted that: in the above embodiment, when the device for testing a network interface of a container in a container environment tests the network interface of the container in the container environment, only the division of the functional modules is used as an example, in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device for testing a network interface of a container in a container environment is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the device for testing a container network interface in a container environment and the method for testing a container network interface in a container environment provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiments and are not described herein again.
The present embodiment provides an electronic device as shown in fig. 5. The electronic device includes at least a processor 510 and a memory 520.
Processor 510 may include one or more processing cores, such as: 4 core processors, 8 core processors, etc. The processor 510 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). Processor 510 may also include a main processor and a coprocessor, where the main processor is a processor, also called a Central Processing Unit (CPU), for Processing data in the wake-up state; a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 510 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, processor 510 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
Memory 520 may include one or more computer-readable storage media, which may be non-transitory. Memory 520 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 520 is used to store at least one instruction for execution by processor 510 to implement the method for testing a container network interface in a container environment provided by the method embodiments of the present application.
In some embodiments, the electronic device may further include: a peripheral interface and at least one peripheral. The processor 510, memory 520, and peripheral interface may be connected by buses or signal lines. Each peripheral may be connected to the peripheral interface via a bus, signal line, or circuit board. Illustratively, peripheral devices include, but are not limited to: radio frequency circuit, touch display screen, audio circuit, power supply, etc.
Of course, the electronic device may include fewer or more components, which is not limited by the embodiment.
Optionally, the present application further provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and the program is loaded and executed by a processor to implement the method for testing a container network interface in a container environment according to the foregoing method embodiments.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
It is to be understood that the above-described embodiments are only a few, but not all, of the embodiments described herein. Based on the embodiments in the present application, a person skilled in the art may make other variations or changes without creative efforts, and all of them should fall into the protection scope of the present application.

Claims (10)

1. A method for testing a container network interface in a container environment is characterized by comprising the following steps:
determining at least one test item corresponding to a container network interface to be tested;
determining a network test tool corresponding to the container network interface based on the at least one test item;
performing network performance test on the container network interface according to the at least one test item through the network test tool to obtain a first test result corresponding to the container network interface;
storing the first test result in target equipment indicated by a preset storage address;
determining whether an untested container network interface exists;
under the condition that the untested container network interface exists, performing network performance test on the untested container network interface according to the at least one test item through the network test tool to obtain a second test result corresponding to the untested container network interface, and storing the second test result in the target device until the untested container network interface does not exist;
obtaining a test result stored in the target device;
generating a test report based on the test result.
2. The method of claim 1, wherein generating a test report based on the test results comprises:
acquiring specified data in the test result;
performing visualization processing on the specified data to obtain the test report; the test report comprises a visual chart corresponding to the specified data.
3. The method according to claim 1, wherein before the network performance testing of the container network interface according to the at least one test item by the network testing tool to obtain the first test result corresponding to the container network interface, the method further comprises:
determining whether load container information exists;
in the case that the load container information is determined to exist, loading the load container indicated by the load container information; the load container is used to provide a load during testing.
4. The method according to claim 1, wherein before the network performance testing is performed on the container network interface according to the at least one test item by the network testing tool and a first test result corresponding to the container network interface is obtained, the method further includes:
determining a service end node where a service end container is located and a client end node where a client end container is located; the server container and the client container are containers provided with the network testing tool;
loading a server container corresponding to the network testing tool to the server node;
and loading the client container corresponding to the network test tool to the client node.
5. The method according to claim 4, wherein the determining the server node where the server container is located and the client node where the client container is located comprises:
determining whether designated node information exists; the designated node information includes information of the server node and information of the client node;
and in the case that the designated node information is determined to exist, the service end node and the client node indicated by the designated node information are taken as the service end node and the client node.
6. The method according to claim 4, wherein the performing, by the network test tool, a network performance test on the container network interface according to the at least one test item to obtain a first test result corresponding to the container network interface further comprises:
generating a test command corresponding to the test item based on the test item;
and sending the test command to the server container and the client container so that the server container and the client container complete the network performance test corresponding to the test item according to the test command.
7. The method of claim 1, wherein the network test tool comprises a first test tool, a second test tool, a third test tool, and a fourth test tool;
the test items corresponding to the first test tool comprise: the method comprises the following steps of testing throughput of a transmission control protocol, throughput of a user data protocol, jitter of the user data protocol, packet loss rate of the user data protocol and forwarding rate of the user data protocol packet;
the test items corresponding to the second test tool comprise: a transmission control protocol delay test and a user data protocol delay test;
the test items corresponding to the third test tool comprise: a transmission control protocol response efficiency test and a transmission control protocol response efficiency delay test;
the test items corresponding to the fourth test tool comprise: IP address management test and flow table utilization test.
8. The method of claim 1, wherein before determining at least one test item corresponding to the container network interface, further comprising:
determining whether interface information to be received exists;
and under the condition that the interface information to be received exists, receiving the interface information, and determining a container network interface indicated by the interface information as the container network interface to be tested.
9. An electronic device, characterized in that the electronic device comprises: a memory and at least one processor, the memory having instructions stored therein; the at least one processor invoking the instructions in the memory to cause the electronic device to perform the steps of the container network interface testing method in a container environment of any of claims 1-8.
10. A computer-readable storage medium having stored thereon instructions that, when executed by a processor, perform the steps of the method for testing a container network interface in a container environment according to any one of claims 1 to 8.
CN202211360069.6A 2022-11-02 2022-11-02 Method, equipment and storage medium for testing container network interface in container environment Active CN115484187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211360069.6A CN115484187B (en) 2022-11-02 2022-11-02 Method, equipment and storage medium for testing container network interface in container environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211360069.6A CN115484187B (en) 2022-11-02 2022-11-02 Method, equipment and storage medium for testing container network interface in container environment

Publications (2)

Publication Number Publication Date
CN115484187A true CN115484187A (en) 2022-12-16
CN115484187B CN115484187B (en) 2023-03-24

Family

ID=84395224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211360069.6A Active CN115484187B (en) 2022-11-02 2022-11-02 Method, equipment and storage medium for testing container network interface in container environment

Country Status (1)

Country Link
CN (1) CN115484187B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756054A (en) * 2023-08-23 2023-09-15 北京集度科技有限公司 Test method, test device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109739744A (en) * 2018-12-05 2019-05-10 北京奇艺世纪科技有限公司 A kind of test macro and method
CN110489201A (en) * 2018-05-15 2019-11-22 中国移动通信集团浙江有限公司 Container performance test device and method
US20200145301A1 (en) * 2015-07-28 2020-05-07 Spirent Communications, Inc. Systems and Methods for Automated Testing of MoCA Networks
CN113138929A (en) * 2021-05-12 2021-07-20 平安国际智慧城市科技股份有限公司 Distributed interface testing method and device, electronic equipment and storage medium
CN114915571A (en) * 2021-02-10 2022-08-16 中国电信股份有限公司 Method, equipment and storage medium for automatically testing k8s cluster network quality
CN115269399A (en) * 2022-07-22 2022-11-01 苏州浪潮智能科技有限公司 Equipment stability testing method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200145301A1 (en) * 2015-07-28 2020-05-07 Spirent Communications, Inc. Systems and Methods for Automated Testing of MoCA Networks
CN110489201A (en) * 2018-05-15 2019-11-22 中国移动通信集团浙江有限公司 Container performance test device and method
CN109739744A (en) * 2018-12-05 2019-05-10 北京奇艺世纪科技有限公司 A kind of test macro and method
CN114915571A (en) * 2021-02-10 2022-08-16 中国电信股份有限公司 Method, equipment and storage medium for automatically testing k8s cluster network quality
CN113138929A (en) * 2021-05-12 2021-07-20 平安国际智慧城市科技股份有限公司 Distributed interface testing method and device, electronic equipment and storage medium
CN115269399A (en) * 2022-07-22 2022-11-01 苏州浪潮智能科技有限公司 Equipment stability testing method and device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756054A (en) * 2023-08-23 2023-09-15 北京集度科技有限公司 Test method, test device, electronic equipment and storage medium
CN116756054B (en) * 2023-08-23 2023-10-24 北京集度科技有限公司 Test method, test device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115484187B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN113641457B (en) Container creation method, device, apparatus, medium, and program product
CN107807815B (en) Method and device for processing tasks in distributed mode
CN108563579B (en) White box testing method, device and system and storage medium
CN112738060B (en) Method and device for processing micro-service data, micro-service processing platform and medium
CN115484187B (en) Method, equipment and storage medium for testing container network interface in container environment
CN110290166B (en) Cross-cluster data interaction method, system and device and readable storage medium
CN108880898A (en) Active and standby containment system switching method and device
CN111143039A (en) Virtual machine scheduling method and device and computer storage medium
CN108897577A (en) A kind of server backplane CPLD state self-adaption system and method
CN114501501A (en) Configuration management method, device, equipment and medium for mobile communication network target range
CN109839910A (en) Control device, control method and computer readable storage medium
CN116662039B (en) Industrial information parallel detection method, device and medium based on shared memory
CN110727611B (en) Configurable consistency verification system with state monitoring function
CN115099175B (en) Method and device for acquiring time sequence netlist, electronic equipment and storage medium
CN106776372A (en) Emulation data access method and device based on FPGA
CN115357433A (en) Database backup method, device, equipment and storage medium under container environment
CN115580497A (en) Data transmission control method and equipment in container environment and storage medium
CN113691403B (en) Topology node configuration method, related device and computer program product
CN111767999B (en) Data processing method and device and related products
CN111241099A (en) Industrial big data storage method and device
CN116306407B (en) Verification method, device, equipment and storage medium of Network On Chip (NOC)
CN109213648A (en) RACK cabinet switching on and shutting down stability test method, apparatus, terminal and storage medium
CN110413464B (en) Configuration table item testing method and system
US20230171179A1 (en) Method for testing pressure, electronic device and storage medium
CN115967638A (en) Equipment simulation system, method, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant