CN111522737B - Automatic test verification method and device for front-end interface and storage medium - Google Patents

Automatic test verification method and device for front-end interface and storage medium Download PDF

Info

Publication number
CN111522737B
CN111522737B CN202010224599.2A CN202010224599A CN111522737B CN 111522737 B CN111522737 B CN 111522737B CN 202010224599 A CN202010224599 A CN 202010224599A CN 111522737 B CN111522737 B CN 111522737B
Authority
CN
China
Prior art keywords
end interface
attribute
attribute state
state
execution function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010224599.2A
Other languages
Chinese (zh)
Other versions
CN111522737A (en
Inventor
王宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Koubei Network Technology Co Ltd
Original Assignee
Zhejiang Koubei Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Koubei Network Technology Co Ltd filed Critical Zhejiang Koubei Network Technology Co Ltd
Priority to CN202010224599.2A priority Critical patent/CN111522737B/en
Publication of CN111522737A publication Critical patent/CN111522737A/en
Application granted granted Critical
Publication of CN111522737B publication Critical patent/CN111522737B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses an automatic test and verification method, device and storage medium for a front-end interface. The embodiment of the invention avoids the problems of low efficiency and low accuracy of the test result by adopting an image matching mode, improves the executability and the verification capability of the automatic test, and achieves the effect of improving the test efficiency and the accuracy. Even if the front-end interface mode is replaced more frequently, the test case does not need to be readjusted, and the test manpower resource is reduced.

Description

Automatic test verification method and device for front-end interface and storage medium
Technical Field
The present invention relates to the field of automated testing technologies, and in particular, to a method and apparatus for automatic testing and verification of a front end interface, and a storage medium.
Background
With the increase of internet products and the increasing of product functions, the testing pressure on the products is also increased. How to efficiently complete the test tasks is the goal of each test practitioner. At present, the interface test of the back end has more perfect frame support, and the automatic test frame of the front end is also advancing continuously. React is widely used in large websites as one of the most popular front end frameworks. However, based on the front-end function developed by the React framework, a great difficulty exists in the process of front-end automation test, namely, how to verify whether the execution result of the automation use case is correct, so as to accurately complete the automation verification.
In the related art, an automatic test based on a UI (User Interface) needs to obtain an element list on a web Interface, and write script calling click and drag elements, so as to trigger back-end Interface calling. And re-rendering the interface after the back-end data is returned, performing result verification by using an image recognition mode, and executing the next execution if the image recognition verification is passed. The method and the device are used for checking in an image matching mode, whether a certain element is contained in a front interface or whether an image with higher similarity with a target image exists in the interface is mainly checked, for example, in the process of automatic script writing, a result picture of a key step is stored, picture comparison is carried out when the step is executed in the test process, if the pictures are consistent, the successful execution is illustrated, and if the pictures are inconsistent, the failure execution is illustrated. This automated test verification scheme suffers from the following drawbacks: 1. errors are easy to occur in a mode of image recognition, and judging errors can be caused if a plurality of similar pictures occur in an interface; 2. the verification speed is low by using an image recognition mode, and the pixels are required to be sampled and compared; 3. the UI of the front end is easy to change frequently, and the script needs to be rewritten after the components and the pictures are transformed, so that the maintenance cost is high.
Disclosure of Invention
In view of the above problems, the present invention provides an automated test verification method, apparatus, and storage medium for a front end interface that overcomes or at least partially solves the above problems, so as to improve the executability and accurate verification capability of an automated test, and achieve the effect of improving the test efficiency and accuracy.
According to an aspect of the embodiment of the invention, there is provided an automated test verification method for a front-end interface, including:
establishing an attribute state set of a front-end interface;
testing the called current front-end interface to obtain the attribute and the corresponding attribute state of the current front-end interface;
and responding to the attribute state contained in the attribute state set, and prompting that the automatic test verification result of the current front-end interface is normal.
Optionally, establishing the attribute state set of the front-end interface includes:
collecting attributes respectively contained in a plurality of front-end interfaces in a designated application program;
determining attribute states corresponding to the attributes contained in the front-end interface under different states;
recording the attribute state corresponding to a front-end interface in a state as an attribute state unit;
the set of attribute states is established based on the plurality of attribute state units of the record.
Optionally, in response to the attribute state set including the attribute state, prompting that the automated test verification result of the current front-end interface is normal, including:
searching whether an attribute state unit consistent with the attribute state of the current front-end interface exists in the attribute state set;
and prompting that the automatic test and verification result of the current front-end interface is normal in response to finding the attribute state unit consistent with the attribute state of the current front-end interface.
Optionally, after establishing the attribute state set of the front-end interface, the method further includes:
setting different execution functions for different attribute state units respectively;
establishing a mapping relation between the attribute state unit and the corresponding execution function;
generating an execution function set according to the execution functions establishing mapping relation with the state units with different attributes.
Optionally, after prompting that the automated test verification result of the current front-end interface is normal, in response to finding an attribute state unit consistent with the attribute state of the current front-end interface, the method further includes:
searching an executive function with a mapping relation with the attribute state unit from the executive function set;
executing the operation of triggering the current front-end interface element according to the execution function so as to call up the corresponding front-end interface;
and testing the front-end interface which is called up after triggering the current front-end interface element to obtain the attribute and the corresponding attribute state of the called-up front-end interface, so as to perform test and verification based on the attribute state set and the attribute state of the called-up front-end interface.
Optionally, the attributes of the front-end interface include: state attributes and/or tips attributes.
Optionally, the method further comprises:
and responding to the attribute state set without the attribute state, sending out a prompt message that the automatic test verification result of the current front-end interface is abnormal, and ending the automatic test process.
According to another aspect of the embodiment of the present invention, there is also provided an automated test and verification apparatus for a front-end interface, including:
the building module is suitable for building an attribute state set of the front-end interface;
the testing module is suitable for testing the called current front-end interface and obtaining the attribute and the corresponding attribute state of the current front-end interface;
and the prompting module is suitable for prompting that the automatic test verification result of the current front-end interface is normal in response to the attribute state contained in the attribute state set.
Optionally, the setup module is further adapted to:
collecting attributes respectively contained in a plurality of front-end interfaces in a designated application program;
determining attribute states corresponding to the attributes contained in the front-end interface under different states;
recording the attribute state corresponding to a front-end interface in a state as an attribute state unit;
the set of attribute states is established based on the plurality of attribute state units of the record.
Optionally, the prompting module is further adapted to:
searching whether an attribute state unit consistent with the attribute state of the current front-end interface exists in the attribute state set;
and prompting that the automatic test and verification result of the current front-end interface is normal in response to finding the attribute state unit consistent with the attribute state of the current front-end interface.
Optionally, the device further comprises a generation module adapted to;
setting different execution functions for different attribute state units respectively;
establishing a mapping relation between the attribute state unit and the corresponding execution function;
generating an execution function set according to the execution functions establishing mapping relation with the state units with different attributes.
Optionally, the method further comprises: the searching module is suitable for searching the execution function with the mapping relation with the attribute state unit from the execution function set;
the triggering module is suitable for executing the operation of triggering the current front-end interface element according to the execution function so as to call up the corresponding front-end interface;
the testing module is further adapted to test the front end interface which is called up after the current front end interface element is triggered, obtain the attribute and the corresponding attribute state of the called up front end interface, and perform testing and verification based on the attribute state set and the attribute state of the called up front end interface.
Optionally, the attributes of the front-end interface include: state attributes and/or tips attributes.
Optionally, the prompting module is further adapted to:
and responding to the attribute state set without the attribute state, sending out a prompt message that the automatic test verification result of the current front-end interface is abnormal, and ending the automatic test process.
According to yet another aspect of embodiments of the present invention, there is also provided a computer storage medium storing computer program code which, when run on a computing device, causes the computing device to perform the automated test verification method of a front-end interface as described in any one of the preceding claims.
According to yet another aspect of an embodiment of the present invention, there is also provided a computing device including: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the automated test verification method of the front-end interface of any of the preceding claims.
In the embodiment of the invention, in the process of checking the front-end interface of the application program, the front-end interface is checked from the attribute dimension of the front-end interface, if the attribute state of the front-end interface belongs to the pre-established attribute state set, the automatic test checking result can be obtained as normal, the problems of low efficiency and low accuracy of checking the test result by adopting an image matching mode are avoided, the executability and the accurate checking capability of the automatic test are improved, and the effects of improving the test efficiency and the accuracy are achieved. Furthermore, the embodiment of the invention checks the front-end interface from the attribute dimension, so that the test case does not need to be readjusted according to the condition that the front-end interface mode is replaced frequently, thereby greatly saving the test manpower resource and further improving the efficiency of automatic test and check.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
The above, as well as additional objectives, advantages, and features of the present invention will become apparent to those skilled in the art from the following detailed description of a specific embodiment of the present invention when read in conjunction with the accompanying drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow chart of an automated test verification method for a front end interface according to an embodiment of the invention;
FIG. 2 illustrates a composition schematic of a set of attribute states according to an embodiment of the present invention;
FIG. 3 is a flow chart of an automated test verification method for a front end interface according to another embodiment of the present invention;
FIG. 4 is a diagram illustrating a mapping relationship between a set of attribute states and a set of execution functions according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an automated test verification device of a front end interface according to an embodiment of the invention;
FIG. 6 is a schematic diagram of an automated test verification device for a front end interface according to another embodiment of the invention;
fig. 7 is a schematic structural diagram of an automated test verification device for a front-end interface according to a further embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to solve the above technical problems, an embodiment of the present invention provides an automated test verification method for a front end interface, and fig. 1 is a schematic flow chart of an automated test verification method for a front end interface according to an embodiment of the present invention. Referring to fig. 1, the automated test verification method of the front-end interface at least includes the following steps S102 to S106.
Step S102, an attribute state set of the front-end interface is established.
Step S104, testing the called current front-end interface to obtain the attribute and the corresponding attribute state of the current front-end interface.
In the embodiment of the invention, different front-end interfaces comprise different attributes, and the front-end interfaces also correspond to different attribute states under different states, and the front-end interfaces can be automatically tested and verified from the attribute angle by acquiring the attributes and the corresponding attribute states of the front-end interfaces.
Step S106, in response to the attribute state contained in the attribute state set, prompting that the automatic test verification result of the current front-end interface is normal.
The attribute state set of the embodiment of the invention comprises a plurality of attribute states which are expected in the automatic test process, and the embodiment of the invention can conveniently realize the test and verification of the current front-end interface by analyzing whether the attribute states acquired from the front-end interface meet the expected attribute states or not, and the process of establishing the attribute state set is described in detail later.
In the embodiment of the invention, in the process of checking the front-end interface of the application program, the front-end interface is checked from the attribute dimension of the front-end interface, if the attribute state of the front-end interface belongs to the pre-established attribute state set, the automatic test checking result can be obtained as normal, the problems of low efficiency and low accuracy of checking the test result by adopting an image matching mode are avoided, the executability and the accurate checking capability of the automatic test are improved, and the effects of improving the test efficiency and the accuracy are achieved. Furthermore, the embodiment of the invention checks the front-end interface from the attribute dimension, so that the test case does not need to be readjusted according to the condition that the front-end interface mode is replaced frequently, thereby greatly saving the test manpower resource and further improving the efficiency of automatic test and check.
The software test is to run the system or the application program under the preset condition and evaluate the running result, the preset condition can generally comprise a normal condition and an abnormal condition, in the automatic test verification, the automatic test case which is pre-written is executed in a non-manual mode, whether the execution result of the automatic test case accords with the expectation is judged, and the embodiment of the invention can conveniently realize the test verification of the front-end interface by analyzing whether the attribute state of the front-end interface meets the expected attribute state or not, and the preset condition of the embodiment of the invention can be known to be the normal condition by combining the above embodiment, namely, the attribute state acquired from the front-end interface is contained in the pre-established attribute state set.
The front-end interface in embodiments of the present invention may be constructed based on compact. The act is a JavaScript library for constructing a user interface, and is an open source front end development template and framework. The properties of the front-end interface built based on React include state properties and/or tips properties. When the front-end interface is updated, the state attribute of the front-end interface component can be updated, so that the front-end interface is re-rendered according to the updated state. The state attribute can be used for controlling the state of the interface component, and can also complete the control of interface behavior, the updating of data and the rendering of the interface, and the interface component can realize the modification of the state. The tips attribute is a unidirectional data flow value in the act that can be used for communication between components, and is itself immutable.
In an embodiment of the present invention, a process of establishing the attribute status set of the front-end interface is specifically as follows.
First, attributes contained in a plurality of front-end interfaces in a specified application are collected. In the embodiment of the present invention, when performing automatic test and verification on the front-end interfaces of the specified application program, the attributes included in the front-end interfaces of the specified application program may be collected first, and the foregoing has introduced that the attributes of the front-end interfaces include state attributes and/or tips attributes, that is, one front-end interface may include state attributes, or include tips attributes, or include both state attributes and tips attributes, where a soft relationship exists between the general state attributes and tips attributes, and the embodiment of the present invention is not limited specifically.
And then determining attribute states corresponding to the attributes contained in each front-end interface under different states.
Further, the attribute state corresponding to the front-end interface in a state is recorded as an attribute state unit. In the embodiment of the invention, the attribute states contained in different front-end interfaces are different, and the attribute states contained in the same front-end interface in different states are also different, so that the attribute states corresponding to one front-end interface in one state can be recorded as one attribute state unit by collecting the attribute states of a plurality of front-end interfaces.
Finally, an attribute state set is established based on the plurality of attribute state units of the record.
For example, referring to FIG. 2, the states of the tips attribute of the front end interface of a given application include n types, p1, p2 through pn, respectively, and the states of the state attribute include n types, s1, s2 through sn, respectively. By collecting attribute states of the front-end interface in different states, it is assumed that the front-end interface 1, the front-end interface 2 and the front-end interface 3 respectively comprise tips attribute, and the attribute states respectively corresponding to the tips attribute are p1, p2 and p3, so that the p1, the p2 and the p3 are respectively used as an attribute state unit. Similarly, the front-end interfaces 4, 5, and 6 include state attributes, and the corresponding attribute states are s1, s2, and s3, respectively, so s1, s2, and s3 are each an attribute state unit. Similarly, the front-end interfaces 7, 8, 9, 10, 11 each include a tips attribute and a state attribute, and the corresponding attribute states are p1 s1, p2s 1, p3s1, p2s2, and p2s3, respectively, so that p1 s1, p2s 1, p3s1, p2s2, and p2s3 are each used as an attribute state unit. Thus, a set of attribute states can be established using a plurality of attribute state elements of the record.
In an embodiment of the present invention, the established attribute state set includes a plurality of attribute state units, and then, in response to the attribute state set including the attribute state, the present front-end interface is prompted to find whether the attribute state unit consistent with the attribute state of the present front-end interface exists in the attribute state set first in a process that the automated test and verification result of the present front-end interface is normal, and if the attribute state unit consistent with the attribute state of the present front-end interface is found, the present front-end interface is prompted to be automated.
In an embodiment of the present invention, after the attribute state set of the front-end interface is established, an execution function set corresponding to the attribute state set may also be generated, and a process of generating the execution function set is described below.
First, different execution functions are set for different attribute status units, respectively. In the embodiment of the invention, different execution functions are used for triggering different page elements on the front-end interface, so that a new front-end interface can be adjusted.
Then, a mapping relationship is established between the attribute status unit and the corresponding execution function. The mapping relationship is usually established by a property state unit corresponding to an execution function.
And finally, generating an execution function set according to the execution functions establishing mapping relations with the state units with different attributes.
In the embodiment of the invention, for the new front-end interface which is called up after the element of the current front-end interface is triggered by the execution function, the verification is further carried out on the called new front-end interface. Therefore, the embodiment of the invention also provides another method for automatically testing and checking the front-end interface, referring to fig. 3, the method for automatically testing and checking the front-end interface at least comprises the following steps S302 to S312.
Step S302, an attribute state set of the front-end interface is established.
Step S304, testing the called current front-end interface to obtain the attribute and the corresponding attribute state of the current front-end interface.
Step S306, searching whether an attribute state unit consistent with the attribute state of the current front-end interface exists in the attribute state set. If yes, go to step S308, if no, go to step S309, and end.
Step S308, prompting that the automatic test and verification result of the front end interface is normal.
The specific description of step S302 to step S308 in the embodiment of the present invention may be referred to the above embodiments, and will not be repeated here.
Step S310, find out whether there is an executive function with mapping relation with the attribute state unit from the executive function set. The attribute state unit herein refers to an attribute state unit consistent with the attribute state of the current front-end interface. If yes, go to step S312. If not, go to step S309 and end.
The execution functions of the embodiment of the invention can comprise functions of clicking, dragging and the like of elements on the front-end interface, and the function triggering can be carried out on the front-end interface by utilizing different execution functions.
For example, referring to fig. 4, the attribute state set includes a plurality of attribute state units, which are p1, p2, p3, pn, s1, s2, s3, sn, p1 s1, p2s 1, p3s1, p2s2, p2s3, and so on, respectively, each attribute state unit maps one of the execution functions in the execution function set, and it is assumed that the attribute state unit p1 maps the execution function action1, the attribute state unit p2 maps the execution function action4, the attribute state unit p3 maps the execution function action7, the attribute state unit pn maps the execution function action10, the attribute state unit s1 maps the execution function action2, the attribute state unit s2 maps the execution function action5, the attribute state unit s3 maps the execution function action8, and the status value unit sn maps the execution function action11, and so on.
Step S312, the operation of triggering the current front-end interface element is executed according to the execution function to call up the corresponding front-end interface.
In the embodiment of the invention, when the attribute state of the front-end interface is consistent with the attribute state units in the attribute state set, the operation of triggering the front-end interface element can be executed by utilizing the execution function mapped by the attribute state units. The front-end interface element in the embodiment of the present invention may be a function button on the front-end interface, or may be a web page link, etc., which is not limited in particular in the embodiment of the present invention.
For example, the execution function of the attribute state unit mapping is to execute a click function of the front-end interface element, call up the front-end interface corresponding to the clicked front-end interface element after triggering a click operation on the front-end interface element according to the click function, and check the newly called front-end interface. For another example, the execution function mapped by the attribute state unit is a drag function of executing a front-end interface element, and after triggering a drag operation on the front-end interface element according to the drag function, the front-end interface corresponding to the dragged front-end interface element is lifted, and the newly lifted front-end interface is checked.
Further, steps S304 through S312 may be repeatedly performed until all front end interface automation test checks are completed.
When the front end interfaces of the designated application program are subjected to automatic test verification, the front end interfaces are subjected to automatic test verification, so that the front end interfaces which are called up each time can be verified, and the automatic test verification is performed in a mode from step S304 to step S312 until the automatic test verification of all the front end interfaces is completed, and the test verification efficiency and accuracy are improved.
In the embodiment of the invention, in the automatic test and verification process, if the attribute state unit consistent with the attribute state acquired by the current front-end interface does not exist in the attribute state set, a prompt message that the automatic test and verification result of the front-end interface is abnormal can be sent out, and the automatic test process is ended, so that a professional engineer can adjust the front-end interface generating the abnormality.
In practical application, all the above optional embodiments may be combined in any combination manner to form an optional embodiment of the present invention, which is not described herein in detail.
Based on the automatic test verification method of the front end interface provided by the above embodiments, based on the same inventive concept, the embodiment of the invention also provides an automatic test verification device of the front end interface, and fig. 5 shows a schematic structural diagram of the automatic test verification device of the front end interface according to an embodiment of the invention. Referring to fig. 5, the automated test verification device of the front-end interface may include a setup module 510, a test module 520, and a hint module 530.
The establishing module 510 is adapted to establish a set of attribute states of the front-end interface.
The testing module 520 is adapted to test the called current front-end interface to obtain the attribute and the corresponding attribute state of the current front-end interface.
The prompting module 530 is adapted to prompt that the automated test verification result of the current front-end interface is normal in response to the attribute state set including the attribute state.
In alternative embodiments of the present invention, the front-end interface may be built based on compact. The act is a JavaScript library for constructing a user interface, and is an open source front end development template and framework. The attribute of the front-end interface constructed based on the reaction includes a state attribute and/or a tips attribute, and the attribute of the front-end interface in this embodiment includes a state attribute and/or a tips attribute.
In an alternative embodiment of the present invention, the setup module 510 is further adapted to first collect attributes respectively contained in a plurality of front-end interfaces in a specified application. And then determining attribute states corresponding to the attributes contained in the front-end interfaces in different states. Further, the attribute state corresponding to the front-end interface in a state is recorded as an attribute state unit. Finally, an attribute state set is established based on the plurality of attribute state units of the record.
In an alternative embodiment of the invention, the hint module 530 is further adapted to first find out from the set of property states whether there is a property state unit that is consistent with the property state of the current front-end interface. And then, prompting that the automatic test verification result of the current front-end interface is normal in response to finding the attribute state unit consistent with the attribute state of the current front-end interface.
In an alternative embodiment of the present invention, as shown in fig. 6, the apparatus illustrated in fig. 5 above may further include a generating module 540, where the generating module 540 is adapted to set different execution functions for different attribute status units, respectively, establish a mapping relationship between the attribute status units and corresponding execution functions, and generate an execution function set according to the execution functions that establish the mapping relationship with the different attribute status units.
In an alternative embodiment of the present invention, as shown in fig. 7, the apparatus illustrated in fig. 6 above may further include a search module 550, a trigger module 560, wherein,
the searching module 550 is adapted to search the executing functions having a mapping relation with the attribute status unit from the executing function set.
The triggering module 560 is adapted to trigger the operation of the current front-end interface element according to the execution function execution, so as to call up the corresponding front-end interface.
The front-end interface element in the embodiment of the present invention may be a function button on the front-end interface, or may be a web page link, etc., which is not limited in particular in the embodiment of the present invention.
The test module 520 is further adapted to test the front end interface that is called up after the current front end interface element is triggered, obtain the attribute and the corresponding attribute state of the called up front end interface, and perform test and verification based on the attribute state set and the attribute state of the called up front end interface.
Based on the same inventive concept, the embodiment of the invention also provides a computer storage medium, wherein the computer storage medium stores computer program code, and when the computer program code runs on the computing device, the computing device is caused to execute the automatic test verification method of the front-end interface.
Based on the same inventive concept, an embodiment of the present invention further provides a computing device, including: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the automated test verification method of the front-end interface described above.
It will be clear to those skilled in the art that the specific working processes of the above-described systems, devices, units and modules may refer to the corresponding processes in the foregoing method embodiments, and are not repeated herein for brevity.
In addition, each functional unit in the embodiments of the present invention may be physically independent, two or more functional units may be integrated together, or all functional units may be integrated in one processing unit. The integrated functional units may be implemented in hardware or in software or firmware.
Those of ordinary skill in the art will appreciate that: the integrated functional units, if implemented in software and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in essence or in whole or in part in the form of a software product stored in a storage medium, comprising instructions for causing a computing device (e.g., a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a read-only memory (ROM), a random-access memory (RAM), a magnetic disk, or an optical disk, etc.
Alternatively, all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a personal computer, a server, or a computing device such as a network device) associated with program instructions, where the program instructions may be stored on a computer-readable storage medium, and where the program instructions, when executed by a processor of the computing device, perform all or part of the steps of the method according to the embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all technical features thereof can be replaced by others within the spirit and principle of the present invention; such modifications and substitutions do not depart from the scope of the invention.

Claims (9)

1. An automated test and verification method for a front-end interface, comprising:
establishing an attribute state set of a front-end interface;
testing the called current front-end interface to obtain the attribute and the corresponding attribute state of the current front-end interface;
responding to the attribute state contained in the attribute state set, and prompting that the automatic test and verification result of the current front-end interface is normal;
after establishing the attribute state set of the front-end interface, the method further comprises: establishing an execution function set, wherein the attribute state set comprises a plurality of attribute state units, and the execution function set comprises an execution function with a mapping relation with the attribute state units;
and after prompting that the automatic test verification result of the current front-end interface is normal, responding to the attribute state set containing the attribute state, further comprising:
searching an execution function with a mapping relation with the attribute state unit from the execution function set, wherein the attribute state unit refers to an attribute state unit consistent with the attribute state of the current front-end interface;
executing the operation of triggering the current front-end interface element according to the execution function so as to call up the corresponding front-end interface;
and testing the front-end interface which is called up after triggering the current front-end interface element to obtain the attribute and the corresponding attribute state of the called-up front-end interface, so as to perform test and verification based on the attribute state set and the attribute state of the called-up front-end interface.
2. The method of claim 1, wherein establishing the set of attribute states for the front-end interface comprises:
collecting attributes respectively contained in a plurality of front-end interfaces in a designated application program;
determining attribute states corresponding to the attributes contained in the front-end interface under different states;
recording the attribute state corresponding to a front-end interface in a state as an attribute state unit;
the set of attribute states is established based on the plurality of attribute state units of the record.
3. The method of claim 2, wherein in response to the attribute status being included in the set of attribute statuses, prompting the automated test verification of the current front-end interface to be normal comprises:
searching whether an attribute state unit consistent with the attribute state of the current front-end interface exists in the attribute state set;
and prompting that the automatic test and verification result of the current front-end interface is normal in response to finding the attribute state unit consistent with the attribute state of the current front-end interface.
4. A method according to claim 3, characterized in that the establishing of the set of execution functions comprises in particular:
setting different execution functions for different attribute state units respectively;
establishing a mapping relation between the attribute state unit and the corresponding execution function;
generating an execution function set according to the execution functions establishing mapping relation with the state units with different attributes.
5. The method according to claim 1 or 2, wherein the properties of the front-end interface comprise: state attributes and/or tips attributes.
6. An automated test verification device for a front end interface, comprising:
the building module is suitable for building an attribute state set of the front-end interface;
the testing module is suitable for testing the called current front-end interface and obtaining the attribute and the corresponding attribute state of the current front-end interface;
the prompting module is suitable for prompting that the automatic test verification result of the current front-end interface is normal in response to the attribute state contained in the attribute state set;
the generation module is suitable for establishing an execution function set, wherein the attribute state set comprises a plurality of attribute state units, and the execution function set comprises an execution function with a mapping relation with the attribute state units;
the searching module is suitable for searching the execution function with the mapping relation with the attribute state unit from the execution function set, wherein the attribute state unit refers to an attribute state unit consistent with the attribute state of the current front-end interface;
the triggering module is suitable for executing the operation of triggering the current front-end interface element according to the execution function so as to call up the corresponding front-end interface;
the testing module is further adapted to test the front end interface which is called up after the current front end interface element is triggered, obtain the attribute and the corresponding attribute state of the called up front end interface, and test and check based on the attribute state set and the attribute state of the called up front end interface.
7. The apparatus of claim 6, wherein the setup module is further adapted to:
collecting attributes respectively contained in a plurality of front-end interfaces in a designated application program;
determining attribute states corresponding to the attributes contained in the front-end interface under different states;
recording the attribute state corresponding to a front-end interface in a state as an attribute state unit;
the set of attribute states is established based on the plurality of attribute state units of the record.
8. A computer storage medium storing computer program code which, when run on a computing device, causes the computing device to perform the automated test verification method of the front-end interface of any of claims 1-5.
9. A computing device, comprising: a processor; a memory storing computer program code; when executed by the processor, causes the computing device to perform the automated test verification method of the front-end interface of any of claims 1-5.
CN202010224599.2A 2020-03-26 2020-03-26 Automatic test verification method and device for front-end interface and storage medium Active CN111522737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010224599.2A CN111522737B (en) 2020-03-26 2020-03-26 Automatic test verification method and device for front-end interface and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010224599.2A CN111522737B (en) 2020-03-26 2020-03-26 Automatic test verification method and device for front-end interface and storage medium

Publications (2)

Publication Number Publication Date
CN111522737A CN111522737A (en) 2020-08-11
CN111522737B true CN111522737B (en) 2023-07-07

Family

ID=71901816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010224599.2A Active CN111522737B (en) 2020-03-26 2020-03-26 Automatic test verification method and device for front-end interface and storage medium

Country Status (1)

Country Link
CN (1) CN111522737B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106033393A (en) * 2015-03-13 2016-10-19 展讯通信(天津)有限公司 Method and system for testing application program, and mobile terminal

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101377759B (en) * 2008-08-26 2010-06-09 中国工商银行股份有限公司 Automatic interface test system
CN102467442B (en) * 2010-11-02 2015-04-29 腾讯科技(深圳)有限公司 Software testing method, system and equipment
US10846206B2 (en) * 2017-06-14 2020-11-24 T-Mobile Usa, Inc. Adaptive software testing
US20190303269A1 (en) * 2018-03-28 2019-10-03 Layout.io Ltd Methods and systems for testing visual aspects of a web page
CN110413524A (en) * 2019-07-26 2019-11-05 中国工商银行股份有限公司 For generating method and apparatus, the automated testing method of test script
CN110502442B (en) * 2019-08-15 2023-02-03 平安普惠企业管理有限公司 Dynamic parameter checking method, device, equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106033393A (en) * 2015-03-13 2016-10-19 展讯通信(天津)有限公司 Method and system for testing application program, and mobile terminal

Also Published As

Publication number Publication date
CN111522737A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
CN102184138B (en) Method and system for automatically reproducing and positioning software error
CN108388514B (en) Interface automation test method, device, equipment and computer readable storage medium
CN108959068B (en) Software interface testing method, device and storage medium
US8104020B2 (en) Method and system to automate software testing using sniffer side and browser side recording and a toolbar interface
JP2017084345A (en) Real-time monitoring of computer system processor and transaction performance during ongoing performance test
JP4381436B2 (en) Scenario generation device and scenario generation program
JP6514244B2 (en) Difference detection device and program
CN103049371A (en) Testing method and testing device of Android application programs
US20150169435A1 (en) Method and apparatus for mining test coverage data
CN110955409B (en) Method and device for creating resources on cloud platform
CN111190827A (en) Interface automation test method and device, storage medium and electronic equipment
US9697107B2 (en) Testing applications
CN114138244A (en) Method and device for automatically generating model files, storage medium and electronic equipment
CN112817866A (en) Recording playback method, device, system, computer equipment and storage medium
CN108241543B (en) Method, service server and system for executing service operation breakpoint
CN111078529B (en) Client writing module testing method and device and electronic equipment
CN111522737B (en) Automatic test verification method and device for front-end interface and storage medium
CN109508204B (en) Front-end code quality detection method and device
CN113326193A (en) Applet testing method and device
CN111008140B (en) Cross-platform UI (user interface) automatic testing method and device
CN114171107A (en) Detection method, device, equipment and storage medium for VPD information of solid state disk
CN113886221A (en) Test script generation method and device, storage medium and electronic equipment
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN112416735A (en) Application program detection method and device, terminal equipment and storage medium
CN113722236B (en) Game debugging method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant