A data processing method and device for webpage testing, a terminal device and a medium

By receiving user instructions to generate test cases and executing them automatically, the problem of low efficiency in web page testing is solved, achieving efficient and accurate web page testing.

CN116010266BActive Publication Date: 2026-02-13HAOYUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211703395.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-27
Publication Date
2026-02-13
Estimated Expiration
2042-12-27

AI Technical Summary

Technical Problem

Current technologies for web page testing are inefficient, and manually designed test items have a high error rate, resulting in low testing efficiency.

Method used

By receiving the user's test creation command, generating a recording start command, controlling the test tool to record the user's operation behavior, obtaining web page path data and matching process nodes in the node database, generating test cases and executing the test through the browser.

Benefits of technology

It automates web page testing, improves testing efficiency, reduces labor costs, and enhances the accuracy and efficiency of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116010266B_ABST
    Figure CN116010266B_ABST
Patent Text Reader

Abstract

The application discloses a webpage test data processing method and device, terminal equipment and medium, through receiving the test creation instruction of the target project sent by the user, the test creation instruction is judged: if it is the first test creation process, the recording of the user operation behavior is controlled by the preset test tool, and the first test process fed back by the preset test tool is received; if it is the second test creation process, the path data of the target project corresponding webpage is acquired, the process node corresponding to the target project is called in the preset node database according to the category of the target project, and the second test process is generated according to the path data and the process node; according to the first test process and the second test process, the test case corresponding to the target project is generated, and the test case is executed through the browser to obtain the test result. The application generates the test process through different test creation instructions, realizes the automatic test of the webpage test, and improves the test efficiency of the webpage test.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of electric data processing, and in particular to a webpage test data processing method and device, terminal equipment and medium. BACKGROUND

[0002] A webpage is an important application of front-end technology. For a developed webpage, users need to perform webpage tests of different projects to determine the usability of the webpage.

[0003] Webpage tests often require users to test each node according to corresponding projects. Current technical personnel often manually design test projects to test nodes, which has a high error rate and low efficiency.

[0004] Therefore, there is an urgent need for webpage test data processing strategies to solve the current low efficiency of webpage tests. SUMMARY

[0005] The embodiments of the present application provide a webpage test data processing method, device, terminal equipment and medium to improve the efficiency of webpage tests.

[0006] To solve the above problems, an embodiment of the present application provides a webpage test data processing method, comprising:

[0007] Obtain a test creation instruction of a target project sent by a user, and perform an instruction recognition operation on the test creation instruction; wherein the test creation instruction comprises a first test creation process and a second test creation process;

[0008] When the test creation instruction is the first test creation process, a recording start instruction is generated, the recording start instruction is transmitted to a preset test tool, so that the preset test tool records user operation behaviors according to the recording start instruction, and a first test process fed back by the preset test tool is received; wherein the user operation behaviors correspond to the target project;

[0009] When the test creation instruction is the second test creation process, path data of a webpage corresponding to the target project is obtained, process nodes corresponding to the target project are matched in a preset node database according to the type of the target project, and a second test process is generated based on the path data and the process nodes;

[0010] According to the first test process and the second test process, a test case corresponding to the target project is generated, the test case is transmitted to a browser, so that the browser performs a test according to the test case, and a test result fed back by the browser is received.

[0011] Further, the application creates test procedures based on different methods, can meet the needs of different test environments, the first test procedure can be applied to the test process of all process operations, the second test procedure can be applied to the test process with data input, can quickly generate test cases for different test environments, thereby further improving the efficiency of webpage testing.

[0012] As an improvement of the above-mentioned scheme, the preset test tool records the user operation behavior according to the recording start instruction, specifically:

[0013] After the preset test tool receives the recording start instruction, the plug-in recording function is started, so that the preset test tool collects the operation data corresponding to the user's operation on the target project corresponding webpage;

[0014] According to the operation data, a first test procedure is generated.

[0015] As an improvement of the above-mentioned scheme, the path data of the target project corresponding webpage is obtained, the flow node corresponding to the target project is matched in the preset node database according to the type of the target project, and the second test procedure is generated based on the path data and the flow node, specifically:

[0016] The path data of the target project corresponding webpage is obtained by the preset test tool through the plug-in collection function;

