Gateway project testing method, device, electronic equipment and storage medium

By establishing a virtual client in the test server to simulate real traffic and user behavior, the problem of insufficient traffic in gateway project testing and difficult to simulate scenes is solved, and the testing efficiency and stability are improved.

CN115941543BActive Publication Date: 2024-11-29WUHAN GREENET INFORMATION SERVICE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211563636.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-07
Publication Date
2024-11-29
Estimated Expiration
2042-12-07

AI Technical Summary

Technical Problem

The current gateway project test is inefficient in the test, the traffic is not real enough, it cannot cover traffic above the fourth layer, it is difficult to build traffic, and it is difficult to simulate the jitter scenario of the number of users and traffic, affecting stability and reliability.

Method used

By establishing multiple virtual clients in the test server, determining the working virtual clients according to the up-and-down instructions, and accessing the resource pool through the cloud gateway server tested, generating access logs to determine the test results, realizing free planning of the number of terminals and real traffic simulation.

Benefits of technology

It improves testing efficiency, covers long and short messages and packets of different protocols, tests the full configuration of the tested server to the cloud gateway, simulates real user behavior, facilitates verification of low-priority scenarios, and discovers software vulnerabilities through access logs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115941543B_ABST
    Figure CN115941543B_ABST
Patent Text Reader

Abstract

The present application provides a gateway project testing method, device, electronic device and storage medium. After establishing multiple virtual clients, the method determines a working virtual client from the multiple virtual clients according to the online and offline instructions, and then instructs the working virtual client to access the resource pool through the cloud gateway server under test according to the resource access instruction, and generates an access log according to the resource access situation, and finally determines the test result of the cloud gateway server under test according to the access log. The method realizes the free planning of the number of terminals by establishing virtual clients, and accesses the resource pool through the cloud gateway server under test, so that each virtual client has real and effective traffic, solves the problems of difficult flow establishment and insufficient traffic, and is also convenient for simulating real user behavior, which is convenient for verifying low-priority and difficult-to-measure scenarios that are ignored in daily life, and improves test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network testing technology, and in particular to a gateway project testing method, device, electronic device and storage medium. Background Art

[0002] Most of the current gateway project tests only involve functional testing and performance testing. Since the current tests are all based on actual terminals, in the functional test, although the traffic is real, it is limited by the insufficient number of users in the test, resulting in insufficient traffic; in the performance test, the traffic is not real enough, and can only be measured up to the fourth layer, and the protocol is single, which cannot cover traffic above the fourth layer. Due to changes in IP and port, it is difficult to build flows and the traffic is not rich; in addition, it is inconvenient to create scenarios such as jitter in the number of online users, jitter in the number of terminals, and jitter in traffic in the current test, which makes it difficult to test the stability and reliability of the gateway project.

[0003] Based on the above, we can see that there are technical problems in the current gateway project testing, such as low testing efficiency, which needs to be improved. Summary of the invention

[0004] The present application provides a gateway project testing method, device, electronic device and storage medium for improving the testing efficiency of the current gateway project.

[0005] In order to solve the above technical problems, this application provides the following technical solutions:

[0006] This application provides a gateway project testing method, including:

[0007] Create multiple virtual clients;

[0008] Determine a working virtual client from the plurality of virtual clients according to the online and offline instructions;

[0009] According to the resource access instruction, instruct the working virtual client to access the resource pool through the cloud gateway tested server, and generate an access log according to the resource access situation;

[0010] A test result of the cloud gateway server under test is determined based on the access log.

[0011] Accordingly, the present application also provides a gateway project testing device, including:

[0012] A virtual creation module, used to create multiple virtual clients;

[0013] A working determination module, used for determining a working virtual client from the plurality of virtual clients according to an online and offline instruction;

[0014] A resource access module, used to instruct the working virtual client to access the resource pool through the cloud gateway tested server according to the resource access instruction, and generate an access log according to the resource access situation;

[0015] The result determination module is used to determine the test result of the cloud gateway server under test according to the access log.

[0016] At the same time, the present application provides an electronic device, which includes a processor and a memory, the memory is used to store a computer program, and the processor is used to run the computer program in the memory to execute the steps in the above-mentioned gateway project testing method.

[0017] In addition, the present application also provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the steps in the above-mentioned gateway project testing method.

[0018] Beneficial effects: The present application provides a gateway project testing method, device, electronic device and computer-readable storage medium. Specifically, after establishing multiple virtual clients, the method determines a working virtual client from the multiple virtual clients according to online and offline instructions, and then instructs the working virtual client to access the resource pool through the cloud gateway server under test according to the resource access instruction, and generates an access log according to the resource access situation, and finally determines the test result of the cloud gateway server under test according to the access log. This method realizes the free planning of the number of terminals by establishing virtual clients in the test server. At the same time, it can also test the full configuration of the cloud gateway server under test, so that each virtual client has real and effective traffic, covering long and short messages, messages of different protocols, and messages of different levels. Through concurrent uploading and downloading, the peak value of bandwidth is tested, which solves the problems of difficult flow establishment and insufficient traffic. It is also convenient to simulate real user behaviors, such as user online and offline, route oscillation, traffic oscillation, etc., and the test hang-up time can be controlled independently, which is convenient for verifying low-priority and difficult-to-test scenarios that are ignored in daily life, thereby improving the test efficiency. In addition, the access log provided by this method allows testers to check the log regularly, so as to discover more hidden software vulnerabilities from the log. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The technical solution and other beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.

[0020] Figure 1 It is a system architecture diagram of the gateway project test system provided in an embodiment of the present application.

[0021] Figure 2 It is a flow chart of the gateway project testing method provided in the embodiment of the present application.

[0022] Figure 3 This is a schematic diagram of the application scenario of the gateway project test method provided in the embodiment of the present application

[0023] Figure 4 It is a structural diagram of a gateway project testing device provided in an embodiment of the present application.

[0024] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0026] The terms "including" and "having" and any variations thereof in the specification and claims of this application are intended to cover non-exclusive inclusions; the division of modules appearing in this application is merely a logical division, and there may be other division methods when implemented in actual applications, for example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.

[0027] The present application provides a gateway project testing method, device, electronic device and computer-readable storage medium, wherein the gateway project testing device can be integrated in an electronic device, and the electronic device can be a server or other device.

[0028] See also Figure 1 , Figure 1 is a system architecture diagram of the gateway project test system provided in the embodiment of the present application, such as Figure 1 As shown, the scenario may include terminals and servers, and the terminals, servers, and terminals and servers are connected and communicated through the Internet composed of various gateways, etc., wherein the system at least includes a test server 101, a cloud gateway tested server 102, and a resource pool 103:

[0029] The test server 101 refers to a server operated by a tester for running a program, which can be an independent server, or a server network or server cluster composed of servers; for example, the server described in this application includes but is not limited to a computer, a network host, a storage server, and an application server or a cloud server composed of multiple servers, wherein the cloud server is composed of a large number of computers or network servers based on cloud computing (Cloud Computing). It should be noted that in the embodiment of the present application, the test server requires at least 4 physical network cards with 10 Gigabit ports, each of which is used to establish 500 virtual network cards (i.e., 500 virtual clients). The better the performance of the test server, the linear increase of the test target. For example, the larger the memory of the test server, the higher the read and write speed, and the richer the ports.

[0030] The cloud gateway server under test 102 refers to the test object in the gateway test project of the embodiment of the present application. In the embodiment of the present application, the cloud gateway server under test refers to the intermediary between the resource pool and the test server (local storage environment), that is, a server that connects two network segments using different transmission protocols. Through the intermediary function of the cloud gateway server under test, users can seamlessly connect local data to the cloud storage space without adjusting the application storage settings of the test server (local storage environment).

[0031] Resource pool 103 refers to a resource collection including intranet applications and extranet applications, wherein the collection consisting of intranet applications is the intranet resource pool, and its application types include: http, https, dns and ftp, etc.; the collection consisting of extranet applications is the extranet resource pool, and its application types include: http, https, ftp and video, etc.

[0032] A communication link is provided between the test server 101, the cloud gateway tested server 102 and the resource pool 103 to realize information interaction; the type of the communication link may include a wired or wireless communication link or an optical fiber cable, etc., which is not limited in this application, wherein:

[0033] The test server establishes multiple virtual network cards on its physical network card through a program. For example, the test server has at least 4 10 Gigabit physical network cards, each of which can be used to establish 500 virtual network cards (i.e., 500 virtual clients), that is, 2000 virtual clients (i.e., virtual DHCP terminals) can be established on the test server. Then, the tester issues online and offline instructions to each virtual client through a program, so that each virtual client executes the online and offline instructions to achieve dynamic online and offline. At this time, the online working virtual client can be determined from these multiple virtual clients. Then, the tester sends a resource access instruction to the working virtual client through a program, instructing the working virtual client to access the resource pool through the cloud gateway server under test, and generates an access log based on the resource access situation. Finally, based on the access log, the test result of the cloud gateway server under test (such as the working condition, stability and reliability when fully configured) can be determined.

[0034] In the above process, the entire test process is executed with one click through the program of the test server, which greatly improves the test efficiency compared with the manual test solution. Specifically, by establishing a virtual client in the test server, the number of terminals can be freely planned, and the full configuration of the cloud gateway server under test can also be tested, so that each virtual client has real and effective traffic, covering long and short messages, messages of different protocols, and messages of different levels. Through concurrent upload and download, the peak value of bandwidth is tested, which solves the problems of difficulty in building flow and insufficient traffic. It is also convenient to simulate real user behaviors, such as user online and offline, route oscillation, traffic oscillation, etc., and the test hang-up time can be controlled autonomously, which is convenient for verifying low-priority and difficult-to-test scenarios that are ignored in daily life. In addition, the access log provided by this method allows testers to check the log regularly, so as to find more hidden software vulnerabilities from the log.

[0035] It should be noted that Figure 1 The scenario diagram shown is only an example. The terminal, device, and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art will know that with the evolution of the system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems. The following are described in detail. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0036] In the embodiments of this application, please refer to Figure 2 As shown, Figure 2 : is a flow chart of a gateway project testing method provided in an embodiment of the present application, and the gateway project testing method is applied to a testing server. The method comprises at least the following steps:

[0037] S201: Establish multiple virtual clients.

[0038] In one embodiment, step S201 includes: determining an actual physical network card; and establishing multiple virtual clients based on the actual physical network card. The actual physical network card refers to a real physical network card in the test server, which is also called a physical address (MAC address), hardware address or link address, which is written inside the hardware when produced by the network equipment manufacturer and is used to provide a connection between the PC server and the switch; the virtual client refers to a virtual machine established on the actual physical network card, that is, a DHCP terminal, which can work like an independent physical server, but it shares the processing power of the test server.

[0039] Specifically, Figure 3 As shown, Figure 3 A schematic diagram of a scenario for the application of the gateway project test method provided in an embodiment of the present application. Taking a test server with four 10 Gigabit physical network cards as an example, 500 virtual clients are established on the four 10 Gigabit physical network cards, that is, for the actual physical network card numbered 2, there are virtual clients numbered VM1 to VM500 running on it, for the actual physical network card numbered 3, there are virtual clients numbered VM501 to VM1000 running on it, for the actual physical network card numbered 4, there are virtual clients numbered VM1001 to VM1500 running on it, and for the actual physical network card numbered 5, there are virtual clients numbered VM1501 to VM2000 running on it, so that multiple virtual clients are established on the actual physical network card of the test server, and these multiple virtual clients work on the same test server, but can support multiple applications and operating systems.

[0040] Optionally, the step of establishing multiple virtual clients on the actual physical network card may be: according to the virtual client creation instruction, for each actual physical network card, one or more virtual clients are generated, and corresponding physical addresses (i.e., MAC addresses) are assigned to the one or more virtual clients according to a preset allocation strategy. The process of assigning corresponding physical addresses (i.e., MAC addresses) to the one or more virtual clients according to the preset allocation strategy is: randomly assigning corresponding physical addresses to one or more virtual clients or automatically calling a command tool to assign corresponding physical addresses to one or more virtual clients respectively.

[0041] It should be noted that the actual physical network card of the test server is at the 10 Gigabit level, which can solve the bottleneck problem of the server network card in the Intranet mode, and the better the performance of the test server, the linear increase of the test target, for example, the larger the memory of the test server, the higher the read and write speed, and the richer the ports. In the embodiment of the present application, by establishing a virtual client, the free planning of the number of terminals is realized. In the functional test, under the premise of ensuring the authenticity of the traffic, the number of users is enriched, that is, the traffic is enriched.

[0042] In one embodiment, multiple virtual clients belong to the same virtual client device. The virtual client device (vCPE), also known as cloud CPE, is a technology that transfers some functions of the traditional CPE to the central office device, that is, the CPE device at the user end no longer provides functions such as address allocation and address translation (NAT), and the CPE only performs the second layer function. Each virtual client directly requests an address from the central office device (BRAS / DHCP server / Radius Server), and the central office device completes the conversion between the private network address and the public network address of each virtual client.

[0043] Optionally, these multiple virtual clients belong to the same vCPE, and one account can correspond to one virtual client, or one account can correspond to multiple virtual clients. The specific situation can be flexibly switched by the switch configuration. It should be noted that one account is not equal to one network address (ie, IP).

[0044] It should be noted that virtual customer premise equipment (vCPE) separates the functions of traditional hardware and allows remote service providers or management platforms to host all software-based functions. vCPE runs on commercial hardware and virtual network functions (VNFs) rather than proprietary ASICs that perform specific network functions. vCPE can easily solve networking problems in complex environments.

[0045] S202: Determine a working virtual client from a plurality of virtual clients according to the online and offline instructions.

[0046] The online and offline instructions are issued by the tester through the test server running the corresponding program. The test server executes the online and offline instructions to determine which virtual clients are online working virtual clients and which virtual clients are offline dormant virtual clients from multiple virtual clients.

[0047] In the embodiment of the present application, the program can simulate the real user's online and offline, as well as the action of continuing to surf the Internet after going back online. Specifically, the program sends online and offline instructions so that these multiple virtual clients go online and offline according to the instructions, or continue to surf the Internet after going back online according to the instructions. By simulating real user behavior in this way, the technical problem of the inconvenience of creating scenarios such as jitter in the number of online users, jitter in the number of terminals, and jitter in traffic in the current test is solved, and the test hang-up time can also be controlled autonomously according to the program, thereby verifying the low-priority and difficult-to-measure scenarios that are usually ignored.

[0048] S203: According to the resource access instruction, instruct the working virtual client to access the resource pool through the cloud gateway tested server, and generate an access log according to the resource access situation.

[0049] In one embodiment, step S203 includes: according to the address acquisition instruction, instructing the working virtual client to send an address allocation request to the cloud gateway server under test; receiving the network address returned by the cloud gateway server under test based on the address allocation request; according to the resource access instruction, instructing the working virtual client to access the resource pool based on the network address, the resource pool includes an intranet resource pool and an extranet resource pool; determining the resource access situation, and generating an access log according to the resource access situation. Among them, the address acquisition instruction can be a DHCP Renew instruction issued by the tester through the program, which is intended to re-acquire the network address when the virtual client goes online; the intranet resource pool is a collection of intranet applications, and its application types include: http, https, dns and ftp, etc.; the extranet resource pool is a collection of extranet applications, and its application types include: http, https, ftp and video, etc.

[0050] Specifically, the tester issues an address acquisition instruction through the program to instruct the online working virtual client to send an address allocation request to the cloud gateway server under test. The cloud gateway server under test responds to the address allocation request and sends a network address to the working virtual client requesting the address. Subsequently, the tester issues a resource access instruction through the program to instruct the working virtual client to access the resource pool. The working virtual client executes the resource access instruction, such as Figure 3 As shown, each working virtual client enters QinQ through the switch, and then accesses the resource pool based on the obtained network address. The resource pool includes an intranet resource pool and an extranet resource pool. Finally, the resource access situation is determined according to the process of accessing the resource pool, and an access log is generated based on the resource access situation.

[0051] It should be noted that the basic principle of QinQ on the switch is to encapsulate a VLAN Tag of the service provider network before the user message enters the service provider network, and treat the original VLAN Tag in the user message as data, so that the message passes through the service provider network with two layers of VLAN Tags. In the service provider network, the message is only transmitted according to the outer VLANTag. When the user message leaves the service provider network, the outer VLAN Tag is stripped and transmitted in the user network according to the private network VLAN Tag, thereby solving the problem of insufficient VLAN number.

[0052] Optionally, the process of the virtual client sending an address allocation request to the cloud gateway server under test and receiving the network address returned by the cloud gateway server under test based on the address allocation request may be as follows: the virtual client sends a DHCP Discover packet to the cloud gateway server under test in the form of a broadcast. After receiving the packet, the cloud gateway server under test responds to the virtual client based on the physical address (i.e., MAC address) sent by the virtual client. The cloud gateway server under test selects an unused network address (i.e., IP address) at that time and sends a DHCP offer packet to the virtual client. The DHCP offer packet may include the leased network address (i.e., IP address) and relevant information of the lease. The virtual client selects one of the DHCP Offer packets (usually the earliest to arrive) and sends a DHCP Request packet back to the cloud gateway server under test to tell the cloud gateway server under test which network address (i.e., IP address) has been selected. Then, an arp packet is sent to query whether the network address (i.e., IP address) in the local area network is in use. If it is found that other clients are already using the network address (i.e., IP address), a DHCP Decline packet is sent back to the DHCP server to tell the cloud gateway server under test to refuse to accept the DHCP Offer packet. After confirmation by both the virtual client and the cloud gateway server under test, the cloud gateway server under test sends a DHCP The ACK packet is sent to the virtual client, telling the virtual client that the network address (i.e., IP address) can be used, and the network address (i.e., IP address) is bound to the network card of the virtual client.

