A system testing method, device, electronic equipment and storage medium

By acquiring the position and language information of text and controls on the page under test, and using a neural network model to determine the adaptation value, the system can automatically match and fill in the execution command, thus solving the problems of long system testing time and high cost and achieving efficient system testing.

CN115878469BActive Publication Date: 2026-05-05DASHANGSUO FEITAI TESTING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DASHANGSUO FEITAI TESTING TECH CO LTD
Filing Date
2022-12-12
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In existing technologies, system testing is time-consuming and costly, especially in specialized fields such as finance and government, where frequent system iterations lead to high testing costs.

Method used

By acquiring the positional information, XML path information, and language information of the text and controls on the page under test, a trained neural network model is used to determine the adaptation values ​​of the text and controls, automatically matching and filling in the execution commands to achieve preliminary testing.

Benefits of technology

It improves the efficiency of system testing, reduces testing costs, simplifies the testing process, and reduces the burden of manual operation identification and understanding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115878469B_ABST
    Figure CN115878469B_ABST
Patent Text Reader

Abstract

This application discloses a system testing method, apparatus, electronic device, and storage medium to improve the efficiency of system testing and reduce testing costs. In response to a trigger operation on a page under test, this application acquires various texts and controls on the page; for any given text and control, it determines the adaptation value between the text and the control; using a trained neural network, based on the adaptation values ​​of each text and control, it determines the target control corresponding to each text; it then fills the corresponding target control with the language information of each text in the received execution command; successful filling indicates a preliminary successful test of the page under test. By acquiring the position information, XML path information, and corresponding language information of the text and controls, determining the adaptation value between the text and control, and then determining the target control corresponding to each text based on the adaptation value, this method is simple and easy to implement, thereby improving the efficiency of system testing while reducing system testing costs.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-reference to related applications

[0002] This application claims priority to Chinese Patent Application No. 202211571889.X, filed on December 8, 2022, entitled "A System Testing Method, Apparatus, Electronic Device and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of Internet technology, and in particular to a system testing method, apparatus, electronic device and storage medium. Background Technology

[0004] The rapid development of the internet has intensified industry competition, leading to increasingly frequent software product iterations across various sectors. In certain specialized fields, such as finance and government, the systems they use are characterized by a large user base and a wide-ranging impact. Therefore, after each product iteration, software testing of the new system is essential to ensure its reliability. However, for users, the cost of frequent system testing is extremely high.

[0005] Related technologies use OCR technology to scan the page, locate the position of each text and control, and execute test scripts based on this. However, this method is time-consuming and costly. Summary of the Invention

[0006] The purpose of this application is to provide a system testing method, apparatus, electronic device, and storage medium to improve the efficiency of system testing and reduce the cost of page testing.

[0007] In a first aspect, embodiments of this application provide a system testing method, the method comprising:

[0008] In response to a trigger operation on the corresponding page under test in the system, obtain each text and each control in the page under test;

[0009] For any text and any control on the page to be tested, perform the following: Based on the differences between the position information, XML path information and corresponding language information of the text and the control, determine the adaptation value of the text and the control;

[0010] Based on the adaptation values ​​of each text in the page under test and each control, the target control corresponding to each text is determined.

[0011] The language information corresponding to each text in the received execution command is filled into the corresponding target control.

[0012] If the filling is successful, the preliminary test of the page to be tested is confirmed to be successful.

[0013] In this application, the adaptation values ​​of text and control are determined by obtaining the position information, XML path information and corresponding language information of the text and control in the webpage to be tested, and the target control corresponding to each text is determined based on the adaptation values. This method is simple and easy to implement, and can improve the efficiency of webpage testing while reducing the cost of webpage testing.

[0014] In some possible embodiments, determining the adaptation value between the text and the control based on the differences between the position information, XML path information, and corresponding language information of the text and the control includes:

[0015] Based on the position information of the text and the control respectively, the relative positional relationship between the text and the control is determined;

[0016] Based on the XML path information and language information of the text and the control respectively, the matching degree between the text and the control is determined;

[0017] The relative positional relationship and the matching degree are input into the trained neural network model to obtain the adaptation value between the text and the control.

[0018] In this application, the adaptation value between text and control can be determined by a trained neural network model, which is simple and easy to implement.

[0019] In some possible embodiments, determining the relative positional relationship between the text and the control based on their respective positional information includes:

[0020] Based on the position information of the text, determine the boundary length information of the text; and based on the position information of the control, determine the boundary length information of the control;

[0021] The positional relationship of the text relative to the control is determined based on the difference between the text and the boundary length information of the control when the boundary of the control is taken as a reference; and the positional relationship of the control relative to the text is determined based on the difference between the text and the boundary length information of the control when the boundary of the text is taken as a reference.

[0022] Based on the positional relationship between the control and the text, and the positional relationship between the text and the control, the relative positional relationship between the text and the control is obtained.

[0023] In this embodiment, the relative positional relationship between the text and the control is determined by the boundary information length between the text and the control, thus ensuring the accuracy of the determined relative positional relationship.

[0024] In some possible embodiments, determining the matching degree between the text and the control based on their respective XML path information and language information includes:

[0025] Based on the path separators in the XML path information of the text and the control, the matching degree between the XML path information of the text and the XML path information of the control is determined; and,

[0026] The matching degree between the language information of the text and the language information of the control is determined based on the number of characters in their respective language information.

[0027] In this application, the matching degree between text and control is determined by the matching degree of XML path information between text and control and the matching degree of text, which further ensures the accuracy of the determined matching degree.

[0028] In some possible embodiments, determining the matching degree between the XML path information of the text and the XML path information of the control based on the path separators in their respective XML path information includes:

[0029] Based on the path separator in the XML path information of the text, a text path character sequence is obtained; and based on the path separator in the XML path information of the control, a control path character sequence is obtained.

[0030] The text path characters in the text path character sequence are matched sequentially with the control path characters in the control path character sequence until mismatched text path characters and mismatched control path characters are identified.

[0031] Determine the first number of the text path characters in the text path character sequence following the mismatched text path characters, and determine the second number of the control path characters in the control path character sequence following the mismatched control path characters;

[0032] The matching degree between the XML path information of the text and the XML path information of the control is determined based on the first number, the second number, and the XML path information matching formula.