[0017] According to the type of the target project, the target project corresponding flow node is matched in the preset node database, and the pre-stored flow node data with a matching degree greater than a matching threshold is extracted as the flow node corresponding to the target project;

[0018] The path data is substituted into the flow node to obtain the second test procedure.

[0019] As an improvement of the above-mentioned scheme, after the test result fed back by the browser is received, it further includes:

[0020] The page path and page element of the test result fed back by the browser are judged by a preset assertion item;

[0021] If the page element corresponding to the page path is consistent with the preset assertion item, it is judged that the test result is test failure;

[0022] If the page element corresponding to the page path is inconsistent with the preset assertion item, it is judged that the test result is test success.

[0023] Correspondingly, the embodiment of the present application also provides a data processing device for webpage testing, comprising: a data acquisition module, a first flow creation module, a second flow creation module and a result generation module.

[0024] The data acquisition module is used for acquiring a test creation instruction of a target item sent by a user and performing instruction recognition operation on the test creation instruction; wherein the test creation instruction comprises a first test creation flow and a second test creation flow.

[0025] The first flow creation module is used for generating a recording start instruction when the test creation instruction is the first test creation flow, transmitting the recording start instruction to a preset test tool, so that the preset test tool records user operation behavior according to the recording start instruction, and receiving a first test flow fed back by the preset test tool; wherein the user operation behavior corresponds to the target item.

[0026] The second flow creation module is used for acquiring path data of a webpage corresponding to the target item when the test creation instruction is the second test creation flow, matching a flow node corresponding to the target item in a preset node database according to the type of the target item, and generating a second test flow based on the path data and the flow node.

[0027] The result generation module is used for generating a test case corresponding to the target item according to the first test flow and the second test flow, transmitting the test case to a browser, so that the browser tests according to the test case, and receiving a test result fed back by the browser.

[0028] As an improvement of the above scheme, the preset test tool records user operation behavior according to the recording start instruction, specifically:

[0029] After the preset test tool receives the recording start instruction, the plug-in recording function is started, so that the preset test tool collects operation data corresponding to the operation of the user on the webpage corresponding to the target item.

[0030] The first test flow is generated according to the operation data.

[0031] As an improvement of the above scheme, the path data of the webpage corresponding to the target item is acquired, the flow node corresponding to the target item is matched in the preset node database according to the type of the target item, and the second test flow is generated based on the path data and the flow node, specifically:

[0032] The path data of the webpage corresponding to the target item is acquired by the preset test tool through the plug-in collection function.

[0033] According to the kind of the target item, the matching of the target item corresponding process node is performed in the preset node database, and the pre-stored process node data with a matching degree greater than a matching threshold is extracted as the process node corresponding to the target item;

[0034] The path data is substituted into the process node to obtain a second test process.

[0035] As an improvement of the above scheme, after the test result fed back by the browser is received, the method further comprises:

[0036] The page path and the page element of the test result fed back by the browser are judged through a preset assertion item;

[0037] If the page element corresponding to the page path is consistent with the preset assertion item, it is judged that the test result is a test failure;

[0038] If the page element corresponding to the page path is inconsistent with the preset assertion item, it is judged that the test result is a test success.

[0039] Correspondingly, an embodiment of the present application further provides a computer terminal device, including a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, and the processor executes the computer program to realize the data processing method for webpage testing.

[0040] Correspondingly, an embodiment of the present application further provides a computer readable storage medium, including a stored computer program, wherein the computer program controls the device where the computer readable storage medium is located to execute the data processing method for webpage testing when the computer program runs.

[0041] From the above, the present application has the following beneficial effects:

[0042] The application provides a data processing method for webpage testing, which comprises the following steps: receiving a test creation instruction of a target project sent by a user, and judging the test creation instruction; if the test creation instruction is a first test creation process, controlling a preset test tool to record user operation behaviors, and receiving a first test process fed back by the preset test tool; if the test creation instruction is a second test creation process, first acquiring path data of a webpage corresponding to the target project, then according to the type of the target project, calling a process node corresponding to the target project in a preset node database, and generating a second test process according to the path data and the process node; generating a test case corresponding to the target project according to the obtained first test process and the second test process, and executing the test case through a browser to obtain a test result. The application generates a test process through different test creation instructions, realizes automatic testing of webpage testing, and improves the test efficiency of webpage testing. BRIEF DESCRIPTION OF DRAWINGS