[0053] It should be noted that the network card of the virtual client is the virtual network card assigned by the test server based on its actual physical network card; each time the virtual client goes online, the network address (ie, IP address) will be reallocated by the cloud gateway server under test.

[0054] In one embodiment, according to the resource access instruction, the working virtual client is instructed to access the resource pool based on the network address, and the resource pool includes the steps of an intranet resource pool and an extranet resource pool, including: obtaining the preset access time periods of the intranet resource pool and the extranet resource pool; generating the resource access instruction according to the preset access time periods of the intranet resource pool and the extranet resource pool; according to the resource access instruction, instructing the working virtual client to access the intranet resource pool and the extranet resource pool respectively based on the network address according to the preset access time periods of the intranet resource pool and the extranet resource pool. Among them, the preset access time periods of the intranet resource pool and the extranet resource pool can be set by the tester according to actual needs. For example, the preset access time period of the intranet resource pool is from 8:00 am to 9:00 pm, and the preset access time period of the extranet resource pool can be from 9:00 pm to 8:00 am. It should be noted that the preset access time period of each resource pool can be set according to actual needs, and no specific restrictions are made here.

[0055] Specifically, time-divided access to the intranet and extranet resource pools can also be set to achieve staggered access to the intranet and extranet to avoid traffic congestion. First, the preset access time periods of each resource pool set in advance by the tester are obtained, and then based on the preset access time periods of the intranet and extranet resource pools, resource access instructions are generated, that is, corresponding instructions are generated according to the preset access time periods of each resource pool, such as accessing the intranet resource pool from 8:00 am to 9:00 pm, and accessing the extranet resource pool from 9:00 pm to 8:00 am, to instruct each working virtual client to access the corresponding resource pool according to the requirements of the instructions. Each working virtual client accesses each application of the intranet resource pool according to the preset access time period of the intranet resource pool and each application of the extranet resource pool according to the preset access time period of the extranet resource pool based on the resource access instructions generated by the aforementioned process and the network address obtained by the aforementioned process.

[0056] In the work scenario, time-divided access is set for internal and external network resources to avoid traffic congestion and traffic jams caused by a large number of external network accesses during work hours. In order to improve the user's Internet experience, the embodiment of the present application designs time-divided access to the internal and external network resource pool according to the user's actual application scenario, ensuring smooth access to the resource pool during the required period by the user, thereby improving the user experience.

[0057] In one embodiment, the step of determining resource access conditions and generating access logs according to the resource access conditions includes: determining resource access conditions, the resource access conditions including resource access time, target access resources, and access results; generating access logs according to the network address, resource access time, target access resources, and access results. The access results include whether the access is successful or the file is successfully downloaded.

[0058] Specifically, since the entire process of the test solution proposed in the embodiment of the present application is automatically executed with one click, it is necessary to generate a corresponding access log according to the resource access situation of each working virtual client, so as to facilitate the subsequent determination of the test results of the cloud gateway server under test based on the access log. According to the resource access process of each working virtual client, the resource access situation is determined, which specifically includes the resource access time, the target access resource and the access result, that is, what application is accessed at what time by a certain network address (i.e., IP address) / a certain physical address (i.e., MAC address), and what the access result is. For example, the access result needs to record whether the web page access needs to be 200 ok or other, the ftp download needs to record whether the download is successful or not, how big the downloaded file is, the downloaded file name, and whether the local file is cleared after the download is completed; based on the foregoing content, an access log can be generated.

[0059] S204: Determine the test result of the cloud gateway server under test according to the access log.

[0060] According to the access logs of each working virtual client, the test results of the cloud gateway server under test can be determined. For example, when all virtual clients go online based on the online and offline instructions, the situation when the cloud gateway server under test is fully configured can be determined based on the access log. At this time, each working virtual client has real traffic, which covers long and short messages, messages of different protocols, and messages of different levels. If the access log shows that all working virtual clients have accessed successfully, it means that the reliability of the cloud gateway server under test is very good when it is fully configured. If a small number of working virtual clients fail to access, it means that the reliability of the cloud gateway server under test is good when it is fully configured. If most of the working virtual clients fail to access, it means that the reliability of the cloud gateway server under test is poor when it is fully configured. In addition, the reliability and stability of the cloud gateway server under test can also be determined based on the access logs of each working virtual client in scenarios such as simulated user online and offline behaviors, route oscillations, and traffic oscillations.