[0033] In this application, text path characters and control path characters are matched sequentially based on path separators, making the matching degree between the determined text XML path information and the control XML path information more accurate.

[0034] In some possible embodiments, determining the matching degree between the XML path information of the text and the XML path information of the control based on the first number, the second number, and the XML path information matching formula includes:

[0035] Substituting the first number and the second number into a preset XML path information matching formula, the matching degree between the XML path information of the text and the XML path information of the control is obtained; wherein, the XML path information matching formula is:

[0036]

[0037] Among them, the The degree of matching between the XML path information of the text and the XML path information of the control. For the first number, the For the second number, the As the first empirical value, the This is the second experience value.

[0038] In some possible embodiments, determining the matching degree between the language information of the text and the language information of the control based on the number of characters in their respective language information includes:

[0039] Determine the number of identical characters in the language information of the text and the language information of the control;

[0040] Based on the number of identical characters, the number of characters in the language information of the text and the control respectively, and the text matching formula, the matching degree between the language information of the text and the language information of the control is determined.

[0041] In this application, the matching degree between the language information of the text and the language information of the control is determined based on the number of identical characters, making the matching degree between the determined language information of the text and the language information of the control more accurate.

[0042] In some possible embodiments, determining the matching degree between the language information of the text and the language information of the control based on the number of identical characters, the number of characters in the language information of the text and the control respectively, and a text matching formula includes:

[0043] Substituting the number of identical characters and the number of characters in the language information of the text and the control into a preset text matching formula, the matching degree between the language information of the text and the language information of the control is obtained. The text matching formula is:

[0044]

[0045] Among them, the The degree of matching between the language information of the text and the language information of the control, The number of characters in the language information of the text. The number of characters in the language information of the control. The number of identical characters, The length of the text is given. The third experience value, It is the fourth experience value. This is the fifth experience point.

[0046] In some possible embodiments, after determining the matching degree between the text and the control based on their respective Extensible Markup Language (XML) path information and language information, the method further includes:

[0047] Based on the language information of the text, determine the text length value and the text end marker value;

[0048] The step of inputting the relative positional relationship and the matching degree into the trained neural network model to obtain the adaptation value between the text and the control includes:

[0049] The relative position relationship, the matching degree, the text length value, and the text end marker value are input into the trained neural network model to obtain the adaptation value between the text and the control.

[0050] In some possible embodiments, determining the text length value based on the language information of the text includes:

[0051] The text length value is obtained by substituting the text length of the language information into a preset text length value determination formula, wherein the text length value determination formula is:

[0052]

[0053] Among them, the The text length value of the text, the The length of the text is [the length of the text]. The sixth experience value, the It is the seventh experience point. It is the eighth experience point. It is the ninth experience point. The tenth experience point. It is the eleventh experience point, and Greater than .

[0054] In some possible embodiments, determining the text end marker value includes:

[0055] The text end marker value of the text is determined based on the text end marker and the text marker value determination formula, wherein the text marker value determination formula is:

[0056]

[0057] Among them, the The text flag value, the The language information of the text. This is the twelfth experience point. This is the thirteenth experience point.

[0058] In some possible embodiments, the neural network model is determined according to the following method:

[0059] Obtain a positive sample set and a negative sample set; wherein the positive sample set includes at least one pair of matching text and control relative position relationship, matching degree, text length value and text end mark value; the negative sample set includes at least one pair of mismatched text and control relative position relationship, matching degree, text length and text end mark value.

[0060] The samples from the positive sample set and the samples from the negative sample set are input into the initial neural network model. The initial neural network model is trained iteratively until a preset convergence condition is met. The initial neural network model after the iteration ends is taken as the neural network model.

[0061] Secondly, this application also provides a system testing apparatus, the apparatus comprising:

[0062] The acquisition module is used to acquire each text and each control in the page under test in response to a trigger operation for the corresponding page under test in the system.

[0063] The adaptation value determination module is used to perform the following for any text and any control in the page to be tested: based on the differences between the position information, XML path information and corresponding language information of the text and the control, determine the adaptation value of the text and the control;

[0064] The target control determination module is used to determine the target control corresponding to each text based on the adaptation values ​​of each text in the page to be tested and each control.

[0065] The fill module is used to fill the corresponding target controls with the language information corresponding to each text in the received execution command.

[0066] The preliminary test success determination module is used to determine that the preliminary test of the page to be tested was successful if the filling is successful.

[0067] In some possible embodiments, when the adaptation value determination module determines the adaptation value between the text and the control based on the differences between the position information, XML path information, and corresponding language information of the text and the control, it is specifically used for:

[0068] Based on the position information of the text and the control respectively, the relative positional relationship between the text and the control is determined;

[0069] Based on the XML path information and language information of the text and the control respectively, the matching degree between the text and the control is determined;

[0070] Based on the language information of the text, determine the text length value and the text end marker value;

[0071] The relative position relationship, the matching degree, the text length value, and the text end marker value are input into the trained neural network model to obtain the adaptation value between the text and the control.

[0072] In some possible embodiments, when the adaptation value determination module determines the relative positional relationship between the text and the control based on their respective positional information, it is specifically used for:

[0073] Based on the position information of the text, determine the boundary length information of the text; and based on the position information of the control, determine the boundary length information of the control;

[0074] The positional relationship of the text relative to the control is determined based on the difference between the text and the boundary length information of the control when the boundary of the control is taken as a reference; and the positional relationship of the control relative to the text is determined based on the difference between the text and the boundary length information of the control when the boundary of the text is taken as a reference.

[0075] Based on the positional relationship between the control and the text, and the positional relationship between the text and the control, the relative positional relationship between the text and the control is obtained.

[0076] In some possible embodiments, when the adaptation value determination module performs the task of determining the matching degree between the text and the control based on their respective XML path information and language information, it is specifically used for:

[0077] Based on the path separators in the XML path information of the text and the control, the matching degree between the XML path information of the text and the XML path information of the control is determined; and,

[0078] The matching degree between the language information of the text and the language information of the control is determined based on the number of characters in their respective language information.

[0079] In some possible embodiments, when the adaptation value determination module performs the operation of determining the matching degree between the XML path information of the text and the XML path information of the control based on the path separators in the respective XML path information of the text and the control, it is specifically used for:

[0080] Based on the path separator in the XML path information of the text, a text path character sequence is obtained; and based on the path separator in the XML path information of the control, a control path character sequence is obtained.

[0081] The text path characters in the text path character sequence are matched sequentially with the control path characters in the control path character sequence until mismatched text path characters and mismatched control path characters are identified.

[0082] Determine the first number of the text path characters in the text path character sequence following the mismatched text path characters, and determine the second number of the control path characters in the control path character sequence following the mismatched control path characters;

[0083] The matching degree between the XML path information of the text and the XML path information of the control is determined based on the first number, the second number, and the XML path information matching formula.

[0084] In some possible embodiments, when the adaptation value determination module executes the matching formula based on the first number, the second number, and the XML path information to determine the matching degree between the XML path information of the text and the XML path information of the control, it is specifically used for:

[0085] Substituting the first number and the second number into a preset XML path information matching formula, the matching degree between the XML path information of the text and the XML path information of the control is obtained; wherein, the XML path information matching formula is:

[0086]

[0087] Among them, the The degree of matching between the XML path information of the text and the XML path information of the control. For the first number, the For the second number, the As the first empirical value, the This is the second experience value.

[0088] In some possible embodiments, when the adaptation value determination module performs operations on the number of characters in the language information of the text and the control, and determines the matching degree between the language information of the text and the language information of the control, it is specifically used for:

[0089] Determine the number of identical characters in the language information of the text and the language information of the control;

[0090] Based on the number of identical characters, the number of characters in the language information of the text and the control respectively, and the text matching formula, the matching degree between the language information of the text and the language information of the control is determined.

[0091] In some possible embodiments, when the adaptation value determination module performs a text matching formula based on the number of identical characters, the number of characters in the language information of the text and the control, and the text matching formula, it is specifically used for:

[0092] Substituting the number of identical characters and the number of characters in the language information of the text and the control into a preset text matching formula, the matching degree between the language information of the text and the language information of the control is obtained. The text matching formula is:

[0093]

[0094] Among them, the The degree of matching between the language information of the text and the language information of the control, The number of characters in the language information of the text. The number of characters in the language information of the control. The number of identical characters, The length of the text is given. The third experience value, It is the fourth experience value. This is the fifth experience point.

[0095] In some possible embodiments, after the adaptation value determination module performs a process based on the Extensible Markup Language (XML) path information and language information of the text and the control respectively to determine the matching degree between the text and the control, the method further includes:

[0096] Based on the language information of the text, determine the text length value and the text end marker value;

[0097] The step of inputting the relative positional relationship and the matching degree into the trained neural network model to obtain the adaptation value between the text and the control includes:

[0098] The relative position relationship, the matching degree, the text length value, and the text end marker value are input into the trained neural network model to obtain the adaptation value between the text and the control.

[0099] In some possible embodiments, when the adaptation value determination module performs the determination of the text length value based on the language information of the text, it is specifically used for:

[0100] The text length value is obtained by substituting the text length of the language information into a preset text length value determination formula, wherein the text length value determination formula is:

[0101]

[0102] Among them, the The text length value of the text, the The length of the text is [the length of the text]. The sixth experience value, the It is the seventh experience point. It is the eighth experience point. It is the ninth experience point. The tenth experience point. It is the eleventh experience point, and Greater than .

[0103] In some possible embodiments, when the adaptation value determination module performs the function of determining the text end marker value of the text, it is specifically used for:

[0104] The text end marker value of the text is determined based on the text end marker and the text marker value determination formula, wherein the text marker value determination formula is:

[0105]

[0106] Among them, the The text flag value, the The language information of the text. This is the twelfth experience point. This is the thirteenth experience point.

[0107] In some possible embodiments, the neural network model is determined according to the following method:

[0108] Obtain a positive sample set and a negative sample set; wherein the positive sample set includes at least one pair of matching text and control relative position relationship, matching degree, text length value and text end mark value; the negative sample set includes at least one pair of mismatched text and control relative position relationship, matching degree, text length and text end mark value.

[0109] The samples from the positive sample set and the samples from the negative sample set are input into the initial neural network model. The initial neural network model is trained iteratively until a preset convergence condition is met. The initial neural network model after the iteration ends is taken as the neural network model.

[0110] Thirdly, another embodiment of this application also provides an electronic device, including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform any of the methods provided in the first aspect embodiment of this application.

[0111] Fourthly, another embodiment of this application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for causing a computer to perform any of the methods provided in the first aspect of this application.

[0112] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0113] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0114] Figure 1A A webpage illustration illustrating a system testing method provided in an embodiment of this application;

[0115] Figure 1B A schematic diagram of text and controls for a system testing method provided in an embodiment of this application;

[0116] Figure 1C This is a schematic diagram illustrating an application scenario of a system testing method provided in an embodiment of this application.

[0117] Figure 2 This is a schematic diagram of the overall process of a system testing method provided in an embodiment of this application;

[0118] Figure 3 A flowchart illustrating the determination of text and control adaptation values ​​in a system testing method provided in this application embodiment;

[0119] Figure 4 A schematic diagram illustrating the determination of the relative positional relationship between text and controls in a system testing method provided in this application embodiment;

[0120] Figure 5 A schematic diagram illustrating the determination of the first and second parameters in a system testing method provided in this application embodiment;

[0121] Figure 6 A schematic diagram illustrating the determination of the third and fourth parameters in a system testing method provided in this application embodiment;

[0122] Figure 7 A schematic diagram illustrating the determination of the fifth and sixth parameters in a system testing method provided in this application embodiment;

[0123] Figure 8 A schematic diagram illustrating the determination of the seventh and eighth parameters in a system testing method provided in this application embodiment;

[0124] Figure 9 A schematic diagram illustrating the determination of the ninth and tenth parameters in a system testing method provided in this application embodiment;

[0125] Figure 10 A schematic diagram illustrating the determination of the relative positional relationship between text and controls in a system testing method provided in this application embodiment;

[0126] Figure 11 A flowchart illustrating the process of determining the matching degree between the XML path information of text and the XML path information of a control in a system testing method provided in this application embodiment;

[0127] Figure 12 A flowchart illustrating the process of determining the matching degree between the language information of text and the language information of controls in a system testing method provided in this application embodiment;

[0128] Figure 13 This is a schematic diagram of the region division of a system testing method provided in an embodiment of this application;

[0129] Figure 14 A schematic diagram of an apparatus for a system testing method provided in an embodiment of this application;

[0130] Figure 15This is a schematic diagram of an electronic device for a system testing method provided in an embodiment of this application. Detailed Implementation

[0131] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0132] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses. The term "multiple" in this application can mean at least two, for example, two, three, or more, and is not limited by the embodiments of this application.

[0133] To facilitate understanding, the technical terms used in this application will first be explained, such as... Figure 1A As shown:

[0134] Text: Ordinary text in a webpage;

[0135] Controls: Objects on a webpage that users can interact with to input or manipulate data;

[0136] Language information of the text: ordinary text in the text field of the webpage;

[0137] Language information of controls: The default text in objects on a webpage that users can interact with to input or manipulate data.

[0138] The inventors' research revealed that the rapid development of the internet has intensified industry competition, leading to increasingly frequent iterations of software products across various sectors. In certain specialized fields, such as finance and government, the systems they use are characterized by a large number of users and a wide impact. Therefore, after each product iteration, software testing of the new system is essential to ensure its reliability. However, for users, the cost of frequent system testing is extremely high.

[0139] Related technologies employ OCR to scan the page, pinpointing the location of various texts and controls, and then executing test scripts based on this information. However, this method is time-consuming and costly. Especially now that product interfaces are becoming increasingly sophisticated with larger pixel values, scanning a single image still takes milliseconds, hindering rapid script execution.

[0140] As an intelligent testing tool, it should be able to identify more "general" test scripts to minimize the amount of repetitive work for testers. If a testing tool can effectively apply the same batch of test cases to different software or different versions of the same software, the reuse rate of test cases will be greatly improved, and the workload of testers will be reduced.

[0141] In traditional testing, testers write scripts to enable the software under test (SDT) to quickly execute the overall test process. This method greatly leverages the high-speed execution capabilities of computers, but it doesn't allow the testing tools to truly "understand" the business meaning of the various operational controls on the system under test. Compared to computers, manual operation is slower, but has stronger recognition and understanding capabilities. For example: for Figure 1B As shown, technicians can quickly understand that the "phone number" should be entered in the input-1 input box. Therefore, intelligent testing tools should possess this ability to quickly understand the system under test, rather than determining the controls to be operated by clicking pixels or inputting paths. In this way, intelligent testing tools will simultaneously possess the characteristics of fast execution speed and strong recognition and understanding capabilities.

[0142] In the financial sector, the systems used by different organizations have similar business functions, which helps intelligent testing tools reuse test cases on different financial systems under test.

[0143] Therefore, the key to solving the above problems lies in assigning the proper functional meaning to each control in the software under test. When controls such as input and button on a page each have their own meaning, the testing tool can interpret the controls to be operated and the operation content from the user's input test commands. Figure 1BIn the test tool, when the user enters test commands such as "Enter 10086 in the mobile number" or "Mobile number is 10086", the input-1 control will automatically display "10086"; when the user enters "Click to get SMS", the test tool will automatically click the "Get SMS" button on the software under test.

[0144] In view of this, this application proposes a system testing method, apparatus, electronic device, and storage medium to solve the above-mentioned problems. The inventive concept of this application can be summarized as follows: In response to a trigger operation on a page under test, acquire each text and each control in the page under test; for any text and any control in the page under test, execute: determine the adaptation value of the text and control based on the differences between the position information, XML path information, and corresponding language information of the text and control; determine the target control corresponding to each text based on the adaptation value of each text and each control in the page under test; fill the corresponding target control with the language information of each text in the received execution command; if the filling is successful, the preliminary test of the page under test is determined to be successful.

[0145] For ease of understanding, the following detailed description of a system testing method provided in an embodiment of this application, in conjunction with the accompanying drawings, will be provided:

[0146] like Figure 1C The diagram shown illustrates an application scenario of a system testing method according to an embodiment of this application. The diagram includes: a server 10, a storage device 20, and a terminal device 30.

[0147] In response to a trigger operation on the terminal device 30 for the page under test, server 10 obtains each text and each control on the page under test; for any text and any control on the page under test, it executes the following: using a trained neural network stored in memory 20, it determines the adaptation value between the text and control based on the differences between the position information, XML path information, and corresponding language information of the text and control; based on the adaptation values ​​of each text and each control on the page under test, it determines the target control corresponding to each text; it fills the corresponding language information of each text in the received execution command into the corresponding target control; if the filling is successful, it is determined that the preliminary test of the page under test is successful.

[0148] The description in this application details only a single server 10, memory 20, and terminal device 30. However, those skilled in the art should understand that the illustrated server 10, memory 20, and terminal device 30 are intended to illustrate the operation of the server 10, memory 20, and terminal device 30 involved in the technical solution of this application, and do not imply any limitation on the number, type, or location of the server 10, memory 20, and terminal device 30. It should be noted that adding additional modules to or removing individual modules from the illustrated environment will not change the underlying concept of the exemplary embodiments of this application. Furthermore, those skilled in the art will understand that the aforementioned data transmission and reception also need to be implemented through a network.

[0149] It should be noted that the memory in the embodiments of this application can be, for example, a cache system, hard disk storage, memory storage, etc. Furthermore, the system testing method proposed in this application is not only applicable to… Figure 1C The application scenarios shown are also applicable to any device that requires web page testing.

[0150] like Figure 2 The diagram shown is a schematic representation of the overall process of a system testing method provided in an embodiment of this application, wherein:

[0151] In step 201: In response to the trigger operation on the page under test, obtain each text and each control in the page under test;

[0152] In step 202: For any text and any control on the page to be tested, perform the following: Determine the adaptation value of the text and control based on the differences between the position information, XML path information and corresponding language information of the text and control;

[0153] In step 203: Based on the adaptation values ​​of each text and each control in the page to be tested, determine the target control corresponding to each text.

[0154] In step 204: The language information corresponding to each text in the received execution command is filled into the corresponding target control;

[0155] In step 205: If the filling is successful, the preliminary test of the page to be tested is confirmed to be successful.

[0156] For any page to be tested, the functional meaning of its controls comes from the page itself. For example, it can be divided into the following two forms: 1) Text and controls are two different components, such as... Figure 1A 1) The phone number in the control; 2) The text is a property of the control, such as... Figure 1AThe text retrieves SMS messages. For the second type, the functional text of the control can be directly parsed from the interface code; for the first type, the most matching control needs to be selected from all controls on the interface for the text. In this embodiment, to more accurately and reasonably match text and controls, it can be implemented as follows: Figure 3 The steps shown are as follows:

[0157] In step 301: Based on the positional information of the text and the control, determine the relative positional relationship between the text and the control;

[0158] In this application embodiment, to determine the relative positional relationship between text and controls, it can be specifically implemented as follows: Figure 4 The steps shown are as follows:

[0159] In step 401: the boundary length information of the text is determined based on the text's position information; and the boundary length information of the control is determined based on the control's position information.

[0160] In this application, the position information of the text is the coordinate values ​​of the four vertices of the rectangle containing the text. Based on these coordinate values, the boundary length information of the text can be determined, including: the first boundary length, the second boundary length, the third boundary length, and the fourth boundary length. Similarly, the boundary length information of the control can be determined, including: the fifth boundary length, the sixth boundary length, the seventh boundary length, and the eighth boundary length. The first boundary is parallel to the second boundary, the third boundary is parallel to the fourth boundary, and the first boundary is perpendicular to the third boundary; the fifth boundary is parallel to the sixth boundary, the seventh boundary is parallel to the eighth boundary, and the fifth boundary is perpendicular to the seventh boundary. For ease of explanation, the first and fifth boundaries are referred to as the left, the second and sixth boundaries as the right, the third and seventh boundaries as the top, and the fourth and eighth boundaries as the bottom.

[0161] In step 402: the positional relationship of the text relative to the control is determined based on the difference between the text and the control's boundary length information when the control's boundary is used as a reference; and the positional relationship of the control relative to the text is determined based on the difference between the text and the control's boundary length information when the text's boundary is used as a reference.

[0162] In this embodiment of the application, in order to improve the accuracy of matching text and controls, 10 parameter values ​​are set to characterize the relative positional relationship between the text and controls. The 10 parameter values ​​are as follows:

[0163] like Figure 5As shown: the ratio of the width of the text extending beyond the left and right edges of the control to the total width of the text, i.e., the first parameter = l1 / a1; the ratio of the width of the text within the left and right edges of the control to the total width of the control, i.e., the second parameter = l2 / b1; if the text does not extend beyond the left and right edges of the control, then l1 is 0.

[0164] like Figure 6 As shown: the ratio of the width of the control extending beyond the left edge of the text to the total width of the control, i.e., the third parameter = l3 / b1; the ratio of the width of the control extending beyond the right edge of the text to the total width of the control, i.e., the fourth parameter = l4 / b1.

[0165] like Figure 7 As shown: The ratio of the height of the text exceeding the top and bottom edges of the control to the total height of the text, i.e., the fifth parameter = l5 / a2; the ratio of the height of the text not exceeding the top and bottom edges of the control to the total height of the control, i.e., the sixth parameter = l6 / b2.

[0166] like Figure 8 As shown: the ratio of the height of the control extending beyond the bottom edge of the text to the total height of the control, i.e., the seventh parameter = l7 / b2; the ratio of the height of the control extending beyond the top edge of the text to the total height of the control, i.e., the eighth parameter = l8 / b2.

[0167] like Figure 9 As shown: the ratio of the vertical height of the text to the total vertical height of the text control, i.e., the ninth parameter = a2 / b2; the ratio of the horizontal length of the text to the total horizontal length of the text control, i.e., the tenth parameter = a1 / b1.

[0168] In step 403: Based on the positional relationship between the control and the text, and the positional relationship between the text and the control, the relative positional relationship between the text and the control is obtained.

[0169] For example: with Figure 10 For example, the 10 parameter values ​​for the text and control are: l1 / a1, l2 / b1, l3=0, l4 / b1, l6 / b2=a2 / b2, l7=0, l8 / b2, a2 / b2, and a1 / b1.

[0170] In step 302: Based on the XML path information and language information of the text and the control respectively, determine the matching degree between the text and the control;

[0171] In this application, to ensure the accuracy of the matching between the control and the text, the matching degree between the text and the control includes: the matching degree between the XML path information of the text and the XML path information of the control, determined based on the path separator in the XML path information of the text and the control; and the matching degree between the language information of the text and the language information of the control, determined based on the number of characters in the language information of the text and the control.

[0172] In some possible embodiments, determining the matching degree between the XML path information of the text and the XML path information of the control can be implemented as follows: Figure 11 The steps shown are as follows:

[0173] In step 1101: the text path character sequence is obtained based on the path separator in the XML path information of the text; and the control path character sequence is obtained based on the path separator in the XML path information of the control.

[0174] In step 1102: The text path characters in the text path character sequence are matched sequentially with the control path characters in the control path character sequence until mismatched text path characters and mismatched control path characters are identified.

[0175] In step 1103: determine the first number of the text path character following the mismatched text path character in the text path character sequence, and determine the second number of the control path character following the mismatched control path character in the control path character sequence;

[0176] In step 1104: the matching degree between the XML path information of the text and the XML path information of the control is determined based on the first number, the second number and the XML path information matching formula.

[0177] For example, if the XML path information of the text is 123 / 456 / 78 / 9 / 234 and the XML path information of the control is 123 / 456 / 6 / 78 / 12 / 56 / 7, with the path separator being / , then the text path character sequence obtained based on the path separator is: 123, 456, 78, 9, 234, and the control path character sequence is: 123, 456, 6, 78, 12, 56, 7. The text path characters in the text path character sequence are sequentially matched with the control path characters in the control path character sequence. The matched path characters are 123 and 456, and the unmatched text path characters are 78 and 6. Therefore, the first number is determined to be 3 and the second number to be 5. These first and second numbers can then be substituted into a preset XML path information matching formula to obtain the matching degree between the text XML path information and the control XML path information.

[0178] In some possible embodiments, the XML path information matching formula is as shown in Formula 1:

[0179] , (Formula 1)

[0180] in, This refers to the degree of matching between the XML path information of the text and the XML path information of the control. For the first number, For the second number, The first experience value, This is a second empirical value. In the embodiments of this application, based on the experience of those skilled in the art, it can be... Set to 3, Set to 1.

[0181] In some possible embodiments, determining the matching degree between the language information of the text and the language information of the control can be implemented as follows: Figure 12 As shown, where:

[0182] In step 1201: Determine the number of identical characters in the language information of the text and the language information of the control;

[0183] For example, if the language information of the text is 123456 and the language information of the control is 12378945, then the number of identical characters is 3, the number of text characters is 6, and the number of control characters is 8.

[0184] In some other possible embodiments, when determining the number of identical characters in the language information of the text and the language information of the control, it can also be implemented as follows: using the language information of the text as a reference, sequentially traverse the language information of the control. For example: the language information of the text is 1234567932, and the language information of the control is 127894; sequentially perform the following operations on the language information of the control: for the language information 1 of the control, determine that the language information 1 of the text is the same; for the language information 2 of the control, determine that the language information 2 in the text is the same; for the language information 7 of the control, determine that the language information 7 in the text is the same; for the language information 8 of the control, determine that there is no matching language information after 7 in the language information of the text; for the language information 9 of the control, determine that there is a matching language information 9 in the text; for the language information 4 of the control, determine that there is no matching language information after 9 in the text. This completes the process of determining identical characters, and the number of identical characters is determined to be 4.

[0185] In step 1202: Based on the number of identical characters, the number of characters in the language information of the text and the control, and the text matching formula, determine the matching degree between the language information of the text and the language information of the control.

[0186] Specifically, this can be implemented by substituting the number of identical characters and the number of characters in the language information of both the text and the control into a preset text matching formula to obtain the matching degree between the language information of the text and the language information of the control. The text matching formula is shown in Formula 2:

[0187] , (Formula 2)

[0188] in, This refers to the degree of matching between the language information of the text and the language information of the control. The number of characters in the language information of the text. The number of characters in the language information of the control. The number of identical characters, The length of the text. The third experience value, It is the fourth experience value. This is the fifth experience point.

[0189] In the embodiments of this application, based on the experience of those skilled in the art, it can be... Set to 0, Set to 100, Set it to 10.

[0190] In step 303: Based on the language information of the text, determine the text length value and the text end marker value;

[0191] In some possible embodiments, determining the text length value can be implemented by substituting the text length of the language information into a preset text length value determination formula to obtain the text length value, wherein the text length value determination formula is as shown in Formula 3:

[0192] , (Formula 3)

[0193] in, The text length value, l The length of the text. The sixth experience point, It is the seventh experience point. It is the eighth experience point. It is the ninth experience point. The tenth experience point. It is the eleventh experience point, and Greater than .

[0194] In the embodiments of this application, based on the experience of those skilled in the art, it can be... Set to 0, Set to 0.5. Set to 1, Set to 0, Set to 15. Set to 1.

[0195] For example, if the language information of the text is 123456, then the text length is determined to be 6, and the text length value is 1.

[0196] In some other possible embodiments, determining the text end marker value of the text can be implemented as follows: the text end marker value of the text is determined based on the text end marker and a text marker value determination formula, wherein the text marker value determination formula is:

[0197]

[0198] in, For text flag values, For the language information of the text, This is the twelfth experience point. This is the thirteenth experience point.

[0199] In the embodiments of this application, based on the experience of those skilled in the art, it can be... Set to 0, Set to 1.

[0200] For example, if the language information of a text is "123456", then it is determined that the language information of the text does not end with a colon, and the text flag value of the text is 0.

[0201] It should be noted that the condition for determining the text flag value set in this application, "determining whether the language information of the text ends with a colon," is only one embodiment. In specific implementation, those skilled in the art can set the condition for determining the text flag value according to their needs. For example, "determining whether the language information of the text ends with a colon" can be modified to "determining whether the language information of the text ends with a comma," etc. This application does not limit this.

[0202] In step 304: The relative positional relationship, matching degree, text length value, and text end marker value are input into the trained neural network model to obtain the adaptation value between the text and the control.

[0203] In some possible embodiments, the neural network model in this application is a fully connected neural network model. A Softmax activation function is used in the output layer of the neural network. The Softmax activation function can calculate the fit value for each pair of controls and text. For a text to be matched, by matching it with all controls, the fit value matching each control can be obtained, and the control with the highest fit value can be selected as the target control for that text.

[0204] In this embodiment of the application, the neural network model is determined according to the following method:

[0205] Obtain a positive sample set and a negative sample set; wherein the positive sample set includes at least one pair of matching text and control relative position relationship, matching degree, text length value and text end marker value; the negative sample set includes at least one pair of mismatched text and control relative position relationship, matching degree, text length and text end marker value.

[0206] The samples from the positive sample set and the samples from the negative sample set are input into the initial neural network model. The initial neural network model is trained iteratively until the preset convergence condition is met. The initial neural network model after the iteration ends is used as the neural network model.

[0207] In this application, the number of negative samples in the negative sample set is three times the number of positive samples in the positive sample set. When constructing the positive and negative sample sets, open-source methods can be used to obtain data from public web pages and perform manual annotation to obtain the positive and negative sample sets.

[0208] It should be noted that when constructing positive and negative samples in this application, samples of both horizontal and vertical layouts are included. Therefore, even if a page has both horizontal (text on the left or right side of the control) and vertical (text on the top or bottom side of the control) layouts, effective matching can still be performed.

[0209] In this embodiment, the TFLearn framework was used to build, train, and save the neural network model. After numerous trials, the final model-related parameter settings are shown in Table 1.

[0210]

[0211] Table 1

[0212] In other possible embodiments, if there are at least two texts with the same name or two controls with the same name on the same webpage to be tested, in order to prevent the neural network from being unable to distinguish the specific operation object, it is necessary to first divide the text and controls on the webpage to be tested into regions, for example: Figure 13 As shown, the webpage is divided into two parts according to the region, and the above-mentioned system testing method can be used to process each part.

[0213] like Figure 14 As shown, based on the same inventive concept, a webpage testing device 1400 is proposed, the device comprising:

[0214] The acquisition module 14001 is used to acquire each text and each control in the page under test in response to a trigger operation on the page under test;

[0215] The adaptation value determination module 14002 is used to perform the following for any text and any control in the page to be tested: determine the adaptation value between the text and the control based on the differences between the position information, XML path information and corresponding language information of the text and the control;

[0216] The target control determination module 14003 is used to determine the target control corresponding to each text based on the adaptation values ​​of each text in the page to be tested and each control.

[0217] The fill module 14004 is used to fill the language information corresponding to each text in the received execution command into the corresponding target control.

[0218] The module 14005, which determines that the preliminary test of the page to be tested was successful if the filling was successful, is used to confirm that the preliminary test of the page to be tested was successful.

[0219] In some possible embodiments, when the adaptation value determination module 14002 determines the adaptation value between the text and the control based on the differences between the position information, XML path information, and corresponding language information of the text and the control, it is specifically used for:

[0220] Based on the position information of the text and the control respectively, the relative positional relationship between the text and the control is determined;

[0221] Based on the XML path information and language information of the text and the control respectively, the matching degree between the text and the control is determined;

[0222] Based on the language information of the text, determine the text length value and the text end marker value;

[0223] The relative position relationship, the matching degree, the text length value, and the text end marker value are input into the trained neural network model to obtain the adaptation value between the text and the control.

[0224] In some possible embodiments, when the adaptation value determination module 14002 performs the operation of determining the relative positional relationship between the text and the control based on their respective positional information, it is specifically used for:

[0225] Based on the position information of the text, determine the boundary length information of the text; and based on the position information of the control, determine the boundary length information of the control;

[0226] The positional relationship of the text relative to the control is determined based on the difference between the text and the boundary length information of the control when the boundary of the control is taken as a reference; and the positional relationship of the control relative to the text is determined based on the difference between the text and the boundary length information of the control when the boundary of the text is taken as a reference.

[0227] Based on the positional relationship between the control and the text, and the positional relationship between the text and the control, the relative positional relationship between the text and the control is obtained.

[0228] In some possible embodiments, when the adaptation value determination module 14002 performs the task of determining the matching degree between the text and the control based on their respective XML path information and language information, it is specifically used for:

[0229] Based on the path separators in the XML path information of the text and the control, the matching degree between the XML path information of the text and the XML path information of the control is determined; and,

[0230] The matching degree between the language information of the text and the language information of the control is determined based on the number of characters in their respective language information.

[0231] In some possible embodiments, when the adaptation value determination module 14002 performs the task of determining the matching degree between the XML path information of the text and the XML path information of the control based on the path separators in the respective XML path information of the text and the control, it is specifically used for:

[0232] Based on the path separator in the XML path information of the text, a text path character sequence is obtained; and based on the path separator in the XML path information of the control, a control path character sequence is obtained.

[0233] The text path characters in the text path character sequence are matched sequentially with the control path characters in the control path character sequence until mismatched text path characters and mismatched control path characters are identified.

[0234] Determine the first number of the text path characters in the text path character sequence following the mismatched text path characters, and determine the second number of the control path characters in the control path character sequence following the mismatched control path characters;

[0235] The matching degree between the XML path information of the text and the XML path information of the control is determined based on the first number, the second number, and the XML path information matching formula.

[0236] In some possible embodiments, when the adaptation value determination module 14002 executes the matching degree between the XML path information of the text and the XML path information of the control based on the first number, the second number, and the XML path information matching formula, it is specifically used for:

[0237] Substituting the first number and the second number into a preset XML path information matching formula, the matching degree between the XML path information of the text and the XML path information of the control is obtained; wherein, the XML path information matching formula is:

[0238]

[0239] Among them, the The degree of matching between the XML path information of the text and the XML path information of the control. For the first number, the For the second number, the As the first empirical value, the This is the second experience value.

[0240] In some possible embodiments, when the adaptation value determination module 14002 determines the matching degree between the language information of the text and the language information of the control by analyzing the number of characters in their respective language information, it is specifically used for:

[0241] Determine the number of identical characters in the language information of the text and the language information of the control;

[0242] Based on the number of identical characters, the number of characters in the language information of the text and the control respectively, and the text matching formula, the matching degree between the language information of the text and the language information of the control is determined.

[0243] In some possible embodiments, when the adaptation value determination module 14002 executes a text matching formula based on the number of identical characters, the number of characters in the language information of the text and the control, and the text matching formula, it is specifically used for:

[0244] Substituting the number of identical characters and the number of characters in the language information of the text and the control into a preset text matching formula, the matching degree between the language information of the text and the language information of the control is obtained. The text matching formula is:

[0245]

[0246] Among them, the The degree of matching between the language information of the text and the language information of the control, The number of characters in the language information of the text. The number of characters in the language information of the control. The number of identical characters, The length of the text is given. The third experience value, It is the fourth experience value. This is the fifth experience point.

[0247] In some possible embodiments, after the adaptation value determination module performs a process based on the Extensible Markup Language (XML) path information and language information of the text and the control respectively to determine the matching degree between the text and the control, the method further includes:

[0248] Based on the language information of the text, determine the text length value and the text end marker value;

[0249] The step of inputting the relative positional relationship and the matching degree into the trained neural network model to obtain the adaptation value between the text and the control includes:

[0250] The relative position relationship, the matching degree, the text length value, and the text end marker value are input into the trained neural network model to obtain the adaptation value between the text and the control.

[0251] In some possible embodiments, when the adaptation value determination module 14002 executes the language information based on the text to determine the text length value, it is specifically used for:

[0252] The text length value is obtained by substituting the text length of the language information into a preset text length value determination formula, wherein the text length value determination formula is:

[0253]

[0254] Among them, the The text length value of the text, the The length of the text is [the length of the text]. The sixth experience value, the It is the seventh experience point. It is the eighth experience point. It is the ninth experience point. The tenth experience point. It is the eleventh experience point, and Greater than .

[0255] In some possible embodiments, when the adaptation value determination module 14002 performs the function of determining the text end marker value of the text, it is specifically used for:

[0256] The text end marker value of the text is determined based on the text end marker and the text marker value determination formula, wherein the text marker value determination formula is:

[0257]

[0258] Among them, the The text flag value, the The language information of the text. This is the twelfth experience point. This is the thirteenth experience point.

[0259] In some possible embodiments, the neural network model is determined according to the following method:

[0260] Obtain a positive sample set and a negative sample set; wherein the positive sample set includes at least one pair of matching text and control relative position relationship, matching degree, text length value and text end mark value; the negative sample set includes at least one pair of mismatched text and control relative position relationship, matching degree, text length and text end mark value.

[0261] The samples from the positive sample set and the samples from the negative sample set are input into the initial neural network model. The initial neural network model is trained iteratively until a preset convergence condition is met. The initial neural network model after the iteration ends is taken as the neural network model.

[0262] Having introduced the system testing method and apparatus according to exemplary embodiments of this application, we will now introduce an electronic device according to another exemplary embodiment of this application.

[0263] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."

[0264] In some possible implementations, the electronic device according to this application may include at least one processor and at least one memory. The memory stores program code that, when executed by the processor, causes the processor to perform the steps of the system testing methods according to the various exemplary embodiments of this application described above.

[0265] The following reference Figure 15 To describe an electronic device 150 according to this embodiment of the present application. Figure 15 The electronic device 150 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0266] like Figure 15 As shown, the electronic device 150 is presented in the form of a general-purpose electronic device. The components of the electronic device 150 may include, but are not limited to: at least one processor 131, at least one memory 132, and a bus 133 connecting different system components (including memory 132 and processor 131).

[0267] Bus 133 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.

[0268] The memory 132 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1321 and / or cache memory 1322, and may further include read-only memory (ROM) 1323.

[0269] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0270] Electronic device 150 can also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), and with one or more devices that enable a user to interact with electronic device 150, and / or with any device that enables electronic device 150 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 135. Furthermore, electronic device 150 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 136. As shown, network adapter 136 communicates with other modules used by electronic device 150 via bus 133. It should be understood that, although... Figure 15 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 150, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0271] In some possible implementations, various aspects of the system testing method provided in this application can also be implemented in the form of a program product, which includes program code that, when the program product is run on a computer device, causes the computer device to perform the steps in a system testing method according to various exemplary embodiments of this application as described above.

[0272] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0273] The program product for webpage testing according to embodiments of this application can be a portable compact disc read-only memory (CD-ROM) and include program code, and can run on an electronic device. However, the program product of this application is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0274] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take many forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0275] The program code contained on the readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wired, fiber optic, RF, etc., or any suitable combination thereof.

[0276] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's electronic device, partially on the user's device, as a standalone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user's electronic device via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external electronic device (e.g., via the Internet using an Internet service provider).

[0277] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.

[0278] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0279] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0280] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0281] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0282] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0283] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A system testing method, characterized in that, The method includes: In response to a trigger operation on the corresponding page under test in the system, obtain each text and each control in the page under test; For any text and any control on the page to be tested, the following steps are performed: Based on the position information of the text and the control, determine their relative positional relationship; based on the path separators in the XML path information of the text and the control, determine the matching degree between the XML path information of the text and the XML path information of the control; and based on the number of characters in the language information of the text and the control, determine the matching degree between the language information of the text and the language information of the control; input the relative positional relationship and the matching degree into a trained neural network model to obtain the adaptation value between the text and the control. Based on the adaptation values ​​of each text in the page under test and each control, the target control corresponding to each text is determined. The language information corresponding to each text in the received execution command is filled into the corresponding target control. If the filling is successful, the preliminary test of the page to be tested is confirmed to be successful.

2. The method according to claim 1, characterized in that, Determining the relative positional relationship between the text and the control based on their respective positional information includes: Based on the position information of the text, determine the boundary length information of the text; and based on the position information of the control, determine the boundary length information of the control; The positional relationship of the text relative to the control is determined based on the difference between the text and the boundary length information of the control when the boundary of the control is taken as a reference; and the positional relationship of the control relative to the text is determined based on the difference between the text and the boundary length information of the control when the boundary of the text is taken as a reference. Based on the positional relationship between the control and the text, and the positional relationship between the text and the control, the relative positional relationship between the text and the control is obtained.

3. The method according to claim 1, characterized in that, Determining the matching degree between the XML path information of the text and the XML path information of the control based on the path separators in their respective XML path information includes: Based on the path separator in the XML path information of the text, a text path character sequence is obtained; and based on the path separator in the XML path information of the control, a control path character sequence is obtained. The text path characters in the text path character sequence are matched sequentially with the control path characters in the control path character sequence until mismatched text path characters and mismatched control path characters are identified. Determine the first number of the text path characters in the text path character sequence following the mismatched text path characters, and determine the second number of the control path characters in the control path character sequence following the mismatched control path characters; The matching degree between the XML path information of the text and the XML path information of the control is determined based on the first number, the second number, and the XML path information matching formula.

4. The method according to claim 1, characterized in that, Determining the matching degree between the language information of the text and the language information of the control based on the number of characters in their respective language information includes: Determine the number of identical characters in the language information of the text and the language information of the control; Based on the number of identical characters, the number of characters in the language information of the text and the control respectively, and the text matching formula, the matching degree between the language information of the text and the language information of the control is determined.

5. The method according to claim 1, characterized in that, After determining the matching degree between the text and the control based on their respective Extensible Markup Language (XML) path information and language information, the method further includes: Based on the language information of the text, determine the text length value and the text end marker value; The step of inputting the relative positional relationship and the matching degree into the trained neural network model to obtain the adaptation value between the text and the control includes: The relative position relationship, the matching degree, the text length value, and the text end marker value are input into the trained neural network model to obtain the adaptation value between the text and the control.

6. A system testing device, characterized in that, The device includes: The acquisition module is used to acquire each text and each control in the page under test in response to a trigger operation for the corresponding page under test in the system. The adaptation value determination module is used to perform the following steps for any text and any control on the page under test: determining the relative positional relationship between the text and the control based on their respective positional information; determining the matching degree between the XML path information of the text and the XML path information of the control based on the path separators in their respective XML path information; and determining the matching degree between the language information of the text and the language information of the control based on the number of characters in their respective language information; inputting the relative positional relationship and the matching degree into a trained neural network model to obtain the adaptation value between the text and the control. The target control determination module is used to determine the target control corresponding to each text based on the adaptation values ​​of each text in the page to be tested and each control. The fill module is used to fill the corresponding target controls with the language information corresponding to each text in the received execution command. The preliminary test success determination module is used to determine that the preliminary test of the page to be tested was successful if the filling is successful.

7. An electronic device, characterized in that, The method includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to implement the method as described in any one of claims 1 to 5.

8. A computer storage medium, characterized in that, The computer storage medium stores a computer program that enables the computer to perform the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Method for obtaining control in page test, server and readable storage medium

    CN110413520A

  • Control positioning method and device, electronic equipment and readable storage medium

    CN114511696A