[0043] Figure 1 is a flowchart of a data processing method for webpage testing provided by an embodiment of the application;

[0044] Figure 2 is a structural diagram of a data processing device for webpage testing provided by an embodiment of the application;

[0045] Figure 3 is a structural diagram of a terminal device provided by an embodiment of the application. DETAILED DESCRIPTION

[0046] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the application.

[0047] Embodiment one

[0048] Reference Figure 1 , Figure 1 is a flowchart of a data processing method for webpage testing provided by an embodiment of the application, as shown in the figure, the embodiment comprises steps 101 to 104, and each step is specifically as follows: Figure 1

[0049] Step 101: acquiring a test creation instruction of a target project sent by a user, and performing instruction recognition operation on the test creation instruction; wherein the test creation instruction comprises a first test creation process and a second test creation process.

[0050] ​Step 102: when the test creation instruction is a first test creation process, a recording start instruction is generated, the recording start instruction is transmitted to a preset test tool, the preset test tool records a user operation behavior according to the recording start instruction, and a first test process fed back by the preset test tool is received; the user operation behavior corresponds to the target project.

[0051] In the embodiment, the preset test tool records the user operation behavior according to the recording start instruction, specifically:

[0052] After the preset test tool receives the recording start instruction, a plug-in recording function is started, so that the preset test tool collects operation data corresponding to user operations on a target project corresponding webpage;

[0053] According to the operation data, a first test process is generated.

[0054] In a specific embodiment, after the recording start instruction is generated, the preset automatic test tool performs target project corresponding webpage operation recording through a chrome plug-in recording function, the user operates on the test page, and the tool records the user operation behavior; after the user operation completion point is saved, the automatic test tool responds to the user saving operation to form a test process.

[0055] Step 103: when the test creation instruction is a second test creation process, path data of a target project corresponding webpage is obtained, process nodes corresponding to the target project are matched in a preset node database according to the type of the target project, and a second test process is generated based on the path data and the process nodes.

[0056] In a specific embodiment, the preset node database is configured with a plurality of process node actions and contents in advance for each test environment, and the path data of the webpage is set to empty, and the name of each test environment is used as the index of the database;

[0057] The type of the target project and the index of the database are matched, and when the matching degree is greater than 95% (i.e., the matching threshold value of the present application, which can be adjusted according to user requirements), the matching is successful; when the type of the target project and the index of the database are matched successfully, the actions and contents of the process nodes of the test environment corresponding to the index are extracted, and the path data of the target project obtained is filled into the path data corresponding to the process nodes, thereby generating a second test process, and the browser can perform actions and input contents on the webpage according to the second test process.

[0058] In the embodiment, the path data of the target item corresponding webpage is acquired, the process node corresponding to the target item is matched in the preset node database according to the category of the target item, and the second test process is generated based on the path data and the process node, specifically as follows:

[0059] The path data of the target item corresponding webpage is acquired by the plug-in collection function of the preset test tool;

[0060] The process node corresponding to the target item is matched in the preset node database according to the category of the target item, and the process node data with a matching degree greater than a matching threshold is extracted as the process node corresponding to the target item;

[0061] The path data is substituted into the process node to obtain the second test process.

[0062] In a specific embodiment, the test process is created by using an API interface for creating a test process through an http request, and the Xpath or fullXpath of the page element node is acquired through the chrome plug-in of the automatic test tool (wherein the Xpath and fullXpath are the path data of the application, and are used to identify the current element dom node; the acquisition of the Xpath and fullXpath is a function provided by the browser right-click dom node, and the automatic test tool plug-in analyzes the element node through internal js logic processing to construct the available Xpath or fullXpath); according to the test scene and the test condition, the actions of different nodes are configured, such as a click action and a jump action.

[0063] In a specific embodiment, in order to better illustrate the generation of the first test process, please refer to the following example:

[0064] The target item is a login verification module, and the target item is matched in the preset node database through the login verification of the target item to obtain four elements (account input, password input, login button click and test result judgment) required by the target item, so that the user needs to configure four test process nodes;

