A page display automatic testing system and method

By configuring variation descriptions and verification rules in a way that is understandable to non-professionals, an automated testing system and method for page display is implemented, which solves the problems of testing complexity and resource waste in the existing technology and improves test efficiency and coverage.

CN113849414BActive Publication Date: 2025-09-23DOUYIN VISION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111207057.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2025-09-23
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

Existing page display automation testing technology has problems such as high requirements for tester capabilities, limited coverage, incomplete automation tools, poor reusability, and high resource consumption, resulting in low testing efficiency.

Method used

Provided is a page display automated testing system and method, which implements automated testing of page display through a receiving module, a processing module, an execution module, an assertion module, and a storage module. It supports variation description and verification rule configuration that can be understood by non-professionals, and records abnormal results and stores logs during the automated testing process.

Benefits of technology

It simplifies test operations, reduces dependence on professional knowledge, improves test coverage and efficiency, reduces resource consumption, and is applicable to multiple systems under test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113849414B_ABST
    Figure CN113849414B_ABST
Patent Text Reader

Abstract

This application discloses a system and method for automated testing of page displays. The system includes: a receiving module for receiving a current variation description; a processing module for acquiring a corresponding current variation interface based on the current variation description; and an execution module for executing a corresponding current variation program based on the current variation interface, thereby implementing automated testing of the page display. This application addresses the technical issues inherent in manual security testing in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of page display automation testing, and in particular to a page display automation testing system and method. Background Art

[0002] At present, the automated testing technology for page display adopts simple manual security testing, which will bring many problems: first, it places very high requirements on the ability of testers, and the scope of testing that can be covered is extremely limited; second, the existing automated testing tools for page display are of varying quality, and not only do they require professional automated testers to understand their technology stack and build the relevant environment, but they also require professionals to write automated scripts and run them on the tested devices before they can be used, which makes it difficult for other personnel to track the test results; third, the commonly used interface automated testing is difficult to reuse on different products due to different product requirements and functions, and has poor variability. Therefore, it can only be used for normal testing processes, and it is not easy to discover new errors (bugs), so the effectiveness is also poor, which makes the resource consumption required to maintain the automated scripts also high.

[0003] Currently, no effective solution has been proposed to the problems caused by simple manual security testing in related technologies. Summary of the Invention

[0004] The main purpose of this application is to provide a page display automated testing system and method to solve the problem of simple manual security testing in related technologies.

[0005] In order to achieve the above-mentioned objectives, in the first aspect, the present application provides a page display automatic testing system, which includes: a receiving module for receiving a current variation description; a processing module for obtaining a corresponding current variation interface according to the current variation description; and an execution module for executing a corresponding current variation program according to the current variation interface to realize automatic testing of the page display.

[0006] According to the page display automated testing system of the present application, the receiving module is also used to receive the current verification description; and the processing module is also used to obtain the corresponding current verification rules based on the current verification description; the page display automated testing system also includes: an assertion module, which is used to assert the information returned through the current mutation interface after the execution of the current mutation program by the execution module according to the current verification rules to obtain the current assertion result.

[0007] According to the page display automated testing system of the present application, the system also includes: a log recording module, which is used to write the current assertion result and the corresponding current mutation interface into a pre-established log table when the current assertion result is abnormal.

[0008] According to the page display automated testing system of the present application, the system also includes: a storage module for storing one or more variation descriptions, one or more variation interfaces, and the correspondence between the one or more variation descriptions and the one or more variation interfaces, and storing one or more verification descriptions, one or more verification rules and the correspondence between the one or more verification descriptions and the one or more verification rules, wherein the one or more variation descriptions correspond one-to-one to the one or more variation interfaces, and the one or more verification descriptions correspond one-to-one to the one or more verification rules; the processing module is also used to obtain the corresponding current variation interface according to the current variation description through the storage module, and to obtain the corresponding current verification rule according to the current verification description through the storage module.

[0009] According to the page display automated testing system of this application, the receiving module is further used to receive the current tested interface address; and the execution module is further used to execute the current variant program according to the current tested interface address and the current variant interface.

[0010] In the second aspect, the present application also provides an automated testing method for page display, which includes: receiving a current variation description; obtaining a corresponding current variation interface based on the current variation description; and executing a corresponding current variation program based on the current variation interface to realize automated testing of the page display.

[0011] According to the page display automated testing method of the present application, the method also includes: receiving a current verification description; obtaining corresponding current verification rules based on the current verification description; and after executing the current variant program, asserting the information returned through the current variant interface after executing the current variant program according to the current verification rules to obtain a current assertion result.

[0012] According to the page display automated testing method of the present application, the method further includes: when the current assertion result is abnormal, writing the current assertion result and the corresponding current mutation interface into a pre-established log table.

[0013] According to the page display automation testing method of the present application, the method also includes: storing one or more variation descriptions, one or more variation interfaces, and the corresponding relationship between the one or more variation descriptions and the one or more variation interfaces, and storing one or more verification descriptions, one or more verification rules, and the corresponding relationship between the one or more verification descriptions and the one or more verification rules, wherein the one or more variation descriptions correspond one-to-one to the one or more variation interfaces, and the one or more verification descriptions correspond one-to-one to the one or more verification rules; based on the stored one or more variation descriptions, one or more variation interfaces, and the corresponding relationship between the one or more variation descriptions and the one or more variation interfaces, obtaining the corresponding current variation interface according to the current variation description; and based on the stored one or more verification descriptions, one or more verification rules, and the corresponding relationship between the one or more verification descriptions and the one or more verification rules, obtaining the corresponding current verification rule according to the current verification description.

[0014] According to the page display automated testing method of the present application, the method also includes: receiving the current tested interface address; and executing the current variant program according to the current tested interface address and the current variant interface.

[0015] This application configures mutation parameters and verification rules, and describes the mutation procedures and verification rules in a way that non-professionals can understand. It not only realizes interface testing of a large number of abnormal situations, but also has simple operation and strong practicality. In addition, people without coding skills can also operate it easily, avoiding the problem of wasting resources in maintaining automated scripts and saving a lot of manpower resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings that constitute part of this application are used to provide a further understanding of this application and make other features, objects and advantages of this application more apparent. The illustrative embodiment drawings of this application and their descriptions are used to explain this application and do not constitute an improper limitation of this application. In the drawings:

[0017] Figure 1 This is a block diagram of a page display automated testing system provided according to an embodiment of the present application;

[0018] Figure 2 is another page showing a block diagram of an automated testing system provided according to an embodiment of the present application;

[0019] Figure 3 is an execution flow chart of automated testing of page presentation provided in accordance with an embodiment of the present application; and

[0020] Figure 4This is a flowchart of a page display automation testing method provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0023] In this application, terms such as "upper," "lower," "left," "right," "front," "back," "top," "bottom," "inner," "outer," "center," "vertical," "horizontal," "transverse," and "longitudinal" indicate positions or locations based on the positions or locations shown in the accompanying drawings. These terms are primarily intended to better describe this application and its embodiments and are not intended to limit the devices, elements, or components indicated to having a specific orientation, or to being constructed or operated in a specific orientation.

[0024] Furthermore, some of the above terms may be used to express other meanings besides indicating a position or location. For example, the term "on" may also be used to indicate a dependency or connection in certain circumstances. Those skilled in the art will understand the specific meanings of these terms in this application based on the specific circumstances.

[0025] Additionally, the term "plurality" shall mean two or more.

[0026] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0027] Figure 1This is a block diagram of a page display automation test system provided according to an embodiment of the present application, such as Figure 1 As shown, the system includes a receiving module 10 , a processing module 20 and an execution module 30 .

[0028] Receiving module 10 is used to receive the current mutation description. The mutation description is a description of the mutation program in language that is understandable to non-professionals. For example, the mutation description can scramble the order of fields, increase or decrease data length, insert blank lines, etc. The events described in the mutation description are realized by executing the corresponding mutation program.

[0029] Processing module 20 is used to obtain the corresponding current variant interface based on the current variant description. Those skilled in the art will understand that a variant interface is actually a program interface, and thus, a variant interface corresponds to a corresponding variant program. Upon receiving the current variant description by receiving module 10, processing module 20 obtains the current variant interface.

[0030] The execution module 30 is used to execute the corresponding current mutation program according to the current mutation interface to realize the automated test of the page display. When the processing module 20 obtains the current mutation interface, the execution module 30 can execute the corresponding mutation program. The process of executing the mutation program is the process of automated testing. The execution module 30 executes the current mutation program in response to the current mutation description received by the receiving module 10. The present application is to realize the test of the page display by executing the mutation program to test whether it can run normally when the wrong content is entered in the item of the page display (the system to be tested), that is, whether it prompts an error normally or an abnormal situation occurs.

[0031] Each mutation interface corresponds to a mutation program that represents a different mutation method. The mutation method can be described in the following format: method name definition mutation length control. Based on this format, the mutation method can include:

[0032] 1.random_array shuffles the order of fields within a row of data. The value is configurable, for example, 5 means only the first 5 rows are mutated.

[0033] 2.random_line is for model files, and the order of row data cannot be changed;

[0034] 3.array_length_variation can be configured to randomly increase or decrease the length of a row of data, such as 5;

[0035] 4.random_change_delimiter changes the delimiter between columns and column data and cannot be configured;

[0036] 5. value_variation performs numeric mutation (integer <-> floating point (overflow, negative number)) on a certain field, and string mutation (arbitrary string, random truncation, lengthening, empty string) can be configured, such as: 5;

[0037] 6. remove_other_class filters out a subset of columns with the same column values ​​for a specified column and removes other data. You can configure it, such as: 1,3, which means removing duplicates for columns 1 and 3 respectively;

[0038] 7. insert_empty_line randomly inserts a blank line in the file and is not configurable;

[0039] 8. lose_key_line For the model file, remove the line where the key element is located. You can configure it, such as: 5;

[0040] 9.empty_file empty file cannot be configured.

[0041] The above-described variations and description formats of the variations are examples and are not intended to limit the present invention. Any variations and description formats of the variations fall within the scope of protection of this application.

[0042] Figure 2 Another page showing a block diagram of an automated testing system according to an embodiment of the present application is provided. Figure 2 As shown, the system further includes an assertion module 40 .

[0043] The receiving module 10 is also used to receive the current verification description; the processing module 20 is also used to obtain the corresponding current verification rules based on the current verification description; the page display automation testing system provided by this application also includes: an assertion module 40, which is used to assert the information returned through the current mutation interface after the execution module 30 executes the current mutation program according to the current verification rules to obtain the current assertion result.

[0044] A verification description is a description of the verification rules in language understandable to non-professionals. For example, the verification description may only include certain parameters. Verification rules are the criteria for determining assertion results, such as whether parameters are consistent. Upon receiving the current verification description by the receiving module 10, the processing module 20 retrieves the current verification rules.

[0045] After execution module 30 executes the variant program, it returns the execution result (i.e., the corresponding information) via the variant interface. Assertion module 40 asserts the execution result according to the verification rules to obtain an assertion result. Those skilled in the art will understand that "assertion" is a technical term in this field, and effectively refers to a determination of whether the execution result is abnormal or normal. The resulting abnormal or normal determination result is referred to as the assertion result. After receiving module 10 receives the current variant description and the current verification description, assertion module 40, after execution module 30 executes the current variant program, asserts the information returned via the current variant interface (i.e., the execution result) according to the current verification rules to obtain the current assertion result.

[0046] like Figure 2 As shown, the page display automation testing system provided by the present application also includes a log recording module 50, which is used to record the assertion results and the corresponding mutation interface, that is, to write the assertion results and the corresponding mutation interface into a pre-established log table. When the receiving module 10 receives the current mutation description, the log recording module 50 is used to write the current assertion result and the corresponding current mutation interface into the pre-established log table.

[0047] To improve system operating efficiency, the logging module 50 can be configured to write the current assertion result and the corresponding current variant interface into a pre-established log table if the current assertion result is abnormal. That is, the logging module 50 only writes the abnormal assertion result and the corresponding variant interface into the pre-established log table if the assertion result is abnormal. Upon receiving the current variant description by the receiving module 10, the logging module 50 writes the current assertion result and the corresponding current variant interface into the pre-established log table.

[0048] In addition, those skilled in the art should understand that regardless of whether the logging module 50 only writes abnormal assertion results and corresponding mutated interfaces into a pre-established log table or writes all assertion results and corresponding mutated interfaces into a pre-established log table, all assertion results and corresponding mutated interfaces need to be stored in the background database.

[0049] The page display automation testing system provided in the present application also includes a storage module (not shown in the figure) for storing one or more variation descriptions, one or more variation interfaces, and the correspondence between one or more variation descriptions and one or more variation interfaces, and storing one or more verification descriptions, one or more verification rules, and the correspondence between one or more verification descriptions and one or more verification rules, wherein one or more variation descriptions correspond one-to-one to one or more variation interfaces, and one or more verification descriptions correspond one-to-one to one or more verification rules; the processing module 20 is also used to obtain the corresponding current variation interface according to the current variation description through the storage module, and to obtain the corresponding current verification rule according to the current verification description through the storage module.

[0050] The storage module stores one or more mutation descriptions, one or more mutation interfaces, one or more verification descriptions, and one or more verification rules. Each mutation description corresponds to one mutation interface, and each verification description corresponds to one verification rule. There is a one-to-one correspondence between mutation descriptions and mutation interfaces, and a one-to-one correspondence between verification descriptions and verification rules. The processing module 20 described above, which obtains the corresponding current mutation interface based on the current mutation description and the corresponding current verification rule based on the current verification description, can both be obtained through the storage module.

[0051] The automated testing solution described in this application can be performed on multiple systems under test. Therefore, in the page display automated testing system provided in this application, the receiving module 10 is also used to receive the current tested interface address; the execution module 30 is also used to execute the current mutation program based on the current tested interface address and the current mutation interface.

[0052] Those skilled in the art will appreciate that the tested interface address is the URL of the tested system, and that the execution module 30 can execute the mutated program for the corresponding tested system based on the tested interface address. Upon receiving the current tested interface address and the current mutated description by the receiving module 10, the execution module 30 is further configured to execute the current mutated program based on the current tested interface address and the current mutated interface.

[0053] Figure 3 This is a flowchart of the automated testing of page presentation provided in accordance with an embodiment of the present application. Figure 3 As shown, the process includes:

[0054] Step 301: Receive the current tested interface address, current variation description, and current verification description.

[0055] Step 302: Get the current mutation interface and current verification rules.

[0056] Step 303, executing the current mutation program corresponding to the current mutation interface;

[0057] Step 304 , asserting the information (ie, the execution result) returned through the current mutation interface after executing the current mutation program, ie, asserting the execution result, and obtaining the current assertion result.

[0058] Step 305 , determining whether the assertion result is abnormal. If the determination result is yes, executing step 306 ; if the determination result is no, executing step 307 .

[0059] Step 306: If the assertion result is abnormal, the current assertion result and the corresponding current mutated interface are written into a pre-established log table.

[0060] Step 307: When the assertion result is normal, the current assertion result and the corresponding current mutated interface are written into the background database.

[0061] Figure 4 This is a flow chart of a page display automation testing method provided in accordance with an embodiment of the present application. Figure 4 As shown, the method includes:

[0062] Step S401, receiving the current variation description;

[0063] Step S402: Obtain the corresponding current variation interface according to the current variation description;

[0064] Step S403: executing the corresponding current mutation program according to the current mutation interface to implement automated testing of the page display.

[0065] Among them, the automated testing method provided by this application also includes: receiving the current verification description; obtaining the corresponding current verification rules based on the current verification description; after executing the current mutation program, asserting the information returned through the current mutation interface after executing the current mutation program according to the current verification rules to obtain the current assertion result.

[0066] Among them, the page display automated testing method provided by the present application also includes: when the current assertion result is abnormal, writing the current assertion result and the corresponding current mutation interface into a pre-established log table.

[0067] Among them, the page display automation testing method provided by the present application also includes: storing one or more variation descriptions, one or more variation interfaces, and the correspondence between one or more variation descriptions and one or more variation interfaces, and storing one or more verification descriptions, one or more verification rules, and the correspondence between one or more verification descriptions and one or more verification rules, wherein one or more variation descriptions correspond one-to-one to one or more variation interfaces, and one or more verification descriptions correspond one-to-one to one or more verification rules; based on the stored one or more variation descriptions, one or more variation interfaces, and the correspondence between one or more variation descriptions and one or more variation interfaces, the corresponding current variation interface is obtained according to the current variation description; based on the stored one or more verification descriptions, one or more verification rules, and the correspondence between one or more verification descriptions and one or more verification rules, the corresponding current verification rule is obtained according to the current verification description.

[0068] Among them, the page display automation testing method provided by this application also includes: receiving the current tested interface address; executing the current mutation program according to the current tested interface address and the current mutation interface.

[0069] It should be noted that the specific details and benefits of the page display automatic testing method provided by the present invention are similar to those of the page display automatic testing system provided by the present invention, and will not be described in detail here.

[0070] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A page display automatic testing system, characterized in that: The system includes: A receiving module is configured to receive a current mutation description and a current verification description; the current mutation description is configured to describe the mutation method represented by the current mutation program in the following format; the format includes the method name of the mutation method, the definition of the mutation method, and the mutation length; the mutation length controls the mutation range corresponding to the mutation method; a processing module, configured to obtain a corresponding current mutation interface according to the current mutation description, and obtain a corresponding current verification rule according to the current verification description; the mutation program corresponding to each mutation interface represents a different mutation mode; and An execution module is used to execute the corresponding current mutation program according to the current mutation interface, so as to realize automatic testing of the page display through the mutation mode corresponding to the current mutation interface.

2. The page display automatic testing system according to claim 1, characterized in that: The page display automatic testing system also includes: The assertion module is used to assert, after the execution module executes the current variant program, information returned through the current variant interface after executing the current variant program according to the current verification rule to obtain a current assertion result.

3. The page display automatic testing system according to claim 2, characterized in that: The system also includes: The log recording module is used to write the current assertion result and the corresponding current mutation interface into a pre-established log table when the current assertion result is abnormal.

4. The page display automatic testing system according to claim 2, characterized in that: The system also includes: a storage module, configured to store one or more variation descriptions, one or more variation interfaces, and a corresponding relationship between the one or more variation descriptions and the one or more variation interfaces, and to store one or more verification descriptions, one or more verification rules, and a corresponding relationship between the one or more verification descriptions and the one or more verification rules, wherein the one or more variation descriptions and the one or more variation interfaces have a one-to-one correspondence, and the one or more verification descriptions and the one or more verification rules have a one-to-one correspondence; The processing module is further configured to obtain a corresponding current variation interface according to the current variation description through the storage module, and to obtain a corresponding current verification rule according to the current verification description through the storage module.

5. The page display automatic testing system according to claim 2, characterized in that: The receiving module is further configured to receive the current tested interface address; and The execution module is further configured to execute the current variant program according to the current tested interface address and the current variant interface.

6. A page display automated testing method, characterized in that: The method includes: A receiving module is configured to receive a current mutation description and a current verification description; the current mutation description is configured to describe the mutation method represented by the current mutation program in the following format; the format includes the method name of the mutation method, the definition of the mutation method, and the mutation length; the mutation length controls the mutation range corresponding to the mutation method; a processing module configured to obtain a corresponding current mutation interface according to the current mutation description and obtain a corresponding current verification rule according to the current verification description; the mutation program corresponding to each mutation interface represents a different mutation mode; and An execution module is used to execute the corresponding current mutation program according to the current mutation interface, so as to realize automatic testing of the page display through the mutation mode corresponding to the current mutation interface.

7. The page display automation testing method according to claim 6, characterized in that: The method further includes: After executing the current variant program, information returned through the current variant interface after executing the current variant program is asserted according to the current verification rule to obtain a current assertion result.

8. The page display automation testing method according to claim 7, characterized in that: The method further includes: In the case that the current assertion result is abnormal, the current assertion result and the corresponding current mutation interface are written into a pre-established log table.

9. The page display automation testing method according to claim 7, characterized in that: The method further includes: Storing one or more variation descriptions, one or more variation interfaces, and a correspondence between the one or more variation descriptions and the one or more variation interfaces, and storing one or more verification descriptions, one or more verification rules, and a correspondence between the one or more verification descriptions and the one or more verification rules, wherein the one or more variation descriptions and the one or more variation interfaces have a one-to-one correspondence, and the one or more verification descriptions and the one or more verification rules have a one-to-one correspondence; Based on the stored one or more variation descriptions, one or more variation interfaces, and the corresponding relationship between the one or more variation descriptions and the one or more variation interfaces, obtaining a corresponding current variation interface according to the current variation description; and Based on the stored one or more verification descriptions, one or more verification rules, and the corresponding relationship between the one or more verification descriptions and the one or more verification rules, a corresponding current verification rule is acquired according to the current verification description.

10. The page display automation testing method according to claim 7, wherein: The method further includes: Receive the current measured interface address; and The current variation program is executed according to the current tested interface address and the current variation interface.

Citation Information

Patent Citations

  • Software interface testing method and device

    CN110609785A