Gateway test method and device, computer equipment, storage medium and computer program product
Functional verification of gateway devices through automated testing systems and web tools is solved, and the problem of inefficiency of traditional gateway testing is achieved, and efficient and accurate gateway testing is achieved.
Patent Information
- Application Number
- CN202411549527.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-25
AI Technical Summary
Traditional gateway testing methods are inefficient and cannot effectively handle large-scale equipment to be tested, resulting in long test time, high cost and poor feedback timeliness.
Through the automated test system, the current network access module and web page tools are used to automatically verify the registration function, login function and configuration function of the test gateway based on preset configuration information to realize an intelligent automatic testing process.
It improves the efficiency and accuracy of gateway testing, can improve testing efficiency on the basis of ensuring test accuracy, and is suitable for batch testing of large-scale gateway equipment.
Smart Images

Figure CN119520343A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network and security technology, and in particular to a gateway testing method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the continuous development of communication technology, users can access the Internet in many ways. For example, home users can access the network through home gateways. The home gateway is an important part of the home broadband network and can provide home users with a variety of network access services. Since the installation process of the home gateway is relatively cumbersome, there may be a risk of not meeting the PON existing network when moving the gateway from the warehouse to the home user. In order to ensure the user experience, it is very necessary to test the use of the home gateway.
[0003] In traditional technology, gateways are usually tested by professionals, which takes a long time and has a long process. As the use of gateways becomes more popular, the number of gateways that need to be tested is also increasing, resulting in low testing efficiency. Summary of the invention
[0004] The embodiments of the present application provide a gateway testing method, apparatus, computer device, storage medium and computer program product, which can improve the testing efficiency while ensuring the testing accuracy when facing a large number of devices to be tested.
[0005] A gateway testing method, the method comprising:
[0006] Acquire a gateway to be tested that is connected to the test system, wherein the gateway to be tested is connected to the existing network through the existing network access module of the test system;
[0007] Based on the preset configuration information and the webpage tool, the target function of the gateway to be tested is verified to obtain a test verification result, wherein the target function includes one or more of a registration function, a login function and a configuration function.
[0008] In one embodiment, the target function of the gateway to be tested is verified based on the preset configuration information and the webpage tool to obtain the test verification result, including:
[0009] Acquire registration information included in the preset configuration information, where the registration information includes a first account and a first password information;
[0010] The registration function of the gateway to be tested is tested through a webpage tool, the first account and the first password information to obtain a test result of the registration function, and based on the test result of the registration function, a test verification result of the gateway to be tested is determined.
[0011] In one embodiment, the test of the registration function of the gateway to be tested by using a webpage tool, the first account and the first password information to obtain the test result of the registration function includes:
[0012] The first account and the first password information are input on the existing network registration page through a webpage tool to obtain the test result of the registration function of the gateway to be tested.
[0013] In one embodiment, the step of determining the test verification result of the gateway to be tested based on the test result of the registration function includes:
[0014] If the test result of the registration function is a successful registration result, obtaining the second account and second password information of the gateway management system based on the preset configuration information;
[0015] Using the web tool, input the second account and the second password information on the management system page to obtain the test result of the login function of the gateway to be tested;
[0016] If the test result of the login function is a successful login result, the service configuration data of the gateway to be tested is tested to obtain a test result of the service configuration;
[0017] Based on the test result of the service configuration, a test verification result of the gateway to be tested is obtained.
[0018] In one embodiment, the step of inputting the first account and the first password information on the existing network registration page through a webpage tool to obtain the test result of the registration function of the gateway to be tested includes:
[0019] Using a webpage tool, inputting the first account and the first password information on the existing network registration page, so that the existing network registration page responds to the first account and the first password information, and obtaining a response page;
[0020] The response page is identified by a preset page identification algorithm to obtain identification data, and based on the information indicated by the identification data, a test result of the registration function of the gateway to be tested is obtained.
[0021] In one embodiment, the method further comprises:
[0022] The page after the existing network registration page responds is downloaded to obtain a response page, and / or the page after the existing network registration page responds is intercepted by a preset interception algorithm to obtain a response page.
[0023] A gateway testing device, comprising:
[0024] A first acquisition module is used to acquire a gateway to be tested that is connected to the test system, and the gateway to be tested is connected to the existing network through the existing network access module of the test system;
[0025] The verification module is used to verify the target function of the gateway to be tested based on preset configuration information and web page tools to obtain a test verification result, wherein the target function includes one or more of a registration function, a login function and a configuration function.
[0026] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps described in the above embodiment when executing the computer program.
[0027] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps described in the above embodiment are performed.
[0028] A computer program product includes a computer program. When the computer program is executed by a processor, the gateway testing method provided by an embodiment of the present application is implemented. The method may be:
[0029] Acquire a gateway to be tested that is connected to the test system, wherein the gateway to be tested is connected to the existing network through the existing network access module of the test system;
[0030] Based on the preset configuration information and the webpage tool, the target function of the gateway to be tested is verified to obtain a test verification result, wherein the target function includes one or more of a registration function, a login function and a configuration function.
[0031] The above-mentioned gateway testing method, device, computer equipment, storage medium and computer program product, wherein the method includes: obtaining a gateway to be tested that is connected to the test system, and the gateway to be tested is connected to the existing network through the existing network access module of the test system; based on the preset configuration information and the webpage tool, the target function of the gateway to be tested is verified to obtain the test verification result, and the target function includes one or more of the registration function, the login function and the configuration function. By adopting this method, multiple gateways to be tested can be connected to the existing network together based on the existing network access module in the test system, providing a prerequisite for the test system to test the gateway to be tested, and also making the test environment constructed by the test system more in line with the user's actual usage scenario, ensuring the authenticity of the performance of the gateway tested in the test scenario, and automatically testing the functions of each gateway to be tested through the webpage tool and the preset configuration information, realizing an intelligent automatic testing process, improving the test efficiency and enhancing the accuracy and reliability of the gateway test results. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] FIG1 is an application environment diagram of a gateway testing method in one embodiment;
[0033] FIG2 is a schematic diagram of a flow chart of a gateway testing method in one embodiment;
[0034] FIG3 is a schematic flow chart of steps for obtaining test verification results in one embodiment;
[0035] FIG4 is a schematic diagram of a flow chart of steps for obtaining a test verification result in one embodiment;
[0036] FIG5 is a schematic flow chart of steps for obtaining a test response page in one embodiment;
[0037] FIG6 is a communication architecture diagram of a gateway testing method in one embodiment;
[0038] FIG7 is a schematic diagram of a flow chart of a gateway testing method in another embodiment;
[0039] FIG8 is a structural block diagram of a gateway testing device in one embodiment;
[0040] FIG. 9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] Fig. 1 is a schematic diagram of an application scenario of a gateway testing method provided by an embodiment of the present application. As shown in Fig. 1, in the scenario, there is a gateway to be tested 100, an automated testing system 200, and a PON live network 300, wherein the gateway to be tested may be a home gateway to be tested, data may be transmitted between the gateway to be tested and the automated testing system through the network, and the gateway to be tested may access the PON live network 300 through the live network access module in the automated testing system, and perform data transmission with the PON live network 300.
[0043] Among them, the gateway to be tested 100 can be a home gateway, which is an important part of the home broadband network. It is located at the entrance and exit of the home network and provides users with multiple services such as voice, data, IPTV, WiFi, etc. There are many models and software and hardware versions of home gateways. The automated test system 200 in this embodiment includes a test configuration module, a test execution module, a test analysis module, and an existing network access module. The gateway to be tested 100 can access the PON existing network 300 through the existing network access module, and perform automated testing through the test configuration module, test execution module, and test analysis module in the automated test system 200 to obtain the test results of the gateway.
[0044] The existing PON network is based on the existing network environment of the Passive Optical Network (PON). After the home gateway is installed in the user's home, it needs to be registered and used in such a network environment.
[0045] The gateway 100 to be tested may include a local management system, which is used to manage and configure the gateway device. The functions and status of the gateway device can be reflected through the web, for example, whether the gateway is successfully registered, the registration progress of the gateway, whether the gateway is successfully logged in, and various business configuration status and business configuration information issued by the terminal management system, etc.
[0046] The home gateway is located at the entrance and exit of the home network and can provide a variety of services for home users. However, there are many models of home gateways, and there are also many versions of home gateway software and hardware devices. The operator's centralized procurement cycle is long and the logistics distribution is complicated. Therefore, there may be a risk that the home gateway will not meet the actual use requirements of the PON existing network from the warehouse to the place of use, resulting in the need for secondary on-site maintenance by operation and maintenance personnel, which makes the user experience of the home gateway poor. In order to ensure the quality of the gateway equipment and improve the user experience, the gateway needs to be tested before installation to verify its ability to connect with the existing network.
[0047] The testing methods in traditional technologies generally require professional testers to conduct the tests, which takes a lot of time and has high testing costs. The timeliness of the test result feedback is also relatively poor. In addition, with the large-scale construction and development of optical networks, a large number of home gateways stored in warehouses need to be tested before installation. Due to the low efficiency of manual detection, it is difficult to achieve effective large-scale testing of home gateways. Therefore, there may be hidden dangers in the use of equipment during deployment and installation. Therefore, how to achieve unified automated testing of massive gateway devices, or to improve the testing efficiency of gateway devices, is a technical problem that needs to be solved urgently.
[0048] It should be noted that the beneficial effects brought about by the embodiments of the present application or the technical problems solved are not limited to this one, but may also include other implicit or related problems. For details, please refer to the description of the following embodiments.
[0049] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0050] In an exemplary embodiment, as shown in FIG2 , a gateway testing method is provided, and the method is described by taking the application of the method to the automated testing system 200 (ie, the testing system) in FIG1 as an example, wherein:
[0051] Step 202: Acquire a gateway to be tested that is connected to the test system.
[0052] Among them, the gateway to be tested is connected to the existing network through the existing network access module of the test system, and the existing network can be a PON existing network; the gateway to be tested can be connected to the test system, specifically, it can be connected to the test execution module in the test system, and can be connected to the PON existing network through the optical splitter in the test system; in the test system, the existing network access module can be an optical splitter, and the optical splitter can include multiple channels, and each gateway to be tested can be connected to the PON existing network through each channel of the optical splitter. In other words, the optical splitter in the test system can divide the signal output by the PON existing network into multiple output signals, and transmit each output signal to multiple gateways to be tested respectively, and each gateway to be tested can be connected to the existing network, so that the test system can test the functions of each gateway when each gateway to be tested is connected to the PON existing network.
[0053] Specifically, the user side interface of the gateway to be tested can be connected to the test execution module of the test system, and the test system can determine each gateway to be tested to be connected, and test each gateway to be tested respectively. The user side interface of the gateway can be a LAN port.
[0054] Step 204: Based on the preset configuration information and the webpage tool, the target function of the gateway to be tested is verified to obtain a test verification result.
[0055] Among them, the target function includes one or more of a registration function, a login function and a configuration function. The preset configuration information may include configuration information of the gateway to be tested that is normally used in the existing network, for example, it may include registration information for the gateway to access the existing network. The registration information may include account information and password information. The registration information may be used to register the gateway to the OLT (Optical Line Terminal) in the existing network and to register with the terminal management platform of the operator; the configuration information also includes account information for the gateway to log in to the local management system and the corresponding password information, that is, the configuration information includes account information for the gateway to be tested to log in to the local management system in the gateway and the password information of the account. The preset configuration information may also include service information configured for the account used by each gateway to be tested, for example, the service may include Internet access service, voice service and TV service, etc. The webpage tool may be a crawler tool based on WEB. The registration function represents the function of the gateway to be tested to register with the existing network; the gateway to be tested includes a local management system, and the login function represents the function of the gateway to be tested to log in to the local management system of the gateway to be tested; testing the configuration function may represent the configuration inspection of the existing network service configured for the gateway in the local management system. The configuration function may be tested specifically based on the service configuration information sent from the operator's terminal management platform to the home gateway.
[0056] Specifically, the test system may include at least a test configuration module, a test execution module, a test analysis module, and an existing network access module. The test system may obtain configuration information related to the test gateway through the test configuration module, and the configuration information may include the registration information required for the gateway to register with the existing network and the account information and password information required for the gateway to log in to the local management system inside the gateway, and may also include the configuration information of various services of the gateway to be tested. The test system may test and verify the registration function, login function and various existing network service configurations of the gateway to be tested through a WEB-based crawler tool.
[0057] Optionally, the test system can use a WEB-based crawler tool to simulate the user's manual registration to test the registration function of the gateway, for example, it can access the gateway's registration page and enter the gateway's registration information on the registration page, or it can also include accessing the gateway's login page to log in to the gateway's local management system, and testing the service configuration information sent to the gateway by the operator's terminal management platform in the local management system to obtain test results of various functions of the gateway.
[0058] In the above-mentioned gateway testing method, a gateway to be tested that is connected to the test system is obtained, and the gateway to be tested is connected to the existing network through the existing network access module of the test system; based on the preset configuration information and web page tools, the target function of the gateway to be tested is verified to obtain a test verification result, and the target function includes one or more of a registration function, a login function, and a configuration function. By adopting this method, multiple gateways to be tested can be connected to the existing network together based on the existing network access module in the test system, providing a prerequisite for the test system to test the gateway to be tested, and can also make the test environment constructed by the test system more in line with the user's actual usage scenario, ensuring the authenticity of the performance of the gateway tested in the test scenario, and automatically testing the functions of each gateway to be tested through web page tools and preset configuration information, realizing an intelligent automatic testing process, improving test efficiency, and enhancing the accuracy and reliability of gateway test results.
[0059] In an exemplary embodiment, as shown in FIG3 , the specific implementation process of the step of “verifying the target function of the gateway to be tested based on the preset configuration information and the webpage tool to obtain the test verification result” may include:
[0060] Step 302: Obtain registration information included in the preset configuration information.
[0061] Among them, the registration information includes the first account and the first password information. The registration information is used to register with the OLT in the existing PON network and to register with the operator's terminal management platform. The terminal management platform is used to send service configuration information of various services to the gateway. For example, the gateway can be configured with configuration information corresponding to the Internet service, configuration information corresponding to the voice service, configuration information corresponding to the TV service, etc.
[0062] Specifically, the gateway to be tested can access the existing network through the existing network access module in the test system. After accessing the existing network, it can access the test execution module of the test system through the user-side interface of the gateway so that the test system can test the gateway to be tested. The test system can determine the gateway to be tested through the test execution module, and configure the gateway to be tested through the test configuration module to determine the preset configuration information corresponding to the gateway to be tested that can be normally used in the existing network, and the preset configuration information at least includes registration information.
[0063] Step 304 , testing the registration function of the gateway to be tested through the webpage tool, the first account and the first password information, obtaining the test result of the registration function, and determining the test verification result of the gateway to be tested based on the test result of the registration function.
[0064] The webpage tool may be a crawler tool based on WEB, the first account corresponds to the first password information, and the first password information is password information for logging into the first account. The test result of the registration function may include a test result of successful registration or a test result of failed registration.
[0065] Specifically, the test execution module in the test system can simulate the manual registration of the user based on the crawler tool of the WEB, access the registration interface of the gateway, and enter the registration information carried in the configuration information of the gateway to be tested on the registration interface. For example, the first account and the first password information corresponding to the first account can be entered on the registration interface. The registration interface can respond to the first account and the first password information and display a response page; the test system can analyze the response page to obtain the test result of the registration function of the gateway to be tested. If the test result of the registration function is registration failure, the test system can obtain the test verification result of the gateway to be tested as registration verification failure. If the test result of the registration function is registration success, the test system can test the login function and business configuration function of the gateway to be tested to obtain the test verification results related to the registration function, login function and business configuration function.
[0066] In this embodiment, automated batch testing and intelligent detection of multiple gateways to be tested are implemented through an automated testing system and a WEB-based crawler tool, thereby further improving the testing efficiency while ensuring the accuracy of the test.
[0067] In an exemplary embodiment, the specific processing of the step of "testing the registration function of the gateway to be tested by using the webpage tool, the first account and the first password information to obtain the test result of the registration function" includes:
[0068] Through the web tool, enter the first account and the first password information on the existing network registration page to obtain the test result of the registration function of the gateway to be tested.
[0069] Specifically, the test execution module in the test system can simulate the manual registration of the user based on the crawler tool of the WEB, access the registration interface of the gateway, and enter the registration information carried in the configuration information of the gateway to be tested on the registration interface. For example, the first account and the first password information corresponding to the first account can be entered on the registration interface. The registration interface can respond to the first account and the first password information and display a response page; the test system can analyze the response page and the response page to obtain the test result of the registration function of the gateway to be tested. If the test result of the registration function is registration failure, the test system can obtain the test verification result of the gateway to be tested as registration verification failure. If the test result of the registration function is registration success, the test system can test the login function and business configuration function of the gateway to be tested to obtain the test verification results related to the registration function, login function and business configuration function.
[0070] Optionally, the process of the test system analyzing the response page may include: the test system may crawl various pages displayed during the registration process through a WEB-based crawler tool, such as a registration page for entering registration information and a registration result prompt page displayed after entering the registration information. The test system may crawl the registration page and the registration result prompt page by taking screenshots, and may also crawl the response page by downloading the HTML pages corresponding to the registration page and the registration result prompt page. Based on this, the test system may parse each response page through an OCR (optical character recognition) algorithm and a semantic analysis algorithm to determine the registration result represented by the response page, that is, to determine the test result of the registration function of the gateway to be tested.
[0071] Optionally, the response page captured by the test system may also include progress bar information of the registration process. For example, the test system may capture the currently displayed progress bar information at intervals of a preset time period, and determine whether the registration of the gateway to be tested is successful based on the registration progress bar information and prompt information displayed on the registration result display page. If the registration progress bar is a complete execution progress bar, or based on the determination that the text information represented by the prompt information is a successful registration, then the registration of the gateway to be tested is determined to be successful, that is, the test result of the registration function of the gateway to be tested is determined to be a successful registration. If the test system determines that the registration progress bar is an incomplete execution progress bar, or the text information represented by the prompt information is a registration failure, then the registration of the gateway to be tested is determined to be a registration failure, that is, the test result of the registration function of the gateway to be tested is determined to be a registration failure. In this way, the test system can also identify each response page and determine the cause of the registration failure. The failure cause may be the identified text prompt information. In one example, the preset time period may be 5s, or other values. The present disclosure does not specifically limit the specific value of the preset time period, and those skilled in the art may determine it based on the actual application scenario.
[0072] In this embodiment, automated batch testing and intelligent detection of multiple gateways to be tested are implemented through an automated testing system and a WEB-based crawler tool, thereby further improving the testing efficiency while ensuring the accuracy of the test.
[0073] In an exemplary embodiment, as shown in FIG. 4 , the specific processing of the step “determining the test verification result of the gateway to be tested based on the test result of the registration function” includes:
[0074] Step 402: If the test result of the registration function is a successful registration result, the second account and second password information of the gateway management system are obtained based on the preset configuration information.
[0075] The gateway management system may be a local management system in the gateway, and the second account and second password information in the preset configuration information are used to log in to the local management system of the gateway to be tested. The second password information is the password of the second account, and optionally, the second password information may also be a super management password.
[0076] Specifically, when the test system determines that the test result of the registration function of the gateway to be tested is a successful registration result, the test system can test the login function of the gateway to be tested, and accordingly obtain the pre-configured account and password information of the local management system of the gateway to be tested, that is, the second account and the second password information corresponding to the second account.
[0077] Step 404: input the second account and the second password information on the management system page through the web tool to obtain the test result of the login function of the gateway to be tested.
[0078] Step 406: If the test result of the login function is a successful login result, the service configuration data of the gateway to be tested is tested to obtain a test result of the service configuration. Based on the test result of the service configuration, a test verification result of the gateway to be tested is obtained.
[0079] Specifically, the test execution module in the test system can be based on a WEB crawler tool to simulate a user's manual login, access the login interface of the local management system of the gateway to be tested, and enter the second account and second password information carried in the configuration information of the gateway to be tested on the login interface. For example, the second account and the second password information corresponding to the second account can be entered on the login interface, and the login interface can respond to the second account and second password information and display a response page; the test system can analyze the response page and the response page to obtain the test result of the login function of the gateway to be tested.
[0080] If the test result of the login function is login failure, the test system can determine that the test verification result of the gateway to be tested is registration verification success and login verification failure; if the test result of the login function is login success, the test system can test the business configuration function of the gateway to be tested and obtain the test verification results related to the login function, login function and business configuration function, that is, the test result of the registration function, the test result of the login function and the test result of the gateway's business configuration.
[0081] Optionally, the process of analyzing the response page obtained during the test of the login function by the test system may include: the test system may crawl various pages displayed during the login process through a WEB-based crawler tool, for example, a login page for entering the second account and second password information, and a page displayed after entering the login information. The test system may determine the above pages as test data and perform analysis based on the test data. The page displayed after entering the login information may include a login result prompt page and a management interface of the local management system.
[0082] The test system can capture each page by taking a screenshot or downloading an HTML page, and analyze each captured page by using an OCR (optical character recognition) algorithm and a semantic analysis algorithm. If data representing a successful login is extracted based on the page displayed after the login information is entered, and it is determined that the management interface of the local management system is displayed normally, then it is determined that the login of the gateway to be tested is successful, that is, the test result of the login function of the gateway to be tested is determined to be a successful login. If data representing a successful login is not extracted based on the page displayed after the login information is entered, and / or it is determined that the management interface of the local management system is not displayed normally, then the test system can determine that the login of the gateway to be tested has failed, that is, the test result of the login function of the gateway to be tested is determined to be a login verification failure.
[0083] In one example, if it is determined that the test result of the login function of the gateway to be tested is a successful login, the test system can test the service configuration function of the gateway to be tested, for example, the service configuration data of the gateway to be tested can be tested to obtain the test result of the service configuration. Specifically, the test system can check the configuration of the gateway to be tested that has successfully logged into the local management system, including the inspection of the gateway device information, the inspection of the remote management status, the inspection of various service information, and the detection of broadband connection. For example, for the gateway that has successfully logged into the local management system, the test system can simulate the local management system of the manual operation gateway through the WEB crawler tool, and jump to the content of each link in the WEB page of the local management system (device information page, service information page, remote management status page, broadband connection page, etc., these pages contain the corresponding configuration information and usage status of the gateway), download the HTML page, take a screenshot and save it as test information, and judge whether the relevant service configurations are issued normally based on the test information. For example, check whether the device information is accurate, whether the remote management status is normal, whether the configuration information of the voice service / Internet service / TV service is complete, etc. If the device information is accurate, the remote management status is normal, and all services are fully configured based on the above page, the test result of the service configuration can be determined as a successful service configuration verification. Based on this, the test system can determine that the test results of the gateway to be tested are successful registration verification, successful login verification, and successful service configuration verification.
[0084] If the device information is determined to be inaccurate based on the above page, or the remote management status is abnormal, or all services are fully configured, the test result of the service configuration can be determined to be a service configuration verification failure. Based on this, the test system can determine that the test result of the gateway to be tested is a registration verification success, a login verification success, and a service configuration verification failure.
[0085] In this embodiment, automated batch testing and intelligent detection of multiple gateways to be tested are implemented through an automated testing system and a WEB-based crawler tool, thereby further improving the testing efficiency while ensuring the accuracy of the test.
[0086] In an exemplary embodiment, as shown in FIG5 , the specific processing of the step of “entering the first account and the first password information on the existing network registration page through the webpage tool to obtain the test result of the registration function of the gateway to be tested” includes:
[0087] Step 502: input the first account and the first password information on the existing network registration page through the webpage tool, so that the existing network registration page responds to the first account and the first password information, and obtains a response page.
[0088] Specifically, the test execution module in the test system can simulate the manual registration of the user based on the WEB crawler tool, access the registration interface of the gateway, and enter the registration information carried in the configuration information of the gateway to be tested on the registration interface. For example, the first account and the first password information corresponding to the first account can be entered on the registration interface. The registration interface can respond to the first account and the first password information and display a response page. The test system can crawl various pages displayed during the registration process through a WEB-based crawler tool, such as a registration page for entering registration information and a registration result prompt page displayed after entering the registration information. The test system can capture the registration page and the registration result prompt page by taking screenshots, and can also capture the response page by downloading the HTML pages corresponding to the registration page and the registration result prompt page.
[0089] Step 504: Identify the response page using a preset page identification algorithm to obtain identification data, and obtain a test result of the registration function of the gateway to be tested based on the information indicated by the identification data.
[0090] The preset page recognition algorithm may be an algorithm for character recognition on a page, or an algorithm for semantic recognition on a response page, such as an optical character recognition algorithm, a word meaning analysis algorithm, and the like.
[0091] Specifically, the test system may parse each response page through an OCR (optical character recognition) algorithm and a word meaning analysis algorithm to determine the registration result represented by the response page, that is, determine the test result of the registration function of the gateway to be tested.
[0092] For example, the test system can determine whether the tested gateway has been successfully registered based on the registration progress bar information and prompt information displayed on the registration result display page. If the registration progress bar is a complete execution progress bar, or based on the determination that the text information represented by the prompt information is a successful registration, then the tested gateway is determined to be successfully registered, that is, the test result of the registration function of the tested gateway is determined to be a successful registration. If the test system determines that the registration progress bar is an incomplete execution progress bar, or the text information represented by the prompt information is a registration failure, then the tested gateway is determined to have failed to register, that is, the test result of the registration function of the tested gateway is determined to be a registration failure. In this way, the test system can also identify each response page to determine the cause of the registration failure. The failure cause can be the identified text prompt information.
[0093] In this embodiment, automated batch testing and intelligent detection of multiple gateways to be tested are implemented through an automated testing system and a WEB-based crawler tool, thereby further improving the testing efficiency while ensuring the accuracy of the test.
[0094] In an exemplary embodiment, the gateway testing method further includes:
[0095] Download the page after the existing network registration page responds to obtain the response page, and / or intercept the page after the existing network registration page responds to obtain the response page through a preset interception algorithm.
[0096] Specifically, the test system may capture the registration page and the registration result prompt page by taking screenshots, and may also capture the response page by downloading HTML pages corresponding to the registration page and the registration result prompt page.
[0097] In this embodiment, a page for performing test judgment can be obtained in a variety of ways to ensure the accuracy of the test result judgment of each function of the gateway to be tested.
[0098] In one embodiment, FIG6 provides a schematic diagram of a communication architecture used in a gateway testing method, which includes a test system, a PON existing network, and multiple gateways to be tested. The test system includes a test configuration module, a test execution module, a test data analysis module, and an existing network access module. The existing network access module can be an optical splitter, and each gateway to be tested can include a local management system. The PON existing network can transmit a signal to the optical splitter, and the optical splitter can divide the received existing network signal into multiple channels, and transmit the corresponding existing network signals to each gateway to be tested through the multiple transmission channels in the optical splitter, so as to achieve access to the existing network for each gateway to be tested. Based on this, the gateways to be tested can be respectively accessed to the test execution module, and the test execution module can test each function of each gateway to be tested in combination with the test configuration module and the test data analysis module to obtain the test results of each gateway to be tested. In other words, the uplink optical channel is accessed to the PON existing network through the existing access module of the test system, and the user-side interface of the gateway to be tested can be accessed to the test execution module of the test system, and the test execution module can test the accessed gateway.
[0099] Optionally, the test system may also include an Internet server and be connected to the Internet server; the test system may also detect the service usage function. The test system may simulate a home user terminal device and perform wired or wireless access through a gateway. The test system may detect whether the Internet can be accessed, or detect whether the preset service rate can be reached, etc. The performance of the IPIV function may also be tested, etc. Specifically, the test system may simulate a user terminal device with wired access, access the speed test platform on the Internet server through a gateway, accurately measure the upload and download speeds of the gateway, obtain speed measurement results, and determine whether the preset service rate can be reached based on the speed measurement results. The test system may also add a related Wi-Fi module to simulate a Wi-Fi user terminal device and test the ability to access the Internet via a Wi-Fi wireless access gateway.
[0100] The gateway testing method provided in this embodiment includes: connecting the home gateway to be tested to an automated testing system; the testing system uses WEB crawler technology to simulate manual registration function testing, local management system login function testing, and existing network service configuration inspection to implement testing of the registration function, login function, and service configuration function of the gateway to be tested; the testing system uses an OCR algorithm and a semantic analysis algorithm to parse the response page and data obtained during the above test process to determine whether the various functions of the gateway are normal, that is, to determine the test results of the various functions of the gateway.
[0101] Optionally, the test execution module in the test system can simulate manual registration function testing, local management system login function testing, and existing network service configuration inspection through a WEB crawler tool. Furthermore, the test execution module of the test system uses a WEB crawler tool to access the registration page of the home gateway, automatically enter account information to register with the OLT and the operator's terminal management platform in the existing network; automatically access the login page of the home gateway, automatically enter the login account and password / super management password, access the WEB-based gateway local management system, and detect the service configuration information sent to the home gateway by the operator's terminal management platform in the local management system one by one. In this process, HTML pages are downloaded multiple times, screenshots are taken, and various data are crawled and stored as test data. The test execution module can divide N virtual machines, and each virtual machine performs the above test actions on the N home gateways connected to the system to achieve concurrent and simultaneous testing.
[0102] The test system can also analyze the test data (web page information and screenshot key text saved during the test) based on the OCR algorithm and word meaning analysis algorithm to verify whether the gateway function and status are normal. Furthermore, the test analysis module of the test system analyzes the test results of the registration and login function verification, uses the OCR algorithm and word meaning analysis algorithm to recognize the image to obtain the test result text and perform word meaning analysis. If the registration and login are successful, the test execution module continues to execute the issued business configuration inspection, uses the web crawler to capture the relevant pages and screenshots, and the test analysis module analyzes the test results of the business configuration inspection based on this and outputs the test results.
[0103] The automated test system constructed by the gateway test method provided in this embodiment includes: a test configuration module, a test execution module, a test analysis module, an existing network access module, etc. Among them:
[0104] Test configuration module: used to input configuration information for the test gateway (gateway to be tested) that can be used normally in the existing network, including the account and password (registration information) of the registered OLT of the existing network and the operator's terminal management platform, and preset the Internet, voice, TV and other service configurations for the account.
[0105] Test execution module: The test execution module uses a web-based crawler tool to access the web-based gateway local management system. After successful registration and login, the module will rely on the local management system to test the various business function configurations of the gateway one by one. During the entire testing process, the module will continuously crawl, screenshot and save the pages of the local management system, and extract test information and data for subsequent analysis. For N home gateways to be tested connected to the optical splitter, the test execution module divides N virtual machines and performs concurrent testing of the above functions on the N home gateways to be tested.
[0106] 1) Verification of gateway registration function: The WEB-based crawler tool can simulate manual registration and register the test gateway in the PON live network through the registration information provided by the test configuration module. During the registration process, the WEB crawler technology downloads HTML pages multiple times and takes screenshots and saves them as test information, which is helpful for the subsequent detailed analysis and problem diagnosis of the registration process;
[0107] 2) Verification of the gateway login function: that is, to conduct a detailed test of the local management system login function of the gateway to ensure that the gateway can be configured and operated in the local management system. For the successfully registered terminal, a web-based crawler tool simulates manual login to the gateway local management system, using the default configuration account and super-administration password. After automatically logging into the local management system, the page content including the login information is captured, downloaded, and screenshot, and saved as test information for subsequent analysis and verification;
[0108] 3) Current network service configuration inspection: including gateway device information inspection, remote management status inspection, various service information inspection, and broadband connection detection. For gateways that have successfully logged into the local management system, the WEB-based crawler tool can simulate the local management system of the gateway manually operated, find the various links in the local management system WEB page (device information page, service information page, remote management status page, broadband connection page, etc., which contain the corresponding configuration information and usage status of the gateway), jump to access, download HTML pages, and take screenshots and save them as test information;
[0109] Test analysis module: Uses OCR algorithm (optical character recognition) and word meaning analysis algorithm to process HTML pages and screenshots saved by the test execution module during the test process. For example, it can convert and identify test text and data, and obtain test results through word meaning analysis algorithm:
[0110] 1) Analyze the test results of the gateway registration function, identify the registration progress bar and corresponding prompt information on the registration authentication page, and determine whether the gateway can successfully register with the OLT and the operator's terminal management platform. If the registration is unsuccessful, obtain the corresponding text reason from the screenshot.
[0111] 2) Analyze the test results of the gateway login function to ensure that the gateway can log in to the local management system for configuration, check whether the gateway system can correctly respond to login requests, and whether it can correctly display the page after login.
[0112] 3) Verify whether the relevant service configurations in the gateway's registered account are issued normally. For example, check whether the device information is accurate, whether the remote management status is normal, and whether the configuration information of voice service / Internet service / TV service is complete.
[0113] The existing network access module can be a PON existing network access point in the actual application scenario of the test. The automated test system provided by this embodiment is deployed. A suitable 1*N optical splitter can be selected in the system to divide the optical signal input by the PON existing network into multiple output signals, which are transmitted to multiple test gateways respectively, so that multiple test gateways can be tested concurrently in the real detection environment of the PON existing network.
[0114] Specific practical application scenarios can be operators' arrival warehouses, marketing centers, and other places, where they perform batch testing of their warehouse home gateways before installation. Optionally, the automatic test system hardware can use industrial computers / servers, optical splitters and other hardware, and the software can logically implement test configuration modules, test execution modules, test analysis modules, etc. The test environment is ready to access the line resources and account resources of the existing network. Figure 7 provides a signaling interaction flow chart of a gateway testing method. As shown in Figure 7, the method includes the following steps:
[0115] S1: The test gateway is connected to the automated test system, that is, the gateway to be tested is connected to the existing network access module and test execution module in the system:
[0116] S2: The test configuration module inputs the configuration information registered in the existing network and starts the test;
[0117] S3: The "test execution module" performs the "registration function verification" test, registers the gateway page based on the WEB crawler tool (based on web crawler technology), and the crawler captures the registration-related pages and screenshots;
[0118] S4: The "test analysis module" analyzes the "registration verification" test results of S3: parses web page information, uses OCR technology to identify images to obtain text, and extracts test information analysis results. The "test analysis module" determines that the registration is successful, and the system executes S5; the "test analysis module" determines that the registration fails, and executes S9;
[0119] S5: The "test execution module" executes the test "login function verification" and logs into the local system of the gateway through a web-based crawler tool. The crawler captures login-related pages and screenshots;
[0120] S6: The "test analysis module" analyzes the test results of "login function verification" in S5: parses web page information, uses OCR technology to identify images to obtain text, and extracts test information analysis results. The "test analysis module" determines that the local management system login is successful, and the system executes S7; the "test analysis module" determines that the login fails, and executes S9;
[0121] S7: The "test execution module" executes the test "service configuration verification", and performs the current network service configuration verification in the local system of the gateway based on the WEB crawler technology. The crawler captures login-related pages and screenshots;
[0122] S8: The "test analysis module" analyzes the test results of S7: parses the web page information, uses OCR technology to recognize the image to obtain text, extracts the test information analysis results, and executes S9;
[0123] S9: Stop the test and output the test result. For example, the test result may be registration verification failure / login verification failure / business configuration verification completion (failure / success).
[0124] The gateway testing method provided in this embodiment realizes intelligent, automated and rapid detection of the ability of the home gateway to connect to the existing network by constructing an automated testing system, and multiple samples can be tested concurrently at a time. Specifically, the home gateway to be tested can be connected to the automated testing system, and the following automated testing capabilities are mainly realized through the system: the test sample is connected to the existing network OLT to verify the actual usage scenario, and the test is carried out in the actual environment of the existing network by registering an account. The registration function, local management function and issued service configuration information of the gateway device are inspected and evaluated to find possible installation quality problems of the terminal gateway device. The construction of the automated testing system not only improves the testing efficiency, but also ensures the accuracy and consistency of the test results.
[0125] The gateway testing method provided in this embodiment can automatically execute tests and analyze results through web-based crawler tools and OCR algorithms, replacing manual testing methods to implement intelligent automatic detection processes, improving test efficiency and enhancing the accuracy and reliability of test results. The system divides virtual machines to perform concurrent tests on multiple home gateways based on the above test capabilities, further improving efficiency.
[0126] In addition, the test environment constructed by this test system is closely connected with the existing network, reflecting the performance of the gateway close to the real user scenario, further ensuring that the home gateway that has passed the test and is reliable in quality can be officially put into use, providing users with a more stable and efficient home network service experience. The gateway testing method provided in this embodiment realizes the automated testing of the home gateway. By building an automated testing system and introducing technologies such as WEB crawlers and OCR, batch testing and automated and intelligent detection of home gateways are realized, the test efficiency and the accuracy and reliability of the test results are improved, ensuring that the home gateway that has passed the test and is reliable in quality can be officially put into use, and ensuring that users obtain an efficient home network service experience.
[0127] The gateway testing method provided in this embodiment can automatically and quickly evaluate whether the network home gateway is qualified for docking with the existing network, and promptly find the gateway that cannot be used in the existing network, ensuring the quality of the officially put into use home gateway is reliable. It is an important measure to improve user experience and enhance user satisfaction. By testing in the actual network environment, simulating the use scenario of real users, the availability of the home gateway is truly verified; batch, automated and intelligent detection of home gateways is realized, replacing manual detection, and improving the test efficiency and the objective accuracy of the test results. In other words, the gateway testing method provided in this embodiment not only improves the test efficiency and the accuracy of the test results, but also reduces the test cost and improves the quality of the installed gateway and the user experience.
[0128] It should be understood that, although the various steps in the flowcharts of Figures 1-7 are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in Figures 1-7 may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0129] In one embodiment, as shown in FIG8 , a gateway testing device 800 is provided, including:
[0130] The first acquisition module 802 is used to acquire a gateway to be tested that is connected to the test system, and the gateway to be tested is connected to the existing network through the existing network access module of the test system;
[0131] The verification module 804 is used to verify the target function of the gateway to be tested based on preset configuration information and web page tools to obtain a test verification result. The target function includes one or more of a registration function, a login function and a configuration function.
[0132] In one embodiment, the verification module is specifically used to: obtain registration information contained in the preset configuration information, the registration information including a first account and a first password information; test the registration function of the gateway to be tested through a web tool, the first account and the first password information, obtain a test result of the registration function, and determine a test verification result of the gateway to be tested based on the test result of the registration function.
[0133] In one embodiment, the verification module is specifically used to: input the first account and the first password information on the existing network registration page through a web tool to obtain the test result of the registration function of the gateway to be tested.
[0134] In one embodiment, the verification module is specifically used to: if the test result of the registration function is a successful registration result, obtain the second account and second password information of the gateway management system based on the preset configuration information; enter the second account and second password information on the management system page through the web tool to obtain the test result of the login function of the gateway to be tested; if the test result of the login function is a successful login result, test the business configuration data of the gateway to be tested to obtain the test result of the business configuration; based on the test result of the business configuration, obtain the test verification result of the gateway to be tested.
[0135] In one embodiment, the verification module is specifically used to: input the first account and the first password information on the existing network registration page through a web tool, so that the existing network registration page responds to the first account and the first password information to obtain a response page; identify the response page through a preset page recognition algorithm to obtain recognition data, and obtain the test result of the registration function of the gateway to be tested based on the information indicated by the recognition data.
[0136] In one embodiment, the device further comprises:
[0137] The download module is used to download the page after the existing network registration page responds to obtain a response page, and / or intercept the page after the existing network registration page responds to obtain a response page through a preset interception algorithm.
[0138] For the specific definition of the gateway testing device, please refer to the definition of the gateway testing method above, which will not be repeated here. Each module in the above-mentioned gateway testing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0139] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store test data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a gateway testing method is implemented.
[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above embodiments are implemented.
[0141] The embodiments of the present application also provide a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps in the above embodiments.
[0142] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0143] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0144] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A gateway testing method, characterized in that: The method comprises: Acquire a gateway to be tested that is connected to the test system, wherein the gateway to be tested is connected to the existing network through the existing network access module of the test system; Based on the preset configuration information and the webpage tool, the target function of the gateway to be tested is verified to obtain a test verification result, wherein the target function includes one or more of a registration function, a login function and a configuration function.
2. The method according to claim 1, characterized in that The target function of the gateway to be tested is verified based on the preset configuration information and the webpage tool to obtain the test verification result, including: Acquire registration information included in the preset configuration information, where the registration information includes a first account and a first password information; The registration function of the gateway to be tested is tested through a webpage tool, the first account and the first password information to obtain a test result of the registration function, and based on the test result of the registration function, a test verification result of the gateway to be tested is determined.
3. The method according to claim 2, characterized in that The test of the registration function of the gateway to be tested by using the webpage tool, the first account and the first password information to obtain the test result of the registration function includes: The first account and the first password information are input on the existing network registration page through a webpage tool to obtain the test result of the registration function of the gateway to be tested.
4. The method according to claim 2, characterized in that: The step of determining the test verification result of the gateway to be tested based on the test result of the registration function includes: If the test result of the registration function is a successful registration result, obtaining the second account and second password information of the gateway management system based on the preset configuration information; Using the web tool, input the second account and the second password information on the management system page to obtain the test result of the login function of the gateway to be tested; If the test result of the login function is a successful login result, the service configuration data of the gateway to be tested is tested to obtain a test result of the service configuration; Based on the test result of the service configuration, a test verification result of the gateway to be tested is obtained.
5. The method according to claim 3, characterized in that: The step of inputting the first account and the first password information on the existing network registration page through the webpage tool to obtain the test result of the registration function of the gateway to be tested includes: Using a webpage tool, inputting the first account and the first password information on the existing network registration page, so that the existing network registration page responds to the first account and the first password information, and obtaining a response page; The response page is identified by a preset page identification algorithm to obtain identification data, and based on the information indicated by the identification data, a test result of the registration function of the gateway to be tested is obtained.
6. The method according to claim 5, characterized in that The method further comprises: The page after the existing network registration page responds is downloaded to obtain a response page, and / or the page after the existing network registration page responds is intercepted by a preset interception algorithm to obtain a response page.
7. A gateway testing device, characterized in that: The device comprises: A first acquisition module is used to acquire a gateway to be tested that is connected to the test system, and the gateway to be tested is connected to the existing network through the existing network access module of the test system; The verification module is used to verify the target function of the gateway to be tested based on preset configuration information and web page tools to obtain a test verification result, wherein the target function includes one or more of a registration function, a login function and a configuration function.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for testing pressure of gateway products
CN104156461A
One-key diagnosis method for voice state of home gateway
CN110784359A
Gateway detection method and device, electronic equipment and computer readable medium
CN113612665A
OpenAPI interface test method and system based on JMeter, equipment and medium
CN117857390A
Method and apparatus for link check in passive optical network
US20160006631A1