[0061] For another example, the bandwidth peak of the cloud gateway server under test can be determined through the access logs corresponding to the concurrent upload and download of each working virtual client. In addition, the test hang-up time can be controlled autonomously through the program to verify the low-priority and difficult-to-test scenarios that are usually ignored.

[0062] Optionally, the access log can be automatically analyzed by the test server to determine the test results of the cloud gateway server under test, and the test results can be output on the tester's display screen. The tester can also regularly review and analyze the data to discover more hidden software vulnerabilities from these access logs.

[0063] In one embodiment, the method may also include: configuring an EVPN component based on the SRv6 protocol; establishing an SRv6 tunnel with multiple cloud gateway servers under test based on the EVPN component based on the SRv6 protocol. The EVPN component based on the SRv6 protocol refers to a component that supports the SRv6 protocol in the EVPN scenario. SRv6 (Segment Routing IPv6, segment routing based on IPv6 forwarding plane) is a protocol designed based on the source routing concept to forward IPv6 data packets on the network. In simple terms, it is SR (Segment Routing) + IPv6, which is a new generation of IP bearer protocol; and EVPN (Ethernet Virtual Private Network) is a next-generation VPN solution for full-service bearer. EVPN unifies the control planes of various VPN services, uses the BGP extension protocol to transmit layer 2 or layer 3 reachability information, and realizes the separation of the forwarding plane and the control plane.

[0064] Specifically, an EVPN component based on the SRv6 protocol is configured on the test server, so as to establish SRv6 tunnels from the test server to multiple cloud gateway servers under test based on the EVPN component of the SRv6 protocol. In this way, under the condition of certain performance of the test server, the messages sent by the inner working virtual client can be encapsulated into different SRv6 tunnels and pushed to multiple cloud gateway servers under test through these multiple SRv6 tunnels, so that one working virtual client can access the resource pool through multiple cloud gateway servers under test, and the traffic coming back from the network side reaches these multiple cloud gateway servers under test respectively, and then is returned to each working virtual client by these multiple cloud gateway servers under test, thereby realizing the test of multiple cloud gateway servers under test by one test server, which greatly improves the test efficiency.

[0065] It can be seen from the above embodiments that the gateway project testing method of the present application realizes the free planning of the number of terminals by establishing a virtual client in the test server. At the same time, it can also test the full configuration of the cloud gateway server under test, so that each virtual client has real and effective traffic, covering long and short messages, messages of different protocols, and messages of different levels. The peak value of the bandwidth is tested through concurrent upload and download, which solves the problems of difficulty in building flows and insufficient traffic. It is also convenient to simulate real user behaviors, such as user online and offline, route oscillation, traffic oscillation, etc., and the test hang-up time can be controlled independently, which is convenient for verifying the low-priority and difficult-to-measure scenarios that are ignored in daily life, thereby improving the test efficiency. In addition, the access log provided by this method enables testers to check the log regularly, so as to discover more hidden software vulnerabilities from the log.

[0066] Based on the content of the above embodiment, the embodiment of the present application provides a gateway project testing device, which is applied to test the server. Figure 4 , the device comprises:

[0067] A virtual establishment module 401 is used to establish multiple virtual clients;

[0068] A working determination module 402, configured to determine a working virtual client from the plurality of virtual clients according to an online and offline instruction;

[0069] The resource access module 403 is used to instruct the working virtual client to access the resource pool through the cloud gateway tested server according to the resource access instruction, and generate an access log according to the resource access situation;

[0070] The result determination module 404 is used to determine the test result of the cloud gateway server under test according to the access log.

[0071] In one embodiment, the virtual creation module 401 includes:

[0072] A first determination module, used to determine an actual physical network card;

[0073] The first establishing module is used to establish multiple virtual clients based on the actual physical network card.

[0074] In one embodiment, the multiple virtual clients belong to the same virtual client device.

[0075] In one embodiment, the resource access module 403 includes:

[0076] A request sending module, used to instruct the working virtual client to send an address allocation request to the cloud gateway tested server according to the address acquisition instruction;

[0077] An address receiving module, used to receive the network address returned by the cloud gateway tested server based on the address allocation request;

