Webpage testing methods, devices, storage media, and computer terminals

CN115145822BActive Publication Date: 2026-08-14DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-18
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]本发明实施例提供了一种网页测试方法、装置、存储介质及计算机终端,以至少解决相关技术中,对网页进行测试时测试效率较低的技术问题

Benefits of technology

[0015]在本发明实施例中,通过获取目标网页的代理服务配置和测试用例脚本,其中,代理服务配置用于确定测试服务器指向的目标服务器,测试服务器用于对目标网页进行测试,目标服务器用于提供测试过程的运行环境;基于代理服务配置在测试服务器中启动代理服务工具,生成代理服务,其中,所代理服务用于通过目标服务器为测试服务器中的测试过程提供运行环境;基于代理服务和测试用例脚本对目标网页进行测试,得到测试结果,其中,测试结果用于表示目标网页的网页功能是否正常。容易注意到的是,可以基于代理服务配置在测试服务器中启动代理服务工具生成代理服务,从而为测试过程提供运行环境,以此来提高对目标网页进行测试的效率,进而解决了相关技术中,对网页进行测试时测试效率较低的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115145822B_ABST
    Figure CN115145822B_ABST
Patent Text Reader

Abstract

This invention discloses a webpage testing method, apparatus, storage medium, and computer terminal. The method includes: obtaining a proxy service configuration and test case scripts for a target webpage, wherein the proxy service configuration determines the target server to which the test server points, the test server is used to test the target webpage, and the target server provides the runtime environment for the testing process; starting a proxy service tool on the test server based on the proxy service configuration to generate a proxy service, wherein the proxy service provides the runtime environment for the testing process on the test server through the target server; and testing the target webpage based on the proxy service and the test case scripts to obtain test results, wherein the test results indicate whether the webpage functions correctly. This invention solves the technical problem of low testing efficiency when testing webpages in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the Internet field, and more specifically, to a webpage testing method, apparatus, storage medium, and computer terminal. Background Technology

[0002] Currently, when testing one software program with another, it's necessary to start an automation service program locally and then edit the test scripts of that service program to test the other software. This makes testing software in a specific environment difficult, according to the methods provided in related technologies. If it were possible, the corresponding software data package would need to be copied to the specified environment for testing, resulting in low testing efficiency.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This invention provides a webpage testing method, apparatus, storage medium, and computer terminal to at least solve the technical problem of low testing efficiency when testing webpages in related technologies.

[0005] According to one aspect of the present invention, a webpage testing method is provided, comprising: obtaining a proxy service configuration and a test case script of a target webpage, wherein the proxy service configuration is used to determine a target server pointed to by a test server, the test server is used to test the target webpage, and the target server is used to provide a runtime environment for the test process; starting a proxy service tool in the test server based on the proxy service configuration to generate a proxy service, wherein the proxy service is used to provide a runtime environment for the test process in the test server through the target server; and testing the target webpage based on the proxy service and the test case script to obtain test results, wherein the test results are used to indicate whether the webpage functions of the target webpage are normal.

[0006] Optionally, the target webpage is tested based on the proxy service and test case scripts to obtain test results, including: starting an automated testing tool on the test server based on the test case scripts to generate a test service; and testing the target webpage based on the test service and the proxy service to obtain test results.

[0007] Optionally, testing the target webpage based on the testing service and the proxy service to obtain test results includes: generating a simulated browser on the test server based on the testing service; testing the target webpage in the simulated browser and generating a test request; and processing the test request based on the proxy service to obtain test results.

[0008] Optionally, the test request is processed based on the proxy service to obtain the test result, including: processing the test request on the target server based on the proxy service to obtain the test result.

[0009] Optionally, obtaining the proxy service configuration and test case scripts of the target webpage includes: obtaining the proxy service configuration and test case scripts of the target webpage based on the target interface of the test server.

[0010] Optionally, after testing the target webpage based on the proxy service and test case scripts and obtaining the test results, the method further includes: outputting the test results based on the target interface.

[0011] According to another aspect of the present invention, a webpage testing apparatus is also provided, comprising: an acquisition module, configured to acquire a proxy service configuration and test case scripts of a target webpage, wherein the proxy service configuration is used to determine a target server pointed to by a test server, the test server is used to test the target webpage, and the target server is used to provide a runtime environment for the test process; a startup module, configured to start a proxy service tool in the test server based on the proxy service configuration and generate a proxy service, wherein the proxy service is used to provide a runtime environment for the test process in the test server through the target server; and a testing module, configured to test the target webpage based on the proxy service and the test case scripts and obtain test results, wherein the test results are used to indicate whether the webpage functions of the target webpage are normal.

[0012] Optionally, the testing module includes: a generation unit, used to start an automated testing tool on the test server based on test case scripts to generate a test service; and a testing unit, used to test the target webpage based on the test service and the proxy service to obtain test results.

[0013] According to another aspect of the present invention, a storage medium is also provided, the storage medium including a stored program, wherein, when the program is running, it controls the device where the storage medium is located to execute any of the above-described web page testing methods.

[0014] According to another aspect of the present invention, a computer terminal is also provided, including: a processor and a memory, wherein the processor is configured to run a program stored in the memory, wherein the program executes any of the above-described webpage testing methods during runtime.

[0015] In this embodiment of the invention, the proxy service configuration and test case script of the target webpage are obtained. The proxy service configuration determines the target server to which the test server points. The test server is used to test the target webpage, and the target server provides the runtime environment for the test process. Based on the proxy service configuration, a proxy service tool is started on the test server to generate a proxy service. This proxy service provides the runtime environment for the test process on the test server through the target server. The target webpage is then tested based on the proxy service and the test case script to obtain test results. These test results indicate whether the webpage functions correctly. It is noteworthy that by starting a proxy service tool on the test server based on the proxy service configuration to generate a proxy service, a runtime environment for the test process can be provided, thereby improving the efficiency of testing the target webpage and solving the technical problem of low testing efficiency when testing webpages in related technologies. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0017] Figure 1 This is a flowchart of an optional webpage testing method according to an embodiment of the present invention;

[0018] Figure 2 This is a schematic diagram of an optional system principle according to an embodiment of the present invention;

[0019] Figure 3 This is a schematic diagram of an optional technical solution according to an embodiment of the present invention;

[0020] Figure 4 This is a schematic diagram of an optional webpage testing device according to an embodiment of the present invention. Detailed Implementation

[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0023] In existing technologies, when testing one software with another, it is usually necessary to start an automation service software locally and then test the other software by editing the test script of the automation service software. However, when testing software in a specific environment, such as testing software in a development environment, it is difficult to test the software in that specific environment because the automation service software itself does not have proxy capabilities and cannot use a specific server (such as a development server) for testing.

[0024] Furthermore, when using one software to test another locally, the automation service software itself requires a runtime server, which typically runs on the user's computer. The test scripts also reside on the user's computer. Therefore, if another user wants to use it, they need to copy all the files from that user's computer to their own. This means that the test scripts need to be stored within the automation service software, rather than being a publicly accessible service.

[0025] First, the technical terms or technical jargon appearing in the embodiments of this invention are explained as follows:

[0026] Cypress: refers to the industry-leading end-to-end automated testing tool. Users can actively write test scripts, which will run under this automated testing tool and output logs, videos, images, etc.

[0027] End-to-end testing is a software testing method that uses one piece of software to test another. Its purpose is to test software products and ensure that the products function as expected.

[0028] Express is a web development framework that allows the use of the Node.js language.

[0029] Node.js: A server-side programming language.

[0030] Whistle is a web proxy service tool implemented based on Node.js.

[0031] Specified environment: Usually during the development and testing phase, that is, before going live, there will be a development and testing server used for development and testing, so as to separate it from the production environment. The specified environment is the development and testing environment.

[0032] Example 1

[0033] According to an embodiment of the present invention, a method embodiment for webpage testing is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0034] Figure 1 This is a flowchart of an optional webpage testing method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0035] Step S102: Obtain the proxy service configuration and test case script of the target webpage. The proxy service configuration is used to determine the target server to which the test server points. The test server is used to test the target webpage. The target server is used to provide the running environment for the test process.

[0036] The target webpage mentioned above can be any webpage that needs to be tested. Optionally, the target webpage can be an advertising webpage, a game webpage, etc. There are no restrictions here, and it can be any webpage to be tested.

