CN112559340A - Picture testing method, device, equipment and storage medium - Google Patents
Picture testing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112559340A CN112559340A CN202011448022.6A CN202011448022A CN112559340A CN 112559340 A CN112559340 A CN 112559340A CN 202011448022 A CN202011448022 A CN 202011448022A CN 112559340 A CN112559340 A CN 112559340A
- Authority
- CN
- China
- Prior art keywords
- test
- picture
- image
- application program
- interface
- 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
- 238000012360 testing method Methods 0.000 title claims abstract description 271
- 238000000034 method Methods 0.000 claims abstract description 55
- 230000008569 process Effects 0.000 claims abstract description 38
- 239000013598 vector Substances 0.000 claims description 20
- 238000013507 mapping Methods 0.000 claims description 6
- 230000009466 transformation Effects 0.000 claims description 5
- 238000010998 test method Methods 0.000 claims description 3
- 238000012937 correction Methods 0.000 abstract description 6
- 230000007547 defect Effects 0.000 abstract description 6
- 230000006870 function Effects 0.000 description 11
- 230000003287 optical effect Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 230000002159 abnormal effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 239000000306 component Substances 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 239000008358 core component Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 210000001525 retina Anatomy 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000013519 translation 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention discloses a picture testing method, a device, equipment and a storage medium. The method comprises the following steps: acquiring at least one test picture image displayed by an application program in a test process through a preset image object interface; carrying out similarity matching on the standard picture images respectively corresponding to the test picture images and the test picture images to obtain matching results; and generating a picture test report corresponding to the application program based on the matching result, and outputting the picture test report. The embodiment of the invention solves the problems that the traditional automatic test system does not have a picture abnormity test function and the test picture image is obtained, so that the test data about the display picture is obtained after the automatic test is finished, the subsequent correction work is guided, and the probability of picture defects after the application program is put into use is reduced.
Description
Technical Field
The embodiment of the invention relates to the technical field of game testing, in particular to a picture testing method, a device, equipment and a storage medium.
Background
The traditional automatic test system is based on a code interface and an intrusive design, the actual returned result obtained by the test of the automatic test system is a returned value generated by an application program, and a user of the application program only cares about an output result after input operation.
In the actual testing process of the conventional automatic testing system, the result that the automatic return value is correct often appears, and the conclusion that the program runs normally is obtained, but the display picture seen by the user at the output end has obvious defects or errors, such as missing or undisplayed objects in the display picture, and the like. Therefore, the conventional automatic test system has the problem that the abnormal picture display of the application program in the running process cannot be accurately tested.
Disclosure of Invention
The embodiment of the invention provides a picture testing method, a picture testing device, picture testing equipment and a storage medium, which are used for solving the problems that a traditional automatic testing system does not have a picture abnormity testing function and a testing picture image is obtained.
In a first aspect, an embodiment of the present invention provides a picture testing method, where the method includes:
acquiring at least one test picture image displayed by an application program in a test process through a preset image object interface;
carrying out similarity matching on the standard picture images respectively corresponding to the test picture images and the test picture images to obtain matching results;
and generating a picture test report corresponding to the application program based on the matching result, and outputting the picture test report.
In a second aspect, an embodiment of the present invention further provides an image testing apparatus, where the apparatus includes:
the test picture image acquisition module is used for acquiring at least one test picture image displayed by the application program in the test process through a preset image object interface;
the similarity matching module is used for performing similarity matching on the standard picture images respectively corresponding to the test picture images and the test picture images to obtain matching results;
and the picture test report output module is used for generating a picture test report corresponding to the application program based on the matching result and outputting the picture test report.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement any of the screen testing methods referred to above.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform any one of the above-mentioned screen testing methods.
The embodiment of the invention acquires the standard picture image through the preset image object interface, and generates the picture test report based on the similarity matching result of the test picture image and the standard picture image displayed in the test process, thereby solving the problems that the traditional automatic test system does not have the picture abnormity test function and the test picture image is acquired, and obtaining the test data about the display picture after the automatic test is finished, thereby being beneficial to guiding the subsequent correction work and reducing the probability of the picture defect of the application program after the application program is put into use.
Drawings
Fig. 1 is a flowchart of a picture testing method according to an embodiment of the present invention.
Fig. 2 is a flowchart of a picture testing method according to a second embodiment of the present invention.
Fig. 3 is a schematic diagram of a screen testing apparatus according to a third embodiment of the present invention.
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a picture testing method according to an embodiment of the present invention, where the present embodiment is applicable to a case of testing a display picture in an application testing process, and the method may be executed by a picture testing apparatus, where the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be configured in a terminal device. The method specifically comprises the following steps:
s110, acquiring at least one test picture image displayed by the application program in the test process through a preset image object interface.
An application is a computer program that may be used to perform one or more specific tasks, with a visual user interface for interaction with a user. The application program is not limited herein. In one embodiment, the application program is optionally game software.
In one embodiment, the preset image object interface optionally includes at least one of a graphics processor interface, an operating system interface, and an application engine interface.
The Graphic Processing Unit (GPU) is a microprocessor that performs image and graphic related operations on a terminal device, and is used to convert display information required by the terminal device to drive a display, provide progressive or interlaced signals to the display, and control correct display of the display, and is an important element for connecting the display and the terminal device. The terminal devices may be computers, workstations, game machines, mobile terminals, and the like, for example.
Specifically, the image data in the graphics processor may be acquired through the graphics processor interface. In an embodiment, optionally, acquiring at least one test screen image displayed by the application program in the test process through a preset image object interface includes: in the testing process of the application program, at least one testing picture image in the graphic processor is obtained through screenshot software and a graphic processor interface. Specifically, the screenshot software is used for acquiring at least one test picture image output by the graphic processor interface. Illustratively, in the testing process of the application program, the test picture image output by the graphics processor interface is drawn to the display and simultaneously acquired through the screenshot software. Or, the test picture image output by the graphic processor interface is directly drawn into the screenshot software through the screenshot software.
In an embodiment, optionally, acquiring at least one test screen image displayed by the application program in the test process through a preset image object interface includes: and acquiring at least one test picture image output by an engine interface of the application program in the test process of the application program.
The application engine may be, for example, a game engine, which refers to a core component of some edited computer game system or some interactive real-time image application. A game engine is a set of code (instructions) designed for a machine running a certain type of game that can be recognized by the machine.
Specifically, the application engine interface may be configured to obtain a test frame image in the graphics processor. In the development process of the application program, the engine interface of the application program is defined, so that at least one test picture image displayed by the application program can be acquired through the engine interface of the application program in the test process of the application program.
And S120, performing similarity matching on the standard picture images respectively corresponding to the test picture images and the test picture images to obtain matching results.
Specifically, the standard screen image is an image for similarity matching, which is preset and corresponds to each test screen image.
In one embodiment, the optional similarity matching method includes, but is not limited to, a perceptual hash algorithm, a convolutional neural network model, a scale invariant feature transformation algorithm, a euclidean distance-based similarity matching algorithm, a manhattan distance-based similarity matching algorithm, a hamming distance-based similarity matching algorithm, or a pearson correlation coefficient-based similarity matching algorithm.
In one embodiment, the matching result is a matching degree between the test screen image and the standard screen image or a matching relationship between the test screen image and the standard screen image, for example, the matching degree may be 40%, 80%, or 90%, and the like, and the matching relationship may be matching success or matching failure. In another embodiment, a preset matching degree threshold is preset, and the matching degree between the test picture image and the standard picture image is compared with the preset matching degree threshold.
And S130, generating a picture test report corresponding to the application program based on the matching result, and outputting the picture test report.
In one embodiment, if the matching result is that the matching degree is greater than or equal to a preset matching degree threshold, a picture test report of test qualified information corresponding to the test picture image is generated, and if the matching result is that the matching degree is less than the preset matching degree threshold, a picture test report of test unqualified information corresponding to the test picture image is generated.
According to the technical scheme, the standard picture image is obtained through the preset image object interface, the picture test report is generated based on the similarity matching result of the test picture image and the standard picture image displayed in the test process, the problems that a traditional automatic test system does not have a picture abnormity test function and the test picture image is obtained are solved, test data about a display picture are obtained after the automatic test is finished, and therefore subsequent correction work is guided, and the probability of picture defects after an application program is put into use is reduced.
Example two
Fig. 2 is a flowchart of a picture testing method provided in the second embodiment of the present invention, and the technical solution of the present embodiment is further detailed based on the above-mentioned embodiments. Optionally, the obtaining, through a preset image object interface, at least one test picture image displayed by the application program in the test process includes: in the testing process of the application program, communicating an image acquisition interface of the application program with a preset image interface in an operating system interface; the preset image interface comprises a video interface and/or a screenshot interface; and acquiring at least one test picture image corresponding to the application program acquired by the preset image interface through the image acquisition interface.
The specific implementation steps of this embodiment include:
s210, in the testing process of the application program, communicating an image acquisition interface of the application program with a preset image interface in an operating system interface.
In this embodiment, the preset image interface includes a video recording interface and/or a screenshot interface. Specifically, the video recording interface is used for recording a test picture image displayed by an application program in the test process to obtain a recorded video. The recorded video comprises at least two continuous test picture images. Specifically, the screenshot interface is used for performing screenshot operation on a test picture image displayed by an application program in the test process. The test picture image displayed by the application program may be a test picture image drawn into the display or a test picture image in the graphics processor, for example.
In one embodiment, when the preset image interface includes a video recording interface, the recorded video acquired by the video recording interface is acquired through the image acquisition interface. In one embodiment, optionally, the method further comprises: at least one test picture image is determined based on the recorded video.
In one embodiment, optionally, determining at least one test picture image based on the recorded video comprises: and taking each video frame in the recorded video as a test picture image.
In another embodiment, optionally, determining at least one test picture image based on the recorded video comprises: at least one test picture image is determined based on a preset acquisition frequency. For example, when the recorded video includes video frames 1, 2, 3, 4 and 5, assuming that the preset capture frequency is one video frame apart, the video frames 1, 3 and 5 are used as the test picture images. Assuming that the preset acquisition frequency is two video frames apart, the video frame 1 and the video frame 4 are taken as test images.
In another embodiment, optionally, determining at least one test picture image based on the recorded video comprises: and acquiring a test picture image corresponding to a preset time period in the recorded video. Specifically, the preset time period may be one or more. Illustratively, the preset time periods include 0 second to 5 seconds and 10 seconds to 20 seconds, and then video frames within 0 seconds to 5 seconds and video frames within 10 seconds to 20 seconds in the recorded video are taken as the test picture images.
Of course, besides the above selection manners, the embodiments of the present invention may also protect any other feasible selection manners, and the specific selection manner of the test picture image is not limited in the present embodiment.
S220, acquiring at least one test picture image corresponding to the application program acquired by the preset image interface through the image acquisition interface.
And S230, performing similarity matching on the standard picture images respectively corresponding to the test picture images and the test picture images to obtain matching results.
In an embodiment, optionally, the performing similarity matching between the standard picture image and each test picture image respectively corresponding to each test picture image to obtain a matching result includes: respectively extracting the features of the test picture image and the standard picture image based on a scale-invariant feature transformation algorithm aiming at each test picture image to obtain a test feature vector corresponding to the test picture image and a standard feature vector corresponding to the standard picture image; and performing similarity matching on the test picture image and the standard picture image based on the test feature vector and the standard feature vector to obtain a matching result.
The Scale-Invariant Feature Transform (SIFT) is an algorithm based on computer vision, and is used for detecting and describing local features in an image. The SIFT algorithm is characterized in that: the image local feature description operator extracted by the SIFT algorithm keeps invariance to rotation, scale scaling and brightness change, and also keeps certain stability to view angle change, affine transformation and noise; the uniqueness is high, the SIFT algorithm is rich in information quantity, and the method is suitable for quick and accurate matching in a massive feature database; the multiplicity, even if the image contains few objects, can generate a large number of SIFT feature vectors; high speed, the optimized SIFT matching algorithm can even meet the real-time requirement; and the expandability can be conveniently combined with the feature vectors in other forms.
Specifically, the specific steps of extracting the features of the SIFT algorithm to obtain the feature vector mainly include: detecting extreme points in a multi-scale space, accurately positioning key points, calculating the main direction of the key points and constructing a descriptor. The extreme point detection method comprises the steps that a plurality of scale space extreme points are detected, specifically, scales are used for accurately describing the size of an object, the same object is observed at different distances and has different sizes, the natural scales are different, and the scale space can simulate the change process of imaging of a target on a retina when the distance from the target to the target is from near to far. And constructing a plurality of scale spaces, wherein in different scale spaces, the blurring degree of the image is increased along with the increase of the scale, and carrying out extreme point detection in the scale spaces. Specifically, the extreme point is a point that does not disappear due to a change in illumination, and the corner point, the edge point, the bright point in the dark area, and the dark point in the bright area are all points that meet the requirement of the extreme point. Specifically, after extreme points are obtained based on Difference of Gaussian (DoG) operation, because a DoG operator generates a strong edge response, curve fitting needs to be performed on a DoG function in order to enhance matching stability and improve anti-noise capability, so as to accurately determine the positions and dimensions of the key points, and simultaneously remove low-contrast key points and unstable edge responses. Specifically, in order to prevent the key points from changing with the rotation of the image, a direction parameter needs to be specified for each key point, that is, a reference direction is assigned to each key point. Specifically, the position, scale and direction information of each key point is obtained through the steps and corresponds to the inconvenience of translation, scaling and rotation, but the key points exist independently at the moment, the relationship between the key points and surrounding pixel points is not considered, the descriptor is built by selecting the key points and pixels in the neighborhood of the key points, and the key points are described by using a group of feature vectors.
Specifically, the test feature vector is a descriptor constructed based on the test picture image by adopting an SIFT algorithm, and the standard feature vector is a descriptor constructed based on the standard picture image by adopting the SIFT algorithm. In one embodiment, optionally, the degree of matching of the test picture image and the standard picture image is determined based on the euclidean distance between the test feature vector and the standard feature vector. Specifically, for any key point in the test picture image, the first two key points in the standard picture image, which are closest to the euclidean distance of the key point, are determined, and if the ratio of the closest euclidean distance to the next closest euclidean distance is smaller than a preset proportion threshold, the key point in the test picture image and the key point in the standard picture image, which is closest to the key point in the euclidean distance, are used together as a pair of matching points. Illustratively, the ratio between the logarithm of the matching points and the total number of keypoints in the test screen image is taken as the degree of matching between the test screen image and the standard screen image.
And S240, generating a picture test report corresponding to the application program based on the matching result, and outputting the picture test report.
On the basis of the foregoing embodiment, optionally, the standard screen image includes a first map image that does not include a purple block map and/or a second map image that includes a purple block map, and accordingly, based on the matching result, the generating of the screen test report corresponding to the application program includes: when the standard picture image comprises a first map image, if the matching result is that the matching degree between the test picture image and the first map image is smaller than a preset matching degree threshold value, generating a first picture test report containing test unqualified information corresponding to the test picture image; and/or when the standard picture image comprises a second mapping image, if the matching result is that the matching degree between the test picture image and the second mapping image is greater than or equal to a preset matching degree threshold value, generating a second picture test report containing the test failure information corresponding to the test picture image.
The purple block map can represent the display map in abnormal states such as damage or loss of the map in the game engine and the like, and is used for prompting that the map display is abnormal. Note that the purple block map is merely a map display abnormality, and the color, form, and the like of the display map in the abnormal state are not limited, and the display map in the abnormal state may be red, for example.
According to the technical scheme, the image acquisition interface of the application program is communicated with the preset image interface in the operating system interface, and the image acquisition interface acquires at least one test picture image corresponding to the application program acquired by the preset image interface, so that the problem of the test picture image in the test process of the application program is solved, a test report about a display picture is obtained after the automatic test is finished, and the subsequent correction work is guided.
EXAMPLE III
Fig. 3 is a schematic diagram of a screen testing apparatus according to a third embodiment of the present invention. The embodiment can be applied to the case of testing the display screen in the application program testing process, the device can be realized in a software and/or hardware mode, and the device can be configured in the terminal equipment. The picture test device includes: a test screen image acquisition module 310, a similarity matching module 320 and a screen test report output module 330.
The test picture image obtaining module 310 is configured to obtain at least one test picture image displayed by an application program in a test process through a preset image object interface;
the similarity matching module 320 is used for performing similarity matching on the standard picture images and the test picture images respectively corresponding to the test picture images to obtain matching results;
and the screen test report output module 330 is configured to generate a screen test report corresponding to the application program based on the matching result, and output the screen test report.
According to the technical scheme, the standard picture image is obtained through the preset image object interface, the picture test report is generated based on the similarity matching result of the test picture image and the standard picture image displayed in the test process, the problems that a traditional automatic test system does not have a picture abnormity test function and the test picture image is obtained are solved, test data about a display picture are obtained after the automatic test is finished, and therefore subsequent correction work is guided, and the probability of picture defects after an application program is put into use is reduced.
On the basis of the above technical solution, optionally, the preset image object interface includes at least one of a graphics processor interface, an operating system interface, and an application engine interface.
On the basis of the above technical solution, optionally, the test picture image obtaining module 310 includes:
and the first test picture image acquisition unit is used for acquiring at least one test picture image in the graphic processor through screenshot software and a graphic processor interface in the test process of the application program.
On the basis of the above technical solution, optionally, the test picture image obtaining module 310 includes:
the second test picture image acquisition unit is used for communicating the image acquisition interface of the application program with a preset image interface in the operating system interface in the test process of the application program; the preset image interface comprises a video interface and/or a screenshot interface; and acquiring at least one test picture image corresponding to the application program acquired by the preset image interface through the image acquisition interface.
On the basis of the above technical solution, optionally, the test picture image obtaining module 310 includes:
and the third test picture image acquisition unit is used for acquiring at least one test picture image output by the engine interface of the application program in the test process of the application program.
On the basis of the above technical solution, optionally, the similarity matching module 320 is specifically configured to:
respectively extracting the features of the test picture image and the standard picture image based on a scale-invariant feature transformation algorithm aiming at each test picture image to obtain a test feature vector corresponding to the test picture image and a standard feature vector corresponding to the standard picture image;
and performing similarity matching on the test picture image and the standard picture image based on the test feature vector and the standard feature vector to obtain a matching result.
On the basis of the foregoing technical solution, optionally, the standard screen image includes a first map image that does not include a purple block map and/or a second map image that includes a purple block map, and correspondingly, the screen test report output module 330 is specifically configured to:
when the standard picture image comprises a first map image, if the matching result is that the matching degree between the test picture image and the first map image is smaller than a preset matching degree threshold value, generating a first picture test report containing test unqualified information corresponding to the test picture image; and/or the presence of a gas in the gas,
and when the standard picture image comprises a second mapping image, if the matching result is that the matching degree between the test picture image and the second mapping image is greater than or equal to a preset matching degree threshold value, generating a second picture test report containing the test unqualified information corresponding to the test picture image.
The picture testing device provided by the embodiment of the invention can be used for executing the picture testing method provided by the embodiment of the invention, and has corresponding functions and beneficial effects of the executing method.
It should be noted that, in the embodiment of the screen test apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Example four
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention, where the embodiment of the present invention provides a service for implementing the screen test method according to the foregoing embodiment of the present invention, and the screen test apparatus according to the foregoing embodiment may be configured. FIG. 4 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 4 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 4, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The processing unit 16 executes various functional applications and data processing, such as implementing a picture test method provided by an embodiment of the present invention, by running a program stored in the system memory 28.
By the electronic equipment, the problems that a traditional automatic test system does not have a picture abnormity test function and test picture images are obtained are solved, test data about a display picture are obtained after the automatic test is finished, and therefore subsequent correction work is guided, and the probability of picture defects after an application program is put into use is reduced.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a picture testing method, and the method includes:
acquiring at least one test picture image displayed by an application program in a test process through a preset image object interface;
carrying out similarity matching on the standard picture images respectively corresponding to the test picture images and the test picture images to obtain matching results;
and generating a picture test report corresponding to the application program based on the matching result, and outputting the picture test report.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having 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 portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the above method operations, and may also perform related operations in the screen testing method provided by any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A picture test method is characterized by comprising the following steps:
acquiring at least one test picture image displayed by an application program in a test process through a preset image object interface;
carrying out similarity matching on the standard picture images respectively corresponding to the test picture images and the test picture images to obtain matching results;
and generating a picture test report corresponding to the application program based on the matching result, and outputting the picture test report.
2. The method of claim 1, wherein the default image object interface comprises at least one of a graphics processor interface, an operating system interface, and an application engine interface.
3. The method according to claim 2, wherein the obtaining, through the preset image object interface, at least one test picture image displayed by the application program in the test process comprises:
in the testing process of the application program, at least one testing picture image in the graphic processor is obtained through screenshot software and a graphic processor interface.
4. The method according to claim 2, wherein the obtaining, through the preset image object interface, at least one test picture image displayed by the application program in the test process comprises:
in the testing process of the application program, communicating an image acquisition interface of the application program with a preset image interface in an operating system interface; the preset image interface comprises a video interface and/or a screenshot interface;
and acquiring at least one test picture image corresponding to the application program acquired by the preset image interface through the image acquisition interface.
5. The method according to claim 2, wherein the obtaining, through the preset image object interface, at least one test picture image displayed by the application program in the test process comprises:
and acquiring at least one test picture image output by an engine interface of the application program in the test process of the application program.
6. The method according to claim 1, wherein the performing similarity matching between the standard picture image respectively corresponding to each of the test picture images and each of the test picture images to obtain a matching result comprises:
respectively extracting the features of the test picture image and the standard picture image based on a scale-invariant feature transformation algorithm aiming at each test picture image to obtain a test feature vector corresponding to the test picture image and a standard feature vector corresponding to the standard picture image;
and performing similarity matching on the test picture image and the standard picture image based on the test feature vector and the standard feature vector to obtain a matching result.
7. The method according to claim 1, wherein the standard screen image comprises a first map image containing no purple block map and/or a second map image containing a purple block map, and accordingly, the generating of the screen test report corresponding to the application program based on the matching result comprises:
when the standard picture image comprises the first map image, if the matching result is that the matching degree between the test picture image and the first map image is smaller than a preset matching degree threshold value, generating a first picture test report containing test failure information corresponding to the test picture image; and/or the presence of a gas in the gas,
and when the standard picture image comprises the second mapping image, if the matching result is that the matching degree between the test picture image and the second mapping image is greater than or equal to a preset matching degree threshold value, generating a second picture test report containing the test failure information corresponding to the test picture image.
8. A screen test apparatus, comprising:
the test picture image acquisition module is used for acquiring at least one test picture image displayed by the application program in the test process through a preset image object interface;
the similarity matching module is used for performing similarity matching on the standard picture images respectively corresponding to the test picture images and the test picture images to obtain matching results;
and the picture test report output module is used for generating a picture test report corresponding to the application program based on the matching result and outputting the picture test report.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the picture testing method as claimed in any one of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the picture testing method of any one of claims 1-7 when executed by a computer processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011448022.6A CN112559340A (en) | 2020-12-09 | 2020-12-09 | Picture testing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011448022.6A CN112559340A (en) | 2020-12-09 | 2020-12-09 | Picture testing method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112559340A true CN112559340A (en) | 2021-03-26 |
Family
ID=75061320
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011448022.6A Pending CN112559340A (en) | 2020-12-09 | 2020-12-09 | Picture testing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112559340A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115379296A (en) * | 2022-08-17 | 2022-11-22 | 在线途游(北京)科技有限公司 | Data verification method and device based on frame synchronization |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011073759A1 (en) * | 2009-12-01 | 2011-06-23 | Cinnober Financial Technology Ab | Methods and systems for automatic testing of a graphical user interface |
CN109614317A (en) * | 2018-11-12 | 2019-04-12 | 平安科技(深圳)有限公司 | Electronic device, ui testing method and storage medium |
CN109783351A (en) * | 2018-12-13 | 2019-05-21 | 重庆金融资产交易所有限责任公司 | Interface detection method, apparatus and computer readable storage medium |
CN109815156A (en) * | 2019-02-28 | 2019-05-28 | 北京百度网讯科技有限公司 | Displaying test method, device, equipment and the storage medium of visual element in the page |
CN109840212A (en) * | 2019-02-19 | 2019-06-04 | 百度在线网络技术(北京)有限公司 | Function test method, device, equipment and the readable storage medium storing program for executing of application program |
CN110399291A (en) * | 2019-06-20 | 2019-11-01 | 平安普惠企业管理有限公司 | User Page test method and relevant device based on image recognition |
CN110942031A (en) * | 2019-11-27 | 2020-03-31 | 上海米哈游网络科技股份有限公司 | Game picture abnormity detection method and device, electronic equipment and storage medium |
-
2020
- 2020-12-09 CN CN202011448022.6A patent/CN112559340A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011073759A1 (en) * | 2009-12-01 | 2011-06-23 | Cinnober Financial Technology Ab | Methods and systems for automatic testing of a graphical user interface |
CN109614317A (en) * | 2018-11-12 | 2019-04-12 | 平安科技(深圳)有限公司 | Electronic device, ui testing method and storage medium |
CN109783351A (en) * | 2018-12-13 | 2019-05-21 | 重庆金融资产交易所有限责任公司 | Interface detection method, apparatus and computer readable storage medium |
CN109840212A (en) * | 2019-02-19 | 2019-06-04 | 百度在线网络技术(北京)有限公司 | Function test method, device, equipment and the readable storage medium storing program for executing of application program |
CN109815156A (en) * | 2019-02-28 | 2019-05-28 | 北京百度网讯科技有限公司 | Displaying test method, device, equipment and the storage medium of visual element in the page |
CN110399291A (en) * | 2019-06-20 | 2019-11-01 | 平安普惠企业管理有限公司 | User Page test method and relevant device based on image recognition |
CN110942031A (en) * | 2019-11-27 | 2020-03-31 | 上海米哈游网络科技股份有限公司 | Game picture abnormity detection method and device, electronic equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
小小小小人KSH: "UI自动化测试:页面截图的3种方法 https://blog.csdn.net/kongsuhongbaby/article/details/87743133", 《CSDN》 * |
邓超等: "《数字图像处理与模式识别研究》", 30 June 2018, 北京:地质出版社 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115379296A (en) * | 2022-08-17 | 2022-11-22 | 在线途游(北京)科技有限公司 | Data verification method and device based on frame synchronization |
CN115379296B (en) * | 2022-08-17 | 2024-03-19 | 在线途游(北京)科技有限公司 | Data verification method and device based on frame synchronization |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10769487B2 (en) | Method and device for extracting information from pie chart | |
US11151712B2 (en) | Method and apparatus for detecting image defects, computing device, and computer readable storage medium | |
CN107832662B (en) | Method and system for acquiring image annotation data | |
CN107025174B (en) | Method, device and readable storage medium for user interface anomaly test of equipment | |
CN112559341A (en) | Picture testing method, device, equipment and storage medium | |
EP2660753B1 (en) | Image processing method and apparatus | |
CN109471805B (en) | Resource testing method and device, storage medium and electronic equipment | |
CN110175609B (en) | Interface element detection method, device and equipment | |
CN112149663A (en) | RPA and AI combined image character extraction method and device and electronic equipment | |
US11967125B2 (en) | Image processing method and system | |
CN110826646A (en) | Robot vision testing method and device, storage medium and terminal equipment | |
CN113255516A (en) | Living body detection method and device and electronic equipment | |
CN113361643A (en) | Deep learning-based universal mark identification method, system, equipment and storage medium | |
CN114299366A (en) | Image detection method and device, electronic equipment and storage medium | |
CN113762303B (en) | Image classification method, device, electronic equipment and storage medium | |
CN112559340A (en) | Picture testing method, device, equipment and storage medium | |
CN115546219B (en) | Detection plate type generation method, plate card defect detection method, device and product | |
CN112559342A (en) | Method, device and equipment for acquiring picture test image and storage medium | |
US10631050B2 (en) | Determining and correlating visual context on a user device with user behavior using digital content on the user device | |
CN114639056A (en) | Live content identification method and device, computer equipment and storage medium | |
CN111124862B (en) | Intelligent device performance testing method and device and intelligent device | |
CN110647826B (en) | Method and device for acquiring commodity training picture, computer equipment and storage medium | |
CN114972500A (en) | Checking method, marking method, system, device, terminal, equipment and medium | |
CN114494960A (en) | Video processing method and device, electronic equipment and computer readable storage medium | |
CN112966671A (en) | Contract detection method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210326 |