[0078] An access instruction module, used for instructing the working virtual client to access a resource pool based on the network address according to a resource access instruction, wherein the resource pool includes an intranet resource pool and an extranet resource pool;

[0079] The log generation module is used to determine the resource access situation and generate an access log according to the resource access situation.

[0080] In one embodiment, the access indication module includes:

[0081] A time period acquisition module, used to acquire the preset access time periods of the intranet resource pool and the extranet resource pool;

[0082] An instruction generation module, used to generate a resource access instruction according to the preset access time periods of the intranet resource pool and the extranet resource pool;

[0083] The scheduled access module is used to instruct the working virtual client to access the intranet resource pool and the extranet resource pool respectively based on the network address and according to the preset access time periods of the intranet resource pool and the extranet resource pool according to the resource access instruction.

[0084] In one embodiment, the log generation module includes:

[0085] A situation determination module, used to determine resource access situation, wherein the resource access situation includes resource access time, target access resource and access result;

[0086] The log generation submodule is used to generate an access log according to the network address, the resource access time, the target access resource and the access result.

[0087] In one embodiment, the gateway project testing device further includes:

[0088] Component configuration module, used to configure EVPN components based on SRv6 protocol;

[0089] A tunnel establishment module is used to establish an SRv6 tunnel with multiple cloud gateway tested servers based on the EVPN component of the SRv6 protocol.

[0090] Different from the current technology, the gateway project testing device provided by the present application is provided with a virtual establishment module and a resource access module. Through the virtual establishment module, a virtual client is established in the test server, which realizes the free planning of the number of terminals. At the same time, it can also test the full configuration of the cloud gateway tested server, and it is also convenient to simulate real user behaviors, such as user online and offline, route oscillation, traffic oscillation, etc., and the test hang-up time can be independently controlled, which is convenient for verifying the low-priority and difficult-to-test scenarios that are ignored in daily life. Through the resource access module, each virtual client has real and effective traffic, covering long and short messages, messages of different protocols, and messages of different levels. Through concurrent upload and download, the peak bandwidth is tested, which solves the problems of difficult flow establishment and insufficient traffic and improves the test efficiency. In addition, the access log provided by the result determination module allows testers to check the log regularly, so as to discover more hidden software vulnerabilities from the log.

[0091] Accordingly, the present application also provides an electronic device, such as Figure 5As shown, the electronic device may include a processor 501 having one or more processing cores, a wireless (WiFi, Wireless Fidelity) module 502, a memory 503 having one or more computer-readable storage media, an audio circuit 504, a display unit 505, an input unit 506, a sensor 507, a power supply 508, and a radio frequency (RF, Radio Frequency) circuit 509 and other components. Those skilled in the art will understand that Figure 5 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0092] The processor 501 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 503 and calling data stored in the memory 503, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. In one embodiment, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.

[0093] WiFi is a short-range wireless transmission technology. Electronic devices can help users send and receive emails, browse web pages, and access streaming media through wireless modules 502. It provides users with wireless broadband Internet access. Figure 5 A wireless module 502 is shown, but it is understandable that it is not an essential component of the terminal and can be omitted as required without changing the essence of the invention.

[0094] The memory 503 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the computer programs and modules stored in the memory 503. The memory 503 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal (such as audio data, a phone book, etc.), etc. In addition, the memory 503 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 503 may also include a memory controller to provide the processor 501 and the input unit 506 with access to the memory 503.

[0095] The audio circuit 504 includes a speaker, which can provide an audio interface between a user and the electronic device. The audio circuit 504 can transmit the electrical signal converted from the received audio data to the speaker, which converts the electrical signal into a sound signal for output.

[0096] The display unit 505 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 505 may include a display panel. In one embodiment, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Furthermore, the touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 501 to determine the type of touch event. Subsequently, the processor 501 provides corresponding visual output on the display panel according to the type of touch event. Although in Figure 5 In the embodiment, the touch-sensitive surface and the display panel are implemented as two independent components to realize input and output functions, but in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize input and output functions.

[0097] The input unit 506 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input unit 506 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display screen or a touch pad, can collect the user's touch operations on or near it (such as the user's operation on or near the touch-sensitive surface using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a pre-set program. In one embodiment, the touch-sensitive surface may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 501, and can receive and execute the command sent by the processor 501. In addition, the touch-sensitive surface can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch-sensitive surface, the input unit 506 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0098] The electronic device may also include at least one sensor 507, such as a light sensor. Specifically, the light sensor may include an ambient light sensor and a distance sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light. As for other sensors that may be configured in the electronic device, such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., they will not be described in detail here.

[0099] The electronic device also includes a power supply 508 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 501 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 508 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0100] The radio frequency circuit 509 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 501 for processing; in addition, the data related to the uplink is sent to the base station. Usually, the radio frequency circuit 509 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM) card, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the radio frequency circuit 509 can also communicate with the network and other devices through wireless communication. Wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0101] Although not shown, the electronic device may also include a camera, a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the processor 501 in the electronic device will load the executable file corresponding to the process of one or more application programs into the memory 503 according to the following instructions, and the processor 501 will run the application program stored in the memory 503, thereby realizing the following functions:

[0102] Create multiple virtual clients;

[0103] Determine a working virtual client from the plurality of virtual clients according to the online and offline instructions;

[0104] According to the resource access instruction, instruct the working virtual client to access the resource pool through the cloud gateway tested server, and generate an access log according to the resource access situation;

[0105] A test result of the cloud gateway server under test is determined based on the access log.

[0106] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0107] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple instructions are stored, and the instructions can be loaded by a processor to implement the functions of the above-mentioned gateway project testing method.

[0108] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0109] The gateway project testing method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A gateway project testing method, It is characterized in that include: Create multiple virtual clients; Determine a working virtual client from the plurality of virtual clients according to the online and offline instructions; According to the resource access instruction, the working virtual client is instructed to access the resource pool through the cloud gateway tested server, and an access log is generated according to the resource access situation, including: According to the address acquisition instruction, instruct the working virtual client to send an address allocation request to the cloud gateway server under test; Receiving a network address returned by the cloud gateway server under test based on the address allocation request; According to the resource access instruction, instruct the working virtual client to access the resource pool based on the network address, wherein the resource pool includes an intranet resource pool and an extranet resource pool; Determine resource access conditions and generate access logs based on the resource access conditions; A test result of the cloud gateway server under test is determined based on the access log.

2. The gateway project testing method according to claim 1, It is characterized in that The step of establishing multiple virtual clients includes: Determine the actual physical network card; Based on the actual physical network card, multiple virtual clients are established.

3. The gateway project testing method according to claim 1, It is characterized in that The multiple virtual clients belong to the same virtual client device.

4. The gateway project testing method according to claim 1, It is characterized in that The step of instructing the working virtual client to access a resource pool based on the network address according to the resource access instruction, wherein the resource pool includes an intranet resource pool and an extranet resource pool, comprises: Obtaining preset access time periods of the intranet resource pool and the extranet resource pool; Generate a resource access instruction according to the preset access time periods of the intranet resource pool and the extranet resource pool; According to the resource access instruction, the working virtual client is instructed to access the intranet resource pool and the extranet resource pool respectively based on the network address and according to the preset access time periods of the intranet resource pool and the extranet resource pool.

5. The gateway project testing method according to claim 1, It is characterized in that The step of determining resource access conditions and generating access logs according to the resource access conditions includes: Determine resource access conditions, including resource access time, target access resources, and access results; An access log is generated according to the network address, the resource access time, the target access resource and the access result.

6. The gateway project testing method according to claim 1, It is characterized in that Also includes: Configure EVPN components based on the SRv6 protocol; Based on the EVPN component of the SRv6 protocol, an SRv6 tunnel is established with the plurality of cloud gateway tested servers.

7. A gateway project test device, It is characterized in that include: A virtual creation module, used to create multiple virtual clients; A working determination module, used for determining a working virtual client from the plurality of virtual clients according to an online and offline instruction; The resource access module is used to instruct the working virtual client to access the resource pool through the cloud gateway tested server according to the resource access instruction, and generate an access log according to the resource access situation, including: According to the address acquisition instruction, instruct the working virtual client to send an address allocation request to the cloud gateway server under test; Receiving a network address returned by the cloud gateway server under test based on the address allocation request; According to the resource access instruction, instruct the working virtual client to access the resource pool based on the network address, wherein the resource pool includes an intranet resource pool and an extranet resource pool; Determine resource access conditions and generate access logs based on the resource access conditions; The result determination module is used to determine the test result of the cloud gateway server under test according to the access log.

8. An electronic device, It is characterized in that It comprises a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to run the computer program in the memory to execute the steps in the gateway project testing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the gateway project testing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system for testing network pressure by using virtual machine, and storage medium

    CN112187574A