[0037] The above proxy service configuration can be the network address of the proxy service tool. The proxy service tool can be the whistle proxy service tool, which is a cross-platform packet capture and debugging proxy tool based on Node.js, where Node.js is the runtime environment. Optionally, the proxy service tool can be installed on a test server. After confirming the runtime environment required by the target webpage, relevant technical personnel can start the proxy service tool to obtain the target server with the same runtime environment as the target webpage, and then obtain the target server's network address to provide the necessary runtime environment for the testing process of the target webpage.

[0038] The aforementioned test case scripts can be used to test target web pages. The test case scripts can be program scripts pre-edited by testers according to test requirements. Optionally, the test case scripts can be Cypress test scripts, which are automated testing tools. Optionally, technical personnel can input test scripts based on these test tools, and the automated testing tool can output relevant logs, videos, images, etc.

[0039] The target server mentioned above can be a proxy server, used to provide the necessary test environment for the testing process of the target webpage.

[0040] In one optional embodiment, relevant parameters of the target webpage's runtime environment can be obtained through the test server's interface. Then, the proxy service configuration required for this runtime environment and the test case scripts needed for testing can be determined. The test server can be used to test the functionality of the target webpage. Optionally, the test server's interface can be an interaction point between the server hosting the target webpage and the test server, or between various systems within the test server. Optionally, the test server's interface is used to connect to the server hosting the target webpage, and relevant parameters of the target webpage's runtime environment can be detected from the interface. Based on these parameters, the target webpage's runtime environment can be detected. After detecting the target webpage's runtime environment, the network address of the target server with the same runtime environment as the target webpage and the test case scripts used to test the target webpage can be determined.

[0041] In another optional embodiment, proxy service configuration and test case scripts can also be obtained based on the target webpage. Optionally, the target webpage's attribute information can be determined by analyzing it. This attribute information may include the data type of the target webpage, its operating environment, and its pageview volume. Further, the required operating environment for the target webpage can be determined based on its attribute information. Optionally, after determining the required operating environment, a target server with the same operating environment as the target webpage can be identified, and the target server's network address and the test case scripts used to test the target webpage can be obtained.

[0042] Step S104: Based on the proxy service configuration, start the proxy service tool on the test server and generate the proxy service. The proxy service is used to provide a runtime environment for the test process on the test server through the target server.

[0043] The aforementioned proxy service can be used to send requests to the target server, thereby using the target server's runtime environment, and thus providing the runtime environment required by the target webpage for the testing process of the test server. Optionally, the proxy service may contain information about the runtime environment required during the testing process.

[0044] In one optional embodiment, after obtaining the proxy service configuration, the corresponding proxy service tool can be started on the test server based on the proxy service configuration to generate the proxy service. Optionally, the proxy service tool can be the whistle proxy service tool.

[0045] In another alternative embodiment, the test server can generate a startup command. Since the proxy service configuration is different, different startup scripts can be called to execute the startup command, thereby starting the corresponding proxy service tool and generating the proxy service.

[0046] Furthermore, after generating the proxy service, test case scripts can be called in the specified runtime environment to test the target webpage, thereby improving the testing efficiency of the target webpage and solving the technical problem of low testing efficiency when testing webpages in related technologies.

[0047] Step S106: Test the target webpage based on the proxy service and test case script to obtain test results, wherein the test results are used to indicate whether the webpage functions of the target webpage are normal.

[0048] In one optional embodiment, after obtaining the proxy service and test case script, the proxy service can be sent to the target server. The target server responds to the proxy service, thereby providing the specified runtime environment. Optionally, the test case script can be invoked in this specified environment to test the target webpage, thereby obtaining test results.

[0049] In another optional embodiment, the test result can be either that the target webpage functions normally or that it malfunctions. Optionally, different colored icons can be used on the test server interface to represent different test results. For example, a red icon can be displayed on the test server when the test result indicates that the target webpage functions normally, and a green icon can be displayed when the test result indicates that the target webpage malfunctions. Alternatively, different test results can be communicated through voice broadcast or text expression. Furthermore, if the test result indicates that the target webpage malfunctions, an alarm can be triggered to alert relevant technical personnel so that they can obtain information in a timely manner and take appropriate measures to correct the target webpage.

[0050] Figure 2This is an optional system principle diagram according to an embodiment of the present invention, such as... Figure 2 As shown, relevant personnel can use a proxy service tool. This tool can request parameters from the assembly service established by the development framework. These parameters can include test case scripts and the target server. The proxy service tool can also receive parameters returned by the assembly service, including test results, screenshots, videos, and logs. Furthermore, the assembly service can start the proxy service, which the proxy service tool will establish. Simultaneously, the assembly service will also start the test service, which the test case scripts will establish. The test service established by the test case scripts will then send requests to the proxy service established by the proxy service tool. Upon receiving the request, the proxy service established by the proxy service tool will forward it to the specified server to test the target page. Optionally, the target page can include multiple pages such as Page 1 and Page 2.

[0051] In this embodiment of the invention, the proxy service configuration and test case script of the target webpage are obtained. The proxy service configuration determines the target server to which the test server points. The test server is used to test the target webpage, and the target server provides the runtime environment for the test process. Based on the proxy service configuration, a proxy service tool is started on the test server to generate a proxy service. This proxy service provides the runtime environment for the test process on the test server through the target server. The target webpage is then tested based on the proxy service and the test case script to obtain test results. These test results indicate whether the webpage functions correctly. It is noteworthy that by starting a proxy service tool on the test server based on the proxy service configuration to generate a proxy service, a runtime environment for the test process can be provided, thereby improving the efficiency of testing the target webpage and solving the technical problem of low testing efficiency when testing webpages in related technologies.

[0052] Optionally, the target webpage is tested based on the proxy service and test case scripts to obtain test results, including: starting an automated testing tool on the test server based on the test case scripts to generate a test service; and testing the target webpage based on the test service and the proxy service to obtain test results.

[0053] The aforementioned automated testing tools can be end-to-end automated testing tools. End-to-end testing involves using one piece of software to test another piece of software. Its purpose is to test software products and ensure that the products can function as expected.

[0054] In one optional embodiment, after obtaining the test case script, a startup command can be generated based on the test case script. In response to the startup command, the automated testing tool will start, thereby generating a test service that can be used to test the target webpage. Optionally, at the same time, the proxy service will also send a request to the target server to use the target server's runtime environment, so that the test service can test the target webpage in the specified runtime environment and generate test results.

[0055] In another alternative embodiment, after obtaining the test case script, the test case script can automatically trigger the start of the automated testing tool. After the automated testing tool is started, it can generate a test service. At the same time, the proxy service will send a request to the target server to use the target server's runtime environment, so that the test service can test the target webpage in the environment in which the target server is running, further realizing that the target webpage can be tested in a specified runtime environment.

[0056] Optionally, testing the target webpage based on the testing service and the proxy service to obtain test results includes: generating a simulated browser on the test server based on the testing service; testing the target webpage in the simulated browser and generating a test request; and processing the test request based on the proxy service to obtain test results.

[0057] The aforementioned simulated browser can be an application used to retrieve, display, and transmit online information resources. Optionally, the simulated browser can reside on a test server, providing a display platform for the target webpage.

[0058] In an optional embodiment, a test server can be automatically triggered according to the test service to generate a simulated browser. Optionally, the simulated browser can be used to display the target webpage and generate a test request. Further, after the test request is generated, the test server responds to the request by calling a proxy service to parse and process the test request, thereby parsing out the test result based on the test request. The test result can be used to indicate whether the target webpage is functionally available.

[0059] In another alternative embodiment, the test server can be triggered by the test service to perform a test process. The test server will call relevant functions or scripts to generate a simulated browser and use it to access the target webpage, thereby testing the target webpage. Optionally, after the access is completed, the simulated browser will automatically generate a test request based on whether the access process was successful. The test server can then call a proxy service to analyze the test request and obtain the test results.

[0060] Optionally, the test request is processed based on the proxy service to obtain the test result, including: processing the test request on the target server based on the proxy service to obtain the test result.

[0061] In one optional embodiment, after receiving a test request, the proxy service can send an instruction to the target server, which can request the use of the target server's runtime environment during the test. The target server responds to the instruction and provides the specified runtime environment for the test process, so that the test server can test the target webpage in the runtime environment and obtain test results. Based on the test results, it can be determined whether the target webpage functions normally.

[0062] Optionally, obtaining the proxy service configuration and test case scripts of the target webpage includes: obtaining the proxy service configuration and test case scripts of the target webpage based on the target interface of the test server.

[0063] The target interface mentioned above can be the interface of the test server. Optionally, the test server can encapsulate its testing techniques and methods, providing only the target interface to the outside world, making it a public service. This allows the test results to be obtained simply by connecting the target interface to the server where the target webpage is located during testing, thus achieving end-to-end automated testing and greatly improving testing efficiency.

[0064] In one optional embodiment, since the target interface is used to connect to the server where the target webpage resides, relevant parameters of the target webpage's runtime environment can be detected from the target interface. After detecting these parameters, the runtime environment of the target webpage can be determined based on them. Optionally, the test server can call relevant functions or scripts to parse the data at the interface, thereby obtaining the runtime environment of the target webpage. After obtaining the runtime environment of the target webpage, the network address of the target server (i.e., the proxy service configuration) and the test case scripts used to test the target webpage can be determined.

[0065] Optionally, after testing the target webpage based on the proxy service and test case scripts and obtaining the test results, the method further includes: outputting the test results based on the target interface.

[0066] In one optional embodiment, after testing the target webpage and obtaining the test results, the test results can be output through the target interface. Optionally, the test results can be displayed in the form of voice or text. Based on the test results, relevant personnel can determine whether the target webpage is functioning normally. Optionally, when the test result indicates that the target webpage is malfunctioning, relevant personnel can obtain this information in a timely manner and take timely measures to correct the target webpage.

[0067] Figure 3 This is a schematic diagram of an optional technical solution according to an embodiment of the present invention, such as... Figure 3 As shown, after inputting parameters, an assembly service can be established using the Express web development framework. This assembly service can be configured to start a proxy service, and it can also start a test service based on test case scripts. Optionally, after the assembly service starts the test service, an automated testing tool can establish a test service, start the test, and perform the test in a simulated browser. Simultaneously, it will communicate with the proxy service. Optionally, the proxy service can also send requests to a specified proxy server, allowing the test server to test the target webpage in a specified runtime environment. The final test results can be returned to the assembly service, which then outputs the parameters, i.e., the test results.

[0068] Example 2

[0069] According to another aspect of the present invention, a webpage testing device is also provided. This device can execute the data processing method in the above embodiments. The specific implementation and preferred application scenarios are the same as those in the above embodiments, and will not be described in detail here.

[0070] Figure 4 This is a schematic diagram of an optional webpage testing device according to an embodiment of the present invention, such as... Figure 4 As shown, the device includes:

[0071] The acquisition module 402 is used to acquire the proxy service configuration and test case script of the target webpage. The proxy service configuration is used to determine the target server pointed to by the test server. The test server is used to test the target webpage. The target server is used to provide the running environment for the test process.

[0072] The startup module 404 is used to start the proxy service tool on the test server based on the proxy service configuration and generate the proxy service. The proxy service is used to provide a runtime environment for the test process on the test server through the target server.

[0073] Test module 406 is used to test the target webpage based on the proxy service and test case scripts, and obtain test results. The test results are used to indicate whether the webpage functions normally.

[0074] Optionally, the test module 406 includes: a generation unit, used to start an automated testing tool in the test server based on the test case script to generate a test service; and a test unit, used to test the target webpage based on the test service and the proxy service to obtain test results.

[0075] Optionally, the test unit includes: a generation subunit for generating a simulated browser in the test server based on the test service; a test subunit for testing the target webpage in the simulated browser and generating a test request; and a processing subunit for processing the test request based on the proxy service and obtaining the test result.

[0076] Optionally, the test subunit is also used to: process test requests on the target server based on the proxy service to obtain test results.

[0077] Optionally, the acquisition module 402 includes: an acquisition unit, used to acquire the proxy service configuration and test case scripts of the target webpage based on the target interface of the test server.

[0078] Optionally, the test module 406 further includes an output unit for outputting test results based on the target interface.

[0079] Example 3

[0080] According to another aspect of the present invention, a storage medium is also provided, the storage medium including a stored program, wherein, when the program is running, it controls the device where the storage medium is located to execute any of the above-described web page testing methods.

[0081] Example 4

[0082] According to another aspect of the present invention, a computer terminal is also provided, including: a processor and a memory, wherein the processor is configured to run a program stored in the memory, wherein the program executes any of the above-described webpage testing methods during runtime.

[0083] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0084] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0085] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0086] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0087] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0088] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0089] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A webpage testing method, characterized in that, include: Obtain the proxy service configuration and test case script of the target webpage. The proxy service configuration is used to determine the target server pointed to by the test server. The proxy service configuration is used to represent the network address of the proxy service tool. The test server is used to test the target webpage. The target server is used to provide the running environment for the test process. The test case script is the test script of the end-to-end automated testing tool. Based on the proxy service configuration, the proxy service tool is started on the test server to generate a proxy service. The proxy service is used to send a request to the target server and use the target server's runtime environment to provide the runtime environment required by the target webpage for the testing process on the test server. The target webpage is tested based on the proxy service and the test case script to obtain test results, wherein the test results are used to indicate whether the webpage functions of the target webpage are normal; The process of obtaining the test case script includes: analyzing the target webpage to determine the attribute information of the target webpage, wherein the attribute information includes at least one of the following: the data type of the target webpage, the operating environment of the target webpage, and the number of views of the target webpage; determining the required operating environment of the target webpage based on the attribute information; and determining the test case script based on the required operating environment of the target webpage. The process of testing the target webpage based on the proxy service and the test case script to obtain test results includes: starting the end-to-end automated testing tool on the test server based on the test case script to generate a test service; generating a simulated browser on the test server based on the test service, wherein the simulated browser represents an application for retrieving, displaying, and transmitting network information resources, and the simulated browser exists on the test server to provide a display platform for the target webpage; testing the target webpage in the simulated browser to generate a test request; and processing the test request based on the proxy service to obtain the test results.

2. The method according to claim 1, characterized in that, The test request is processed based on the proxy service to obtain the test result, including: The test request is processed on the target server by the proxy service to obtain the test result.

3. The method according to claim 1, characterized in that, Obtain the proxy service configuration and test case scripts for the target webpage, including: Based on the target interface of the test server, obtain the proxy service configuration and test case scripts of the target webpage.

4. The method according to claim 3, characterized in that, After testing the target webpage based on the proxy service and the test case script, and obtaining the test results, the method further includes: The test results are output based on the target interface.

5. A webpage testing device, characterized in that, include: The acquisition module is used to acquire the proxy service configuration and test case script of the target webpage. The proxy service configuration is used to determine the target server pointed to by the test server and represents the network address of the proxy service tool. The test server is used to test the target webpage and provides the running environment for the test process. The test case script is the test script of the end-to-end automated testing tool. The startup module is used to start the proxy service tool in the test server based on the proxy service configuration and generate a proxy service. The proxy service is used to send a request to the target server and use the target server's runtime environment to provide the runtime environment required by the target webpage for the test process in the test server. The testing module is used to test the target webpage based on the proxy service and the test case script, and obtain test results, wherein the test results are used to indicate whether the webpage functions of the target webpage are normal; The acquisition module is further configured to analyze the target webpage, determine the attribute information of the target webpage, wherein the attribute information includes at least one of the following: the data type of the target webpage, the operating environment of the target webpage, and the number of views of the target webpage; determine the required operating environment of the target webpage based on the attribute information; and determine the test case script based on the required operating environment of the target webpage. The testing module is further configured to: launch the end-to-end automated testing tool on the test server based on the test case script, generating a test service; generate a simulated browser on the test server based on the test service, wherein the simulated browser represents an application for retrieving, displaying, and transmitting network information resources, and the simulated browser exists on the test server, providing a display platform for the target webpage; test the target webpage in the simulated browser, generating a test request; and process the test request based on the proxy service to obtain the test result.

6. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to execute any one of the webpage testing methods of claims 1 to 4.

7. A computer terminal, characterized in that, include: A processor and a memory, the processor being configured to run a program stored in the memory, wherein the program, when running, executes the webpage testing method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • Testing method and testing device of dynamic page and storage medium

    CN107133180A