CN115599681A - Interface test method, device, equipment and storage medium - Google Patents
Interface test method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN115599681A CN115599681A CN202211317474.XA CN202211317474A CN115599681A CN 115599681 A CN115599681 A CN 115599681A CN 202211317474 A CN202211317474 A CN 202211317474A CN 115599681 A CN115599681 A CN 115599681A
- Authority
- CN
- China
- Prior art keywords
- test result
- picture
- graph
- determining
- similarity
- 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.)
- Pending
Links
- 238000010998 test method Methods 0.000 title abstract description 10
- 238000012360 testing method Methods 0.000 claims abstract description 245
- 238000010586 diagram Methods 0.000 claims abstract description 54
- 238000000034 method Methods 0.000 claims abstract description 22
- 238000000354 decomposition reaction Methods 0.000 claims description 25
- 238000004590 computer program Methods 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 13
- 238000010606 normalization Methods 0.000 claims description 7
- 238000004422 calculation algorithm Methods 0.000 description 13
- 239000000047 product Substances 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000013598 vector Substances 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009661 fatigue test Methods 0.000 description 1
- 239000012467 final product Substances 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/761—Proximity, similarity or dissimilarity measures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses an interface test method, an interface test device, interface test equipment and a storage medium, wherein the method comprises the following steps: acquiring a prototype graph corresponding to a tested interface and a test result graph set after the tested interface is tested; determining the similarity between each test result graph and the prototype graph aiming at each test result graph in the test result graph set; and determining the test result graph with the similarity larger than the set threshold as a qualified test result. According to the interface test method provided by the invention, the project prototype diagram is introduced into the interface test, so that the interface test can be automatically executed, thereby freeing testers and improving the test efficiency.
Description
Technical Field
The present invention relates to the field of software technologies, and in particular, to an interface testing method, apparatus, device, and storage medium.
Background
The general project development process mainly comprises: the method comprises the steps of providing requirements, discussing related relation of projects, drawing a prototype diagram, carrying out secondary discussion by combining the requirements on the basis of the prototype diagram, then determining a final implementation scheme and a page display mode of a system, designing a system UI (user interface) according to the prototype diagram, developing the system and integrating the system. The interface test (UI test for short) mainly includes testing whether the layout of the functional modules of the user interface is reasonable, whether the overall style is consistent, whether the placement positions of the controls accord with the use habits of customers, and also testing the convenience of interface operation, simplicity and comprehensibility of navigation, the usability of page elements, whether characters in the interface are correct, whether naming is uniform, whether the page is beautiful, whether the combination of the characters and pictures is perfect, and the like.
In practical tests, when there are too many interface elements, it is easy for the case of missing page elements to occur. Especially, the interface quantity of a newly-built large project is huge, and the omission phenomenon is more serious. In the prior art, when a tester performs interface testing, the tester mainly depends on manual work to compare a prototype drawing with a tested system interface, the efficiency is low, and if the tester only depends on manual checking, fatigue testing is easily caused, so that the probability of missed testing and few testing is increased, and the project quality is difficult to guarantee.
Disclosure of Invention
The invention provides an interface test method, an interface test device, interface test equipment and a storage medium, which are used for realizing automatic interface test.
According to an aspect of the present invention, there is provided an interface testing method, including:
acquiring a prototype graph corresponding to a tested interface and a test result graph set after the tested interface is tested;
determining the similarity between each test result graph and the prototype graph aiming at each test result graph in the test result graph set;
and determining the test result graph with the similarity larger than the set threshold as a qualified test result.
Further, the prototype drawing comprises at least one decomposed picture obtained by decomposing the initial prototype drawing.
Further, determining the similarity between each test result graph and the prototype graph includes:
respectively determining target pictures matched with the test result pictures in the at least one decomposition picture;
and determining the similarity between each test result image and the corresponding target image.
Further, the determining, by the at least one decomposed picture, a picture name set corresponding to the at least one decomposed picture, where the picture name set includes and only includes picture names of the decomposed pictures, and the picture name of each test result picture is from the picture name set, and determining, in the at least one decomposed picture, a target picture matched with each test result picture, respectively includes:
respectively determining the picture name of each test result picture;
and determining the decomposition picture consistent with the picture name of each test result picture in the at least one decomposition picture, and determining the decomposition picture as a corresponding target picture.
Further, determining the similarity between each test result image and the corresponding target image includes:
graying and normalizing each test result image and the corresponding target image;
converting each test result image and the corresponding target image after graying and normalization processing into a test fingerprint character string and a corresponding target fingerprint character string respectively;
and determining a first similarity between the test fingerprint character string and a corresponding target fingerprint character string, and determining the first similarity as the similarity between the test result image and the corresponding target image.
According to another aspect of the present invention, there is provided an interface test apparatus including:
the device comprises a prototype diagram and test result diagram set acquisition module, a test result diagram set acquisition module and a test result diagram set acquisition module, wherein the prototype diagram and test result diagram set acquisition module is used for acquiring a prototype diagram corresponding to a tested interface and a test result diagram set after the tested interface is tested;
the similarity determining module is used for determining the similarity between each test result graph and the prototype graph aiming at each test result graph in the test result graph set;
and the qualified test result determining module is used for determining the test result graph with the similarity larger than the set threshold as a qualified test result.
Optionally, the prototype diagram includes at least one decomposed picture obtained by decomposing the initial prototype diagram.
Optionally, the similarity determining module is further configured to:
respectively determining target pictures matched with the test result pictures in the at least one decomposition picture;
and determining the similarity between each test result image and the corresponding target image.
Optionally, the at least one decomposed picture corresponds to a picture name set, the picture name set includes and only includes picture names of the decomposed pictures, the picture name of each test result picture is from the picture name set, and the similarity determination module is further configured to:
respectively determining the picture name of each test result picture;
and determining the decomposition picture consistent with the picture name of each test result picture in the at least one decomposition picture, and determining the decomposition picture as a corresponding target picture.
Optionally, the similarity determining module is further configured to:
graying and normalizing each test result image and the corresponding target image;
converting each test result image and the corresponding target image after graying and normalization processing into a test fingerprint character string and a corresponding target fingerprint character string respectively;
and determining a first similarity between the test fingerprint character string and a corresponding target fingerprint character string, and determining the first similarity as the similarity between the test result image and the corresponding target image.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the interface testing method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the interface testing method according to any one of the embodiments of the present invention when the computer instructions are executed.
The invention discloses an interface testing method, which comprises the steps of firstly obtaining a prototype graph corresponding to a tested interface and a testing result graph set after testing the tested interface, then determining the similarity between each testing result graph and the prototype graph aiming at each testing result graph in the testing result graph set, and finally determining the testing result graph with the similarity larger than a set threshold value as a qualified testing result. According to the interface test method provided by the invention, the project prototype diagram is introduced into the interface test, so that the interface test can be automatically executed, thereby freeing testers and improving the test efficiency.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present invention, nor are they intended to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an interface testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of an interface testing method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an interface testing apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing the interface testing method according to the fourth embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of an interface testing method provided in an embodiment of the present invention, where the embodiment is applicable to a case of performing an interface test on a user interface, and the method may be executed by an interface testing apparatus, where the interface testing apparatus may be implemented in a form of hardware and/or software, and the interface testing apparatus may be configured in an electronic device. As shown in fig. 1, the method includes:
s110, obtaining a prototype graph corresponding to the tested interface and a test result graph set after testing the tested interface.
The interface test (UI test for short) tests whether the layout of the functional modules of the user interface is reasonable, the overall style is consistent, the placement positions of the controls meet the use habits of customers, and also tests whether the interface operation is convenient, the navigation is simple and easy to understand, the usability of the page elements, whether the characters in the interface are correct, whether the naming is uniform, whether the page is beautiful, whether the combination of the characters and the pictures is perfect, and the like. The most basic definition of the prototype diagram is simulation or sample version of the final product, the prototype diagram is a clearer expression for requirements, and the final interface style and the final presentation element of the system are defined in the prototype diagram by a product manager. The test result graph is an interface graph of an actual product obtained after the tested interface is subjected to multi-angle test.
In this embodiment, the main task of the interface test is to check whether the page layout and the page display elements are consistent with the requirements in the requirement file and the prototype diagram and are correctly displayed according to the collected test result diagram of the test interface.
And S120, determining the similarity between each test result graph and the prototype graph aiming at each test result graph in the test result graph set.
Generally, the test result graph set includes a plurality of test result graphs, and whether the page layout, the page display elements, and the like of each test result graph conform to the prototype graph can be determined by comparing the similarity between each test result graph and the prototype graph.
Optionally, the image similarity calculation method may be a cosine similarity calculation method, a hash algorithm, a histogram algorithm, a structural similarity measurement algorithm, or the like. The cosine similarity calculation method represents the pictures into a vector, and the similarity of the two pictures is represented by calculating the cosine distance between the vectors; the Hash algorithm comprises a mean Hash algorithm, a difference Hash algorithm and a perception Hash algorithm, a picture is taken as a two-dimensional signal of components with different frequencies, wherein a region with small brightness change is a low-frequency component, a region with severe brightness change (such as the edge of an object) is a high-frequency component, and the Hash algorithm utilizes the low-frequency information of the picture to calculate the similarity; the histogram algorithm measures the similarity of histograms of two images according to a certain distance measurement standard; the Structural Similarity (SSIM) is an index for measuring the similarity between two images, and the SSIM algorithm mainly compares the brightness, contrast and structure of two images, weights the three elements and expresses the three elements by a product.
And S130, determining the test result graph with the similarity larger than the set threshold as a qualified test result.
The set threshold may be a similarity threshold preset by a tester.
In this embodiment, if the similarity after comparing a certain test result diagram with the prototype diagram is greater than the set threshold, it may be determined that the product interface corresponding to the test result diagram conforms to the prototype diagram, and the test is passed; if the similarity between a certain test result diagram and the prototype diagram is smaller than or equal to the set threshold, it can be considered that functions, layouts or elements and the like which are inconsistent with the prototype diagram exist in the product interface corresponding to the test result diagram, and the product interface can be marked as a bug so that a tester can correct the bug later.
The embodiment of the invention discloses an interface testing method, which comprises the steps of firstly obtaining a prototype graph corresponding to a tested interface and a testing result graph set after testing the tested interface, then determining the similarity between each testing result graph and the prototype graph aiming at each testing result graph in the testing result graph set, and finally determining the testing result graph with the similarity larger than a set threshold value as a qualified testing result. According to the interface test method provided by the invention, the project prototype diagram is introduced into the interface test, so that the interface test can be automatically executed, thereby freeing testers and improving the test efficiency.
Example two
Fig. 2 is a flowchart of an interface testing method according to a second embodiment of the present invention, which is a refinement of the second embodiment. As shown in fig. 2, the method includes:
s210, obtaining a prototype graph corresponding to the tested interface and a test result graph set after testing the tested interface.
In this embodiment, the main task of the interface test is to check whether the page layout and the page display elements are consistent with the requirements in the requirement file and the prototype diagram and are correctly displayed according to the collected test result diagram of the test interface.
Optionally, the prototype drawing includes at least one decomposed picture obtained by decomposing the initial prototype drawing.
Specifically, in order to obtain a more accurate comparison result between the test result graph and the prototype graph, a plurality of decomposition pictures can be obtained by disassembling the initial prototype graph, and the similarity between the test result graph and the decomposition pictures is calculated.
Preferably, the prototype drawing can be disassembled by using a preset prototype drawing disassembling tool, and each part in the prototype drawing is disassembled and is named by a number. The naming rule for decomposing the picture may be: primary function-secondary function-tertiary function-final function.
S220, aiming at each test result image in the test result image set, respectively determining a target image matched with each test result image in at least one decomposition image.
The target picture is a picture which is consistent with an expected test result of the test result picture in the decomposition picture of the prototype picture. For example, when the main interface layout of the product interface is tested, a test result graph is obtained, and accordingly, the target graph matched with the test result graph is the main interface layout graph disassembled from the initial prototype graph.
Optionally, the decomposed pictures obtained by the decomposition may correspond to a picture name set, where the picture name set includes and only includes picture names of the decomposed pictures, and then the picture names of the test result pictures are all from the picture name set. Based on this, the manner of respectively determining the target pictures matched with the test result graphs in the at least one decomposed picture may be as follows: respectively determining the picture names of the test result pictures; and determining the decomposition picture consistent with the picture name of each test result picture in the at least one decomposition picture, and determining the decomposition picture as a corresponding target picture.
Specifically, the decomposed pictures obtained by the decomposition may be named according to a set rule, the named decomposed pictures may be stored in a database table origin _ picture, and the picture name collection of the decomposed pictures is recorded as a set M.
The table structure of the database table origin _ picture is as follows:
column name | Column name explanation |
Id | Number of |
Picture_name | Picture name |
Picture | Decomposing pictures |
The set M is a set of column values corresponding to Picture _ name in the database table origin _ Picture.
Further, when the test result graph is named, the name of the test result graph of the tester can be limited to be selected from the set M. The named test result graph may be stored in a database table test _ result _ picture.
The table structure of the database table test _ result _ picture is as follows:
traversing a database table Test _ result _ Picture, extracting a line of data A, searching in a database table origin _ Picture according to the Test _ result _ Picture recorded in the data A, and extracting data B, wherein the Picture _ name recorded in the data B is consistent with the Test _ result _ Picture recorded in the data A, and the Picture recorded in the data B is the target Picture matched with the Test _ Picture recorded in the data A.
And S230, determining the similarity between each test result image and the corresponding target image.
In this embodiment, whether the test result graph conforms to the prototype graph may be determined by calculating the similarity between the test result graph and the corresponding target graph.
Optionally, the manner of determining the similarity between each test result image and the corresponding target image may be: carrying out graying and normalization processing on each test result image and the corresponding target image; converting each test result image after graying and normalization processing and the corresponding target image into a test fingerprint character string and a corresponding target fingerprint character string respectively; and determining the first similarity between the test fingerprint character string and the corresponding target fingerprint character string, and determining the first similarity as the similarity between the test result image and the corresponding target image.
Specifically, taking a row of data a in the database table test _ result _ Picture as an example, the target Picture matching the test _ result _ Picture recorded therein is the Picture recorded in the data B in the database table origin _ Picture. The Picture and the Test _ Picture are preprocessed, and in order to improve the accuracy of the final Picture ratio, the two pictures may be grayed first, and then the sizes of the two pictures are normalized, for example, the sizes of the two pictures may be unified to be 10 × 10 cm. And then, calculating fingerprint character strings of the two processed pictures by using a perceptual hash algorithm to obtain a test fingerprint character string and a corresponding target fingerprint character string, and comparing the similarity of the two fingerprint character strings. And taking the similarity of the two fingerprint character strings as the similarity of the test result image and the corresponding target image.
And determining the similarity between each test result image in the test _ result _ picture and the corresponding target picture by traversing the database table test _ result _ picture.
And S240, determining the test result graph with the similarity larger than the set threshold as a qualified test result.
In this embodiment, after the similarity between each test result graph and the corresponding target graph is calculated, the test result graph with the calculated result being greater than the set threshold may be determined as a qualified test result.
Preferably, data a and data B corresponding to the similarity degree smaller than or equal to the set threshold may be recorded in the result file result. And displaying records in result.txt, wherein the records are functions that a system interface is inconsistent with a prototype diagram, and the records are recorded as bugs by a tester and are corrected.
The embodiment of the invention discloses an interface testing method, which comprises the steps of firstly obtaining a prototype graph corresponding to a tested interface and a testing result graph set after testing the tested interface, then respectively determining target pictures matched with all testing result graphs in at least one decomposition picture aiming at all testing result graphs in the testing result graph set, then determining the similarity between all testing result graphs and the corresponding target pictures, and finally determining the testing result graphs with the similarity larger than a set threshold value as qualified testing results. According to the interface test method provided by the invention, the project prototype diagram is introduced into the interface test, so that the interface test can be automatically executed, thereby freeing testers and improving the test efficiency. In addition, the Hash algorithm is introduced when the similarity of the pictures is compared, and the pictures are subjected to gray processing and normalization processing before the fingerprint character strings are calculated, so that the accuracy of the test result of the automatic interface is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an interface testing apparatus according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a prototype graph and test result graph set obtaining module 310, a similarity determining module 320 and a qualified test result determining module 330.
The prototype diagram and test result diagram set obtaining module 310 is configured to obtain a prototype diagram corresponding to the interface to be tested and a test result diagram set after the interface to be tested is tested.
The similarity determining module 320 is configured to determine, for each test result diagram in the test result diagram set, a similarity between each test result diagram and the prototype diagram.
Optionally, the prototype drawing includes at least one decomposed picture obtained by decomposing the initial prototype drawing.
Optionally, the similarity determining module 320 is further configured to:
respectively determining target pictures matched with the test result pictures in the at least one decomposition picture; and determining the similarity between each test result image and the corresponding target image.
Optionally, the at least one decomposed picture corresponds to a picture name set, the picture name set includes and only includes picture names of the decomposed pictures, the picture names of the test result pictures are from the picture name set, and the similarity determining module 320 is further configured to:
respectively determining the picture names of the test result pictures; and determining the decomposition picture consistent with the picture name of each test result picture in the at least one decomposition picture, and determining the decomposition picture as a corresponding target picture.
Optionally, the similarity determining module 320 is further configured to:
graying and normalizing each test result image and the corresponding target image; converting each test result image after graying and normalization processing and the corresponding target image into a test fingerprint character string and a corresponding target fingerprint character string respectively; and determining a first similarity between the test fingerprint character string and the corresponding target fingerprint character string, and determining the first similarity as the similarity between the test result image and the corresponding target image.
And a qualified test result determining module 330, configured to determine the test result graph with the similarity greater than the set threshold as a qualified test result.
The interface testing device provided by the embodiment of the invention can execute the interface testing method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
FIG. 4 shows a schematic block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as the interface test method.
In some embodiments, the interface testing method may be implemented as a computer program that is tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the interface test described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the interface test method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (8)
1. An interface testing method, comprising:
acquiring a prototype graph corresponding to a tested interface and a test result graph set after the tested interface is tested;
determining the similarity between each test result graph and the prototype graph aiming at each test result graph in the test result graph set;
and determining the test result graph with the similarity larger than the set threshold as a qualified test result.
2. The method of claim 1, wherein the prototype drawing comprises at least one decomposed picture obtained by disassembling the initial prototype drawing.
3. The method of claim 2, wherein determining the similarity between each of the test result graphs and the prototype graph comprises:
respectively determining a target picture matched with each test result picture in the at least one decomposition picture;
and determining the similarity between each test result image and the corresponding target image.
4. The method of claim 3, wherein the at least one decomposed picture corresponds to a picture name set, the picture name set includes and only includes picture names of the decomposed pictures, the picture name of each test result graph is from the picture name set, and the determining a target picture matching each test result graph in the at least one decomposed picture respectively comprises:
respectively determining the picture name of each test result picture;
and determining the decomposition picture consistent with the picture name of each test result picture in the at least one decomposition picture as a corresponding target picture.
5. The method of claim 3, wherein determining the similarity between each test result graph and the corresponding target graph comprises:
graying and normalizing each test result image and the corresponding target image;
converting each test result image and the corresponding target image after graying and normalization processing into a test fingerprint character string and a corresponding target fingerprint character string respectively;
and determining a first similarity between the test fingerprint character string and the corresponding target fingerprint character string, and determining the first similarity as the similarity between the test result image and the corresponding target image.
6. An interface testing apparatus, comprising:
the device comprises a prototype diagram and test result diagram set acquisition module, a test result diagram acquisition module and a test result diagram acquisition module, wherein the prototype diagram and test result diagram set acquisition module is used for acquiring a prototype diagram corresponding to a tested interface and a test result diagram set after the tested interface is tested;
the similarity determining module is used for determining the similarity between each test result graph and the prototype graph aiming at each test result graph in the test result graph set;
and the qualified test result determining module is used for determining the test result graph with the similarity larger than the set threshold as a qualified test result.
7. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the interface testing method of any one of claims 1-5.
8. A computer-readable storage medium having stored thereon computer instructions for causing a processor to, when executed, implement the interface testing method of any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211317474.XA CN115599681A (en) | 2022-10-26 | 2022-10-26 | Interface test method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211317474.XA CN115599681A (en) | 2022-10-26 | 2022-10-26 | Interface test method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115599681A true CN115599681A (en) | 2023-01-13 |
Family
ID=84850557
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211317474.XA Pending CN115599681A (en) | 2022-10-26 | 2022-10-26 | Interface test method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115599681A (en) |
-
2022
- 2022-10-26 CN CN202211317474.XA patent/CN115599681A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022121337A1 (en) | Data exploration method and apparatus, and electronic device and storage medium | |
CN115455091A (en) | Data generation method and device, electronic equipment and storage medium | |
CN117593115A (en) | Feature value determining method, device, equipment and medium of credit risk assessment model | |
CN116340831B (en) | Information classification method and device, electronic equipment and storage medium | |
CN117724980A (en) | Method and device for testing software framework performance, electronic equipment and storage medium | |
CN117668192A (en) | Data processing method, device, equipment and storage medium | |
CN111311393A (en) | Credit risk assessment method, device, server and storage medium | |
CN115344495A (en) | Data analysis method and device for batch task test, computer equipment and medium | |
CN115599681A (en) | Interface test method, device, equipment and storage medium | |
CN114443493A (en) | Test case generation method and device, electronic equipment and storage medium | |
CN115659347A (en) | Safety testing method and device, electronic equipment and storage medium | |
CN114722401A (en) | Equipment safety testing method, device, equipment and storage medium | |
CN114741291A (en) | Method, device, equipment and medium for automatically submitting vulnerability information | |
CN114866437A (en) | Node detection method, device, equipment and medium | |
CN114116688A (en) | Data processing and data quality inspection method, device and readable storage medium | |
CN113032071A (en) | Page element positioning method, page testing method, device, equipment and medium | |
CN113835893B (en) | Data processing method, device, equipment, storage medium and program product | |
CN115617676A (en) | Method and device for determining software test range, electronic equipment and storage medium | |
CN117493785A (en) | Data processing method and device and electronic equipment | |
CN117370399A (en) | Form comparison method and device, target database and storage medium | |
CN115757306A (en) | Information compression method, device, equipment and storage medium | |
CN117115568A (en) | Data screening method, device, equipment and storage medium | |
CN115437962A (en) | Test case generation method, device, equipment and storage medium | |
CN115904839A (en) | Memory bandwidth detection method, device, equipment and storage medium | |
CN114595339A (en) | Method and device for detecting triple relation change, electronic equipment and 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 |