[0065] The account input node needs to configure three attribute information, the first one is the xpath or fullxpath of the login input box, the second one is the action of “text input”, and the third one is the input value;

[0066] The password input node needs three attribute information, which is the same as the account input node;

[0067] Login button click node: the xpath or fullxpath of the button, the action of "click", and 2 attribute information;

[0068] Test result judgment: current front-end page: after the button is clicked, the username and password are transmitted to the background through the interface for verification. If the verification fails, an error message will appear on the front-end interface. If the verification is successful, the page will jump. At this time, the node "assert whether the login is successful" can be configured with the xpath of the "error information prompt box" and the action of "whether the page element exists" to judge whether the login is successful. If the prompt box appears, it means the login fails. If it does not appear, the login is successful.

[0069] Step 104: According to the first test flow and the second test flow, a test case corresponding to the target project is generated, and the test case is transmitted to the browser, so that the browser performs testing according to the test case, and receives the test result fed back by the browser.

[0070] In a specific embodiment, a plurality of test flows form a test case, and the test case is executed by using an automatic plug-in of the browser. The test case is automatically run and feeds back the result and the assertion.

[0071] In this embodiment, after receiving the test result fed back by the browser, the following steps are further included:

[0072] The page path and the page element of the test result fed back by the browser are judged by a preset assertion item;

[0073] If the page element corresponding to the page path is consistent with the preset assertion item, it is judged that the test result is a test failure;

[0074] If the page element corresponding to the page path is inconsistent with the preset assertion item, it is judged that the test result is a test success.

[0075] The embodiment receives a test creation instruction of a target project sent by a user, and judges the test creation instruction: if the test creation instruction is a first test creation process, a preset test tool is controlled to record a user operation behavior, and a first test process fed back by the preset test tool is received; if the test creation instruction is a second test creation process, path data of a webpage corresponding to the target project is acquired first, and then a process node corresponding to the target project is called in a preset node database according to a category of the target project, and a second test process is generated according to the path data and the process node; a test case corresponding to the target project is generated according to the obtained first test process and the second test process, and the test case is executed through a browser to obtain a test result. The test case configured in the embodiment does not need manual intervention during testing, saves labor cost, and the user can record the test process while operating, which is convenient for making a test case.

[0076] Embodiment two

[0077] Referring to Figure 2 , Figure 2 is a structural schematic diagram of a data processing device for webpage testing provided by an embodiment of the application, comprising a data acquisition module 201, a first process creation module 202, a second process creation module 203 and a result generation module 204.

[0078] The data acquisition module 201 is configured to acquire a test creation instruction of a target project sent by a user, and perform an instruction recognition operation on the test creation instruction; wherein the test creation instruction comprises a first test creation process and a second test creation process.

[0079] The first process creation module 202 is configured to, when the test creation instruction is the first test creation process, generate a recording start instruction, and transmit the recording start instruction to a preset test tool, so that the preset test tool records a user operation behavior according to the recording start instruction, and receives a first test process fed back by the preset test tool; wherein the user operation behavior corresponds to the target project.

[0080] The second process creation module 203 is configured to, when the test creation instruction is the second test creation process, acquire path data of a webpage corresponding to the target project, match a process node corresponding to the target project in a preset node database according to a category of the target project, and generate a second test process based on the path data and the process node.

[0081] The result generation module 204 is configured to generate a test case corresponding to the target project according to the first test process and the second test process, transmit the test case to the browser, so that the browser performs a test according to the test case, and receive a test result fed back by the browser.

[0082] As an improvement of the above scheme, the preset test tool records the user operation behavior according to the recording start instruction, and specifically:

[0083] After receiving the recording start instruction, the preset test tool starts the plug-in recording function, so that the preset test tool collects operation data corresponding to the operation of the user on the webpage corresponding to the target project.

[0084] According to the operation data, a first test process is generated.

[0085] As an improvement of the above scheme, the path data of the webpage corresponding to the target project is obtained, the process nodes corresponding to the target project are matched in the preset node database according to the type of the target project, and the second test process is generated based on the path data and the process nodes, and specifically:

[0086] The path data of the webpage corresponding to the target project is obtained by the preset test tool through the plug-in collection function;

[0087] According to the type of the target project, the matching of the process nodes corresponding to the target project is performed in the preset node database, and the pre-stored process node data with a matching degree greater than a matching threshold is extracted as the process node corresponding to the target project;

[0088] The path data is substituted into the process node to obtain the second test process.

[0089] As an improvement of the above scheme, after receiving the test result fed back by the browser, the method further comprises:

[0090] The page path and the page element of the test result fed back by the browser are judged through a preset assertion item;

[0091] If the page element corresponding to the page path is consistent with the preset assertion item, it is judged that the test result is a test failure;

[0092] If the page element corresponding to the page path is inconsistent with the preset assertion item, it is judged that the test result is a test success.

[0093] The embodiment obtains the test creation instruction of the target project sent by the user through the data acquisition module, and performs instruction judgment on the test creation instruction: if the test creation instruction is the first test creation instruction, a first test flow is generated through a first flow creation module; if the test creation instruction is the second test creation instruction, a second test flow is generated through a second flow creation module; and a test case is generated according to the first test flow and the second test flow through a result generation module, so that the browser performs testing based on the generated test case, and obtains a test result. The embodiment generates a test flow through different test creation instructions, realizes the automatic testing of the webpage testing, and improves the test efficiency of the webpage testing.

[0094] Embodiment three

[0095] Reference is made to Figure 3 , Figure 3 is a schematic diagram of a terminal device structure provided by an embodiment of the present application.

[0096] The terminal device of the embodiment includes a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. The processor 301 implements the steps of the data processing method for webpage testing in the embodiment when executing the computer program, for example, all the steps of the data processing method for webpage testing shown in the embodiment. Alternatively, the processor implements the functions of the modules in the various device embodiments when executing the computer program, for example, all the modules of the data processing device for webpage testing shown in the embodiment. Figure 1 Figure 2

[0097] In addition, the embodiment of the present application further provides a computer readable storage medium, which includes a stored computer program, wherein when the computer program runs, the device where the computer readable storage medium is located performs the data processing method for webpage testing according to any one of the above embodiments.

[0098] Those skilled in the art can understand that the schematic diagram is only an example of the terminal device and does not limit the terminal device, which can include more or fewer components than the diagram, or combine certain components, or different components, for example, the terminal device can also include an input and output device, a network access device, a bus, etc.

[0099] ​​The processor 301 can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The processor 301 is a control center of the terminal device, and is connected with various parts of the terminal device through various interfaces and lines.

[0100] The memory 302 can be used to store computer programs and / or modules, and the processor 301 realizes various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling data stored in the memory 302. The memory 302 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc.; and the data storage area can store data created according to use of the terminal device (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a nonvolatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash storage device, or other volatile solid-state storage device.

[0101] The modules / units integrated in the terminal device, if in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware. The computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0102] It should be noted that the above-described device embodiments are only schematic, and the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. In addition, the connection relationship between the modules in the device embodiment provided by the present application indicates that there is a communication connection between them, which can be realized as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor.

[0103] The above is the preferred embodiment of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which are also considered within the scope of protection of the present application.

Claims

1. A data processing method of web page testing, characterized by, The method comprises the following steps: obtaining a test creation instruction of a target item sent by a user, and performing an instruction recognition operation on the test creation instruction; wherein the test creation instruction comprises a first test creation process and a second test creation process; when the test creation instruction is the first test creation process, a recording starting instruction is generated, the recording starting instruction is transmitted to a preset test tool, so that the preset test tool records a user operation behavior according to the recording starting instruction, and a first test process fed back by the preset test tool is received; wherein the user operation behavior corresponds to the target item; when the test creation instruction is the second test creation process, path data of a webpage corresponding to the target item is obtained, a process node corresponding to the target item is matched in a preset node database according to the type of the target item, and a second test process is generated based on the path data and the process node; wherein the path data of the webpage corresponding to the target item is obtained, the process node corresponding to the target item is matched in the preset node database according to the type of the target item, and the second test process is generated based on the path data and the process node, specifically as follows: the path data of the webpage corresponding to the target item is obtained by the preset test tool through a plug-in collection function; the process node corresponding to the target item is matched in the preset node database according to the type of the target item, and the pre-stored process node data with a matching degree greater than a matching threshold is extracted as the process node corresponding to the target item; the path data is substituted into the process node to obtain the second test process; a test case corresponding to the target item is generated according to the first test process and the second test process, the test case is transmitted to a browser, so that the browser performs a test according to the test case, and a test result fed back by the browser is received.

2. The data processing method of web page testing according to claim 1, characterized in that, The preset test tool records the user operation behavior according to the recording starting instruction, specifically as follows: after the preset test tool receives the recording starting instruction, a plug-in recording function is started, so that the preset test tool collects operation data corresponding to the operation of the user on the webpage corresponding to the target item; a first test process is generated according to the operation data.

3. The data processing method of web page testing according to claim 1, wherein, After the test result fed back by the browser is received, the following steps are further included: the page path and the page element of the test result fed back by the browser are judged through a preset assertion item; if the page element corresponding to the page path is consistent with the preset assertion item, it is judged that the test result is a test failure; if the page element corresponding to the page path is inconsistent with the preset assertion item, it is judged that the test result is a test success.

4. A data processing apparatus of web page testing, characterized by, The method comprises the following steps: a data acquisition module, a first process creation module, a second process creation module and a result generation module; the data acquisition module is used for obtaining a test creation instruction of a target item sent by a user, and performing an instruction recognition operation on the test creation instruction; wherein the test creation instruction comprises a first test creation process and a second test creation process; The first flow creation module is configured to, when the test creation instruction is a first test creation flow, generate a recording start instruction, transmit the recording start instruction to a preset test tool, and enable the preset test tool to record user operation behavior according to the recording start instruction and receive a first test flow fed back by the preset test tool, wherein the user operation behavior corresponds to the target project. The second flow creation module is configured to, when the test creation instruction is a second test creation flow, acquire path data of a webpage corresponding to the target project, match a flow node corresponding to the target project in a preset node database according to the type of the target project, and generate a second test flow based on the path data and the flow node, wherein the acquisition of the path data of the webpage corresponding to the target project, the matching of the flow node corresponding to the target project in the preset node database according to the type of the target project, and the generation of the second test flow based on the path data and the flow node are specifically as follows: receiving path data of the webpage corresponding to the target project acquired by the preset test tool through a plug-in collection function; matching the flow node corresponding to the target project in the preset node database according to the type of the target project, and extracting pre-stored flow node data with a matching degree greater than a matching threshold as the flow node corresponding to the target project; and substituting the path data into the flow node to obtain the second test flow. The result generation module is configured to generate a test case corresponding to the target project according to the first test flow and the second test flow, transmit the test case to a browser, enable the browser to perform a test according to the test case, and receive a test result fed back by the browser.

5. The data processing apparatus for web page testing according to claim 4, wherein, The preset test tool records user operation behavior according to the recording start instruction, and the recording of the user operation behavior is specifically as follows: After receiving the recording start instruction, the preset test tool starts a plug-in recording function to enable the preset test tool to collect operation data corresponding to user operations on the webpage corresponding to the target project. The preset test tool generates a first test flow according to the operation data.

6. The data processing apparatus of web page testing according to claim 4, wherein, After receiving the test result fed back by the browser, the method further includes the following steps: judging a page path and a page element of the test result fed back by the browser through a preset assertion item; if the page element corresponding to the page path is consistent with the preset assertion item, determining that the test result is a test failure; if the page element corresponding to the page path is inconsistent with the preset assertion item, determining that the test result is a test success.

7. A computer terminal device, characterized by A computer readable storage medium includes a stored computer program, wherein the computer readable storage medium controls a device where the computer readable storage medium is located to perform the data processing method of the web page test according to any one of claims 1 to 3 when the computer program runs.

8. A computer-readable storage medium, characterized in that, A computer readable storage medium includes a stored computer program, wherein the computer readable storage medium controls a device where the computer readable storage medium is located to perform the data processing method of the web page test according to any one of claims 1 to 3 when the computer program runs.

Citation Information

Patent Citations

  • Test method and related device

    CN111352844A

  • Automatic generation method and device of test case, equipment and medium

    CN114721964A