CN111522737A - Automatic testing and checking method and device for front-end interface and storage medium - Google Patents

Automatic testing and checking method and device for front-end interface and storage medium Download PDF

Info

Publication number
CN111522737A
CN111522737A CN202010224599.2A CN202010224599A CN111522737A CN 111522737 A CN111522737 A CN 111522737A CN 202010224599 A CN202010224599 A CN 202010224599A CN 111522737 A CN111522737 A CN 111522737A
Authority
CN
China
Prior art keywords
end interface
attribute
attribute state
state
current
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.)
Granted
Application number
CN202010224599.2A
Other languages
Chinese (zh)
Other versions
CN111522737B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

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

Description

Automatic testing and checking 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 an apparatus for automated testing and verification of a front-end interface, and a storage medium.
Background
With the increase of internet products and the increasing strength of product functions, the test pressure on products is increased. How to efficiently complete the testing task is the goal of each testing 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 continuously improved. Fact is one of the most popular front-end frameworks at present, and is widely applied to various large websites. However, based on the front-end function developed by the fact framework, a great difficulty exists in the front-end automation test process is how to verify whether the execution result of the automation case is correct so as to accurately complete the automation verification.
In the related art, the automated test based on a User Interface (UI) needs to acquire an element list on a web Interface, and write scripts to call click and drag elements, thereby triggering a backend Interface to call. And re-rendering the interface after the back-end data is returned, verifying the result by using an image recognition mode, and executing the next step if the image recognition verification is passed. The method is characterized in that the verification is carried out in an image matching mode, whether a certain element is included in an interface before comparison or not is mainly carried out, or whether an image with high similarity to a target image exists in the interface or not is judged, for example, in the process of compiling an automatic script, a result picture of a key step is stored, the picture comparison is carried out when the step is executed in the testing process, if the pictures are consistent, the execution is successful, and if the pictures are inconsistent, the execution is failed. The following disadvantages exist in this automated test and verification scheme: 1. errors are easy to occur by using an image recognition mode, and if a plurality of similar pictures appear in an interface, judgment errors can be caused; 2. the verification speed is low by using an image identification mode, and pixels need to be sampled and compared; 3. the UI of the front end is easy to change frequently, the script needs to be rewritten after the components and the pictures are changed, and the maintenance cost is high.
Disclosure of Invention
In view of the above problems, the present invention is provided to provide a method, an apparatus, and a storage medium for verifying an automated test of a front-end interface, which overcome the above problems or at least partially solve the above problems, and can improve the performability and the accurate verification capability of the automated test, thereby achieving the effect of improving the test efficiency and the accuracy.
According to an aspect of the embodiments of the present invention, an automated testing and checking method for a front-end interface is provided, including:
establishing an attribute state set of a front-end interface;
testing the current front-end interface to obtain the attribute and the corresponding attribute state of the current front-end interface;
and 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, establishing a property state set of the front-end interface includes:
collecting attributes contained in a plurality of front-end interfaces in a specified application program;
determining attribute states corresponding to attributes contained in the front-end interface in different states;
recording the attribute state corresponding to a front-end interface in a state as an attribute state unit;
the attribute state collection is established based on the recorded plurality of attribute state units.
Optionally, in response to the attribute state included in the attribute state set, prompting that an 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 verification result of the current front-end interface is normal in response to the attribute state unit which is consistent with the attribute state of the current front-end interface being found.
Optionally, after the creating the attribute state set of the front-end interface, the method further includes:
setting different execution functions for the different attribute state units respectively;
establishing a mapping relation between the attribute state unit and the corresponding execution function;
and generating an execution function set according to the execution functions establishing the mapping relation with the different attribute state units.
Optionally, after 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, the method further includes:
searching the executive function with the 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 a corresponding front-end interface;
and testing the front-end interface which is called up after the current front-end interface element is triggered to obtain the attribute and the corresponding attribute state of the called up front-end interface, and carrying out test verification 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: a state attribute and/or a props attribute.
Optionally, the method further comprises:
and responding to the attribute state set not containing the attribute state, sending 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 embodiments of the present invention, there is provided an automatic test and verification apparatus for a front-end interface, including:
the establishing module is suitable for establishing an attribute state set of the front-end interface;
the test module is suitable for testing the current front-end interface to obtain the attribute and the corresponding attribute state of the current front-end interface;
and the prompting module is suitable for 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, the establishing module is further adapted to:
collecting attributes contained in a plurality of front-end interfaces in a specified application program;
determining attribute states corresponding to attributes contained in the front-end interface in different states;
recording the attribute state corresponding to a front-end interface in a state as an attribute state unit;
the attribute state collection is established based on the recorded plurality of attribute state units.
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 verification result of the current front-end interface is normal in response to the attribute state unit which is consistent with the attribute state of the current front-end interface being found.
Optionally, the system further comprises a generating module adapted to;
setting different execution functions for the different attribute state units respectively;
establishing a mapping relation between the attribute state unit and the corresponding execution function;
and generating an execution function set according to the execution functions establishing the mapping relation with the different attribute state units.
Optionally, the method further comprises: the searching module is suitable for searching the executing function which has a mapping relation with the attribute state unit from the executing 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 a corresponding front-end interface;
the testing module is further adapted to test the front-end interface invoked after the current front-end interface element is triggered, obtain the attribute and the corresponding attribute state of the invoked front-end interface, and perform testing and verification based on the attribute state set and the invoked attribute state of the front-end interface.
Optionally, the attributes of the front-end interface include: a state attribute and/or a props attribute.
Optionally, the prompting module is further adapted to:
and responding to the attribute state set not containing the attribute state, sending 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 the 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 execute the automated test verification method of the front-end interface described in any one of the above.
According to still another aspect of the embodiments 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 any of the automated test validation methods of the front end interface described above.
According to the embodiment of the invention, in the process of verifying the front-end interface of the application program, the front-end interface is verified 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 verification result is normal, the problems of low efficiency and low accuracy of the verification of the test result by adopting an image matching mode are avoided, the performability and accurate verification capability of the automatic test are improved, and the effects of improving the test efficiency and accuracy are achieved. Furthermore, because the embodiment of the invention verifies the front-end interface according to the attribute dimension, the test case does not need to be readjusted aiming at the condition that the mode of the front-end interface is frequently changed, thereby greatly saving the test human resources and further improving the efficiency of automatic test verification.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken 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 not to limit the invention. In the drawings:
FIG. 1 is a flow chart illustrating an automated test verification method for a front-end interface according to an embodiment of the invention;
FIG. 2 illustrates a composition diagram of a property state set, according to an embodiment of the invention;
FIG. 3 is a flow chart illustrating an automated test verification method for a front-end interface according to another embodiment of the invention;
FIG. 4 is a diagram illustrating a mapping relationship between a set of attribute states and a set of executing functions according to an embodiment of the invention;
FIG. 5 is a schematic structural diagram of an automated test verification apparatus for a front-end interface according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an automated test verification apparatus for a front-end interface according to another embodiment of the present invention;
fig. 7 is a schematic structural diagram of an automated test and verification apparatus for a front-end interface according to another 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 invention are shown in the drawings, it should be understood that the invention can 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.
To solve the foregoing technical problem, an embodiment of the present invention provides an automated test and verification method for a front-end interface, and fig. 1 illustrates a flow diagram of the automated test and verification method for the front-end interface according to an embodiment of the present invention. Referring to fig. 1, the method for automated test verification of a front-end interface at least includes the following steps S102 to S106.
Step S102, establishing an attribute state set of the front-end interface.
And step S104, testing the 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 can also correspond to different attribute states in different states, and the automatic test verification can be carried out on the front-end interfaces from the aspect of subsequent attributes by acquiring the attributes and the corresponding attribute states of the front-end interfaces.
And step S106, 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.
The attribute state set of the embodiment of the invention comprises a plurality of attribute states, and the attribute states are expected attribute states in an automatic test process.
According to the embodiment of the invention, in the process of verifying the front-end interface of the application program, the front-end interface is verified 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 verification result is normal, the problems of low efficiency and low accuracy of the verification of the test result by adopting an image matching mode are avoided, the performability and accurate verification capability of the automatic test are improved, and the effects of improving the test efficiency and accuracy are achieved. Furthermore, because the embodiment of the invention verifies the front-end interface according to the attribute dimension, the test case does not need to be readjusted aiming at the condition that the mode of the front-end interface is frequently changed, thereby greatly saving the test human resources and further improving the efficiency of automatic test verification.
The software test is to run a system or an application program under a preset condition and evaluate a running result, the preset condition can usually comprise a normal condition and an abnormal condition, in the automatic test verification, a pre-compiled automatic test case is executed in a non-manual mode, and whether the execution result of the automatic test case is in accordance with the expectation or not is judged.
The front-end interface in the embodiment of the invention can be constructed based on React. React 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 fact comprises a state attribute and/or a props attribute. 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 can be re-rendered according to the updated state. The state attribute can be used for controlling the state of the interface component, controlling the interface behavior, updating data and rendering the interface, and the interface component can modify the state. The prop attribute is a one-way data flow value of the React and can be used for communication between components, and the prop attribute is not changeable.
In an embodiment of the present invention, a process of establishing the attribute state set of the front-end interface is specifically as follows.
First, the 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 a front-end interface of a specific application program, attributes included in a plurality of front-end interfaces of the specific application program may be collected first, and it has been described above that the attributes of the front-end interface include a state attribute and/or a prop attribute, that is, one front-end interface may include a state attribute, or include a prop attribute, or include both a state attribute and a prop attribute, where a soft relationship exists between a general state attribute and a prop attribute, and this is not particularly limited in the embodiment of the present invention.
And then, determining attribute states corresponding to the attributes contained in the front-end interfaces in different states.
And further recording the attribute state corresponding to the front-end interface in one state 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 state 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.
And finally, establishing an attribute state set based on the recorded attribute state units.
For example, referring to fig. 2, the states of the stage attribute of the front-end interface of the specified application include n types, p1, p2 through pn, respectively, and the states include n types, s1, s2 through sn, respectively. By collecting the attribute states of the front interface in different states, it is assumed that the front interface 1, the front interface 2, and the front interface 3 respectively include the props attribute, and the corresponding attribute states are p1, p2, and p3, and therefore, p1, p2, and p3 respectively serve as an attribute state unit. Similarly, the front interface 4, the front interface 5, and the front interface 6 each include a state attribute, and the corresponding attribute states are s1, s2, and s3, so s1, s2, and s3 each serve as an attribute state unit. Similarly, the front-end interface 7, the front-end interface 8, the front-end interface 9, the front-end interface 10, and the front-end interface 11 all include a prop attribute and a state attribute, and the attribute states respectively corresponding to p1 s1, p2s 1, p3s1, p2s2, and p2s3, so p1 s1, p2s 1, p3s1, p2s2, and p2s3 are respectively used as an attribute state unit. So that the attribute state set can be established by using the recorded attribute state units.
In an embodiment of the present invention, if the established attribute state set includes a plurality of attribute state units, then, in response to the attribute state included in the attribute state set, it is prompted that whether an attribute state unit consistent with the attribute state of the current front-end interface exists in the dependency state set in the process that the automatic test verification result of the current front-end interface is normal, and if an attribute state unit consistent with the attribute state of the current front-end interface is found, it is prompted that the automatic test verification result of the current front-end interface is normal.
In an embodiment of the present invention, after the attribute state set of the front-end interface is established, an executive function set corresponding to the attribute state set may also be generated, and a process of generating the executive function set is described below.
Firstly, different execution functions are respectively set for different attribute state units. 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 called up.
Then, a mapping relationship is established between the attribute state unit and the corresponding execution function. When the mapping relationship is established, one attribute state unit generally corresponds to one execution function.
And finally, generating an execution function set according to the execution functions establishing the mapping relation with the different attribute state units.
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 called up new front-end interface is continuously checked. Therefore, another method for testing and verifying a front-end interface automatically is provided in the embodiments of the present invention, referring to fig. 3, the method for testing and verifying a front-end interface automatically at least includes the following steps S302 to S312.
Step S302, an attribute state set of the front-end interface is established.
Step S304, testing the current front-end interface to obtain the attribute and the corresponding attribute state of the current front-end interface.
Step S306, whether an attribute state unit consistent with the attribute state of the current front-end interface exists is searched in the dependency state set. If so, go to step S308, otherwise, go to step S309, and end.
And step S308, prompting that the automatic test verification result of the front-end interface is normal.
For specific descriptions of steps S302 to S308 in the embodiment of the present invention, reference may be made to the above embodiments, which are not described herein again.
Step S310, searching whether an execution function having a mapping relation with the attribute state unit exists in the execution function set. The attribute state unit herein refers to an attribute state unit that is 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 on the elements on the front-end interface, and the front-end interface can be subjected to function triggering 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, each attribute state unit maps an execution function in the execution function set, it is assumed that the attribute state unit p1 maps an execution function action1, the attribute state unit p2 maps an execution function action4, the attribute state unit p3 maps an execution function action7, the attribute state unit pn maps an execution function action10, the attribute state unit s1 maps an execution function action2, the attribute state unit s2 maps an execution function action5, the attribute state units 539s 3 maps an execution function 8, the attribute value unit sn 685 maps an execution function action11, and so on the present invention does not perform enumeration one by one.
Step S312, according to the execution function, the operation of triggering the current front-end interface element is executed, so as to call up the corresponding front-end interface.
In the embodiment of the present invention, when the attribute state of the front-end interface is consistent with the attribute state unit in the attribute state set, the operation of triggering the front-end interface element may be executed by using the execution function mapped by the attribute state unit. The front-end interface element in the embodiment of the present invention may be a function button on the front-end interface, or may also be a web page link, and the like, which is not specifically limited in the embodiment of the present invention.
For example, the executing 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 the 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 executing function mapped by the attribute state unit is to execute a dragging function of the front-end interface element, and the front-end interface corresponding to the dragged front-end interface element is invoked after the dragging operation of the front-end interface element is triggered according to the dragging function, and the newly invoked front-end interface is verified.
Further, steps S304 to S312 may be repeatedly executed until all the front-end interface automation test verifications are completed.
When the automatic test and verification are performed on the front-end interface of the designated application program, the automatic test and verification are generally performed on a plurality of front-end interfaces, so that the embodiment of the invention can perform the verification on the front-end interface which is called each time, and perform the automatic test and verification according to the modes from the step S304 to the step S312 until the automatic test and verification of all the front-end interfaces are completed, thereby improving the test and verification efficiency and the test and verification accuracy.
In the embodiment of the invention, in the automatic test and verification process, if the attribute state unit which is 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 which generates the abnormality.
It should be noted that, in practical applications, all the above optional embodiments may be combined in a combined manner at will to form an optional embodiment of the present invention, and details are not described here any more.
Based on the same inventive concept, the embodiment of the present invention further provides an automatic test and verification apparatus for a front-end interface, and fig. 5 shows a schematic structural diagram of the automatic test and verification apparatus for a front-end interface according to an embodiment of the present invention. Referring to fig. 5, the apparatus for automated test verification of a front-end interface may include a setup module 510, a test module 520, and a prompt module 530.
The establishing module 510 is adapted to establish a property state set of the front-end interface.
The testing module 520 is adapted to test the 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 the automatic test check result of the current front-end interface to be normal in response to the attribute state included in the attribute state set.
In an alternative embodiment of the present invention, the front-end interface may be constructed based on React. React 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 fact includes a state attribute and/or a props attribute, and the attribute of the front-end interface of the embodiment includes a state attribute and/or a props attribute.
In an alternative embodiment of the present invention, the creating module 510 is further adapted to first collect attributes included in each of a plurality of front-end interfaces of the designated application. And then, determining attribute states corresponding to the attributes contained in the front-end interface in different states. And further recording the attribute state corresponding to the front-end interface in one state as an attribute state unit. And finally, establishing an attribute state set based on the recorded attribute state units.
In an alternative embodiment of the present invention, the prompting module 530 is further adapted to, first, look up in the dependency state set whether there is an attribute state element that is consistent with the attribute state of the current front-end interface. And then, responding to the attribute state unit which is consistent with the attribute state of the current front-end interface, and prompting that the automatic test verification result of the current front-end interface is normal.
In an optional embodiment of the present invention, as shown in fig. 6, the apparatus shown in fig. 5 above may further include a generating module 540, where the generating module 540 is adapted to set different executing functions for different attribute status units, respectively, establish a mapping relationship between an attribute status unit and a corresponding executing function, and generate an executing function set according to the executing function establishing a mapping relationship with the different attribute status units.
In an alternative embodiment of the present invention, as shown in fig. 7, the apparatus shown in fig. 6 above may further comprise a lookup module 550 and a trigger module 560, wherein,
the searching module 550 is adapted to search the executing function having the mapping relation with the attribute state unit from the executing function set.
And the triggering module 560 is adapted to execute an 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 front-end interface element in the embodiment of the present invention may be a function button on the front-end interface, or may also be a web page link, and the like, which is not specifically limited in the embodiment of the present invention.
The testing module 520 is further adapted to test the front-end interface invoked after triggering the current front-end interface element, obtain the attribute and the corresponding attribute state of the invoked front-end interface, and perform testing and verification based on the attribute state set and the invoked attribute state of the front-end interface.
Based on the same inventive concept, an embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer program codes, and when the computer program codes run on a computing device, the computer storage medium causes the computing device to execute the above-mentioned automated test verification method for a 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 validation method for the front-end interface described above.
It is 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 for the sake of brevity, no further description is provided herein.
In addition, the functional units in the embodiments of the present invention may be physically independent of each other, two or more functional units may be integrated together, or all the functional units may be integrated in one processing unit. The integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.
Those of ordinary skill in the art will understand 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 the form of a software product, which is stored in a storage medium and includes instructions for causing a computing device (e.g., a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: u disk, removable hard disk, Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disk, and other various media capable of storing program code.
Alternatively, all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a computing device, e.g., a personal computer, a server, or a network device) associated with program instructions, which may be stored in a computer-readable storage medium, and when the program instructions are executed by a processor of the computing device, the computing device executes 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 used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments can be modified or some or all of the technical features can be equivalently replaced within the spirit and principle of the present invention; such modifications or substitutions do not depart from the scope of the present invention.

Claims (10)

1. An automated testing and checking method for a front-end interface is characterized by comprising the following steps:
establishing an attribute state set of a front-end interface;
testing the current front-end interface to obtain the attribute and the corresponding attribute state of the current front-end interface;
and 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.
2. The method of claim 1, wherein establishing a set of attribute states for a front-end interface comprises:
collecting attributes contained in a plurality of front-end interfaces in a specified application program;
determining attribute states corresponding to attributes contained in the front-end interface in different states;
recording the attribute state corresponding to a front-end interface in a state as an attribute state unit;
the attribute state collection is established based on the recorded plurality of attribute state units.
3. The method of claim 2, wherein prompting, in response to the attribute status being included in the set of attribute statuses, that an automated test check result of the current front-end interface is 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 verification result of the current front-end interface is normal in response to the attribute state unit which is consistent with the attribute state of the current front-end interface being found.
4. The method of claim 3, wherein after establishing the property state set of the front-end interface, further comprising:
setting different execution functions for the different attribute state units respectively;
establishing a mapping relation between the attribute state unit and the corresponding execution function;
and generating an execution function set according to the execution functions establishing the mapping relation with the different attribute state units.
5. The method of claim 4, wherein after prompting that the automated test verification result of the current front-end interface is normal in response to finding the attribute state unit that is consistent with the attribute state of the current front-end interface, further comprising:
searching the executive function with the 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 a corresponding front-end interface;
and testing the front-end interface which is called up after the current front-end interface element is triggered to obtain the attribute and the corresponding attribute state of the called up front-end interface, and carrying out test verification on the attribute state set and the attribute state of the called up front-end interface.
6. The method of claim 1 or 2, wherein the properties of the front-end interface comprise: a state attribute and/or a props attribute.
7. An automated testing and verification device for a front-end interface, comprising:
the establishing module is suitable for establishing an attribute state set of the front-end interface;
the test module is suitable for testing the current front-end interface to obtain the attribute and the corresponding attribute state of the current front-end interface;
and the prompting module is suitable for 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.
8. The apparatus of claim 7, wherein the establishing module is further adapted to:
collecting attributes contained in a plurality of front-end interfaces in a specified application program;
determining attribute states corresponding to attributes contained in the front-end interface in different states;
recording the attribute state corresponding to a front-end interface in a state as an attribute state unit;
the attribute state collection is established based on the recorded plurality of attribute state units.
9. A computer storage medium having computer program code stored thereon which, when run on a computing device, causes the computing device to perform the automated test validation method of the front-end interface of any of claims 1-6.
10. A computing device, comprising: 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 validation method of the front-end interface of any of claims 1-6.
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 true CN111522737A (en) 2020-08-11
CN111522737B 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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101377759A (en) * 2008-08-26 2009-03-04 中国工商银行股份有限公司 Automatic interface test system
CN102467442A (en) * 2010-11-02 2012-05-23 腾讯科技(深圳)有限公司 Software testing method, system and equipment
CN106033393A (en) * 2015-03-13 2016-10-19 展讯通信(天津)有限公司 Method and system for testing application program, and mobile terminal
US20180365132A1 (en) * 2017-06-14 2018-12-20 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
CN110502442A (en) * 2019-08-15 2019-11-26 平安普惠企业管理有限公司 Dynamic parameter method of calibration, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101377759A (en) * 2008-08-26 2009-03-04 中国工商银行股份有限公司 Automatic interface test system
CN102467442A (en) * 2010-11-02 2012-05-23 腾讯科技(深圳)有限公司 Software testing method, system and equipment
CN106033393A (en) * 2015-03-13 2016-10-19 展讯通信(天津)有限公司 Method and system for testing application program, and mobile terminal
US20180365132A1 (en) * 2017-06-14 2018-12-20 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
CN110502442A (en) * 2019-08-15 2019-11-26 平安普惠企业管理有限公司 Dynamic parameter method of calibration, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111522737B (en) 2023-07-07

Similar Documents

Publication Publication Date Title
US10552301B2 (en) Completing functional testing
US10949225B2 (en) Automatic detection of user interface elements
US20160283353A1 (en) Automated software testing
US20140372985A1 (en) API Rules Verification Platform
JP2017084345A (en) Real-time monitoring of computer system processor and transaction performance during ongoing performance test
US20150169435A1 (en) Method and apparatus for mining test coverage data
CN108111364B (en) Service system testing method and device
CN110673936B (en) Breakpoint continuous operation method and device for arrangement service, storage medium and electronic equipment
WO2019109553A1 (en) Functional and performance test script creation method, device, apparatus and storage medium
CN111737137A (en) Interface test data generation method and device, host and storage medium
US11169910B2 (en) Probabilistic software testing via dynamic graphs
CN110543429B (en) Test case debugging method, device and storage medium
US20160112285A1 (en) Apparatus and method for detecting abnormal connection
CN111679976A (en) Method and device for searching page object
CN114020432A (en) Task exception handling method and device and task exception handling system
US20210141709A1 (en) Automatic software behavior identification using execution record
US11106571B2 (en) Identification of input object in a graphical user interface
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
CN107797917B (en) Performance test script generation method and device
US20140245159A1 (en) Transport script generation based on a user interface script
CN115328891A (en) Data migration method and device, storage medium and electronic equipment
CN113326193A (en) Applet testing method and device
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
JP2016126700A (en) Program verification device, program verification method, and program verification program

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