CN111124903B - Element coordinate automatic test method based on vision system and storage medium - Google Patents
Element coordinate automatic test method based on vision system and storage medium Download PDFInfo
- Publication number
- CN111124903B CN111124903B CN201911294618.2A CN201911294618A CN111124903B CN 111124903 B CN111124903 B CN 111124903B CN 201911294618 A CN201911294618 A CN 201911294618A CN 111124903 B CN111124903 B CN 111124903B
- Authority
- CN
- China
- Prior art keywords
- tested
- predefined
- interface picture
- interface
- vision system
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
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/3688—Test management for test execution, e.g. scheduling of test suites
-
- 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
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
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)
- Geometry (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention relates to the technical field of image recognition, and provides an element coordinate automatic test method and a storage medium based on a vision system. According to the invention, the visual system is utilized to automatically acquire the element information, so that the full coverage of element testing and the automatic acquisition of the actual coordinates of the element are realized, the material coverage is utilized to quickly and intuitively obtain the test data and the element coordinate deviation of the interface to be tested, the full-automatic test of the interface element is realized, the image acquisition efficiency is greatly improved, the waste of manpower and material resources is reduced, and the interface testing efficiency is improved.
Description
Technical Field
The invention relates to the technical field of image recognition, in particular to an element coordinate automatic test method based on a visual system and a storage medium.
Background
Interface test (UI test for short) for testing whether the layout of the functional modules of the user interface is reasonable, the overall style is consistent, the placement position of each control accords with the use habit of the customer, and further testing the operation convenience of the interface, the simplicity and the intelligibility of navigation, the availability of page elements, whether the characters in the interface are correct, the naming is uniform, the page is beautiful, and the combination of the characters and the pictures is perfect.
With the development and progress of modern science and technology, the requirements of users on interface display are continuously increased, and even the elements (including word size, picture, background, key, etc.) required to be used in each area of interface display, the positions, heights and widths of the pixel points of the elements are defined, and part of interface materials (picture, background picture) are customized. The corresponding test work must be developed for the materials and pixel information of these elements. However, since the pixel points cannot be accurately recognized by the naked eye, only manual testing can be performed using an external tool when the testing is performed. In addition, although some tools in the prior art can identify the position of a picture in an interface, the coordinate position of a certain element in the interface can still be obtained manually. However, the elements included in one interface often have tens to tens of different elements, the number of system interfaces to be tested is hundreds, if all the system interfaces are tested manually, a great deal of manpower is required to be spent, the test points covered by the tool are not comprehensive, and the high-efficiency interface test cannot be accurately and effectively realized.
Disclosure of Invention
The invention provides an element coordinate automatic test method based on a visual system and a storage medium, which solve the technical problems of time consumption, labor consumption, low automation degree, high cost and poor test efficiency of the conventional interface element test method.
In order to solve the technical problems, the invention provides an element coordinate automatic test method based on a vision system, which comprises the following steps:
s1, loading an interface picture to be tested;
s2, judging whether the interface picture to be tested is predefined, if yes, entering the next step, and if not, customizing the interface picture to be tested;
s3, reading elements contained in the interface picture to be tested, and covering corresponding predefined materials into the interface picture to be tested;
s4, reading the interface picture to be tested after the covering material, and outputting a test report according to a reading result.
Before the step S1, the method further includes the steps of:
s01, manufacturing an element initial frame and a cut-off frame according to design standards of interface pictures to be tested;
s02, according to UI vision system standards, elements in the interface picture to be tested are manufactured into different types of element materials;
s03, manufacturing Text materials according to the Text types of the elements on the interface picture to be tested and predefined coordinates, width and height;
s04, storing the starting frame, the ending frame, the element materials and the Text materials into a predefined database.
In the step S3, the step of determining whether the current type of interface picture to be tested has completed the predefined specifically is:
matching the names of the interface pictures to be tested in the predefined database, wherein if the matching is successful, the predefined is completed, and if the matching is failed, the predefined is not completed;
the customizing of the interface picture to be tested is as follows: the process advances to step S01.
The step S3 further includes: and reading coordinates of all elements on the interface picture to be tested, and calculating the position deviation by combining the corresponding predefined coordinates.
Preferably, the reading of the coordinates of all elements on the interface picture to be tested is completed through a vision system.
The element types comprise texts, keys, icon pictures and background pictures; the element materials comprise title materials, list materials and bullet frame materials; the Text type comprises a word size; the predefined material includes a starting frame and a stopping frame, a title material, a list material, a bullet frame material and a Text material.
In the step S3, the covering the corresponding predefined material to the interface picture to be tested specifically includes: and according to the predefined coordinates, covering the starting frame, the ending frame, the title material, the list material, the bullet frame material and the Text material corresponding to the predefined coordinates on the interface picture to be tested.
Preferably, in the step S4, the reading of the interface picture to be tested after the predefined material is covered is completed through a vision system.
The test result comprises the coincidence ratio of the predefined material and the corresponding element on the interface picture to be tested; the test report also comprises position deviations of all elements in the interface picture to be tested and a material coverage effect diagram.
The invention also provides a computer storage medium, corresponding to the vision system-based element coordinate automatic test method, wherein the computer storage medium is stored with a computer program, and the computer program realizes the vision system-based element coordinate automatic test method when being executed by a processor.
The invention provides an element coordinate automatic test method based on a visual system, which comprises the steps of predefining elements according to the set requirement of an interface or a client template, establishing a predefined database, covering a starting frame, a stopping frame, a title material, a list material, a bullet frame material and a Text material corresponding to the predefined coordinates on an interface picture to be tested according to the predefined coordinates when testing, automatically acquiring the interface picture by using the visual system, obtaining the actual coordinates of the material coverage effect picture and all elements, and then calculating with the predefined coordinates to obtain the position deviation. According to the invention, the visual system is utilized to automatically acquire the element information, so that the full coverage of element testing and the automatic acquisition of the actual coordinates of the element are realized, the material coverage is utilized to quickly and intuitively obtain the test data and the element coordinate deviation of the interface to be tested, the full-automatic test of the interface element is realized, the image acquisition efficiency is greatly improved, the waste of manpower and material resources is reduced, and the interface testing efficiency is improved.
Drawings
FIG. 1 is a system flow diagram of an automated test method for element coordinates based on a vision system, provided by an embodiment of the present invention;
FIG. 2 is a flowchart illustrating operation of the method provided by an embodiment of the present invention prior to step S1 of FIG. 1;
FIG. 3 is a flowchart of the operation of FIG. 1 provided by an embodiment of the present invention;
Detailed Description
The following examples are given for the purpose of illustration only and are not to be construed as limiting the invention, including the drawings for reference and description only, and are not to be construed as limiting the scope of the invention as many variations thereof are possible without departing from the spirit and scope of the invention.
The embodiment of the invention provides an element coordinate automatic test method based on a visual system, as shown in fig. 1, and in the embodiment, the method comprises the following steps:
s1, loading an interface picture to be tested;
s2, judging whether the interface picture to be tested is predefined, if yes, entering the next step, and if not, customizing the interface picture to be tested;
s3, reading elements contained in the interface picture to be tested, and covering corresponding predefined materials into the interface picture to be tested;
s4, reading the interface picture to be tested after the covering material, and outputting a test report according to a reading result.
Referring to fig. 2, before said step S1, the method further comprises the steps of:
s01, manufacturing an element initial frame and a cut-off frame according to design standards of interface pictures to be tested;
s02, according to UI vision system standards, elements in the interface picture to be tested are manufactured into different types of element materials;
s03, manufacturing Text materials according to the Text types of the elements on the interface picture to be tested and predefined coordinates, width and height;
s04, storing the starting frame, the ending frame, the element materials and the Text materials into a predefined database.
In the step S2, the step of determining whether the current type of interface picture to be tested has completed the predefined specifically is: matching the names of the interface pictures to be tested in the predefined database, wherein if the matching is successful, the predefined is completed, and if the matching is failed, the predefined is not completed; the predefined database includes data for all of the predefined pictures including, but not limited to, the name, type, elements, stories, and coordinates of the interface.
The customizing of the interface picture to be tested is as follows: the process advances to step S01.
The step S3 further includes: and reading coordinates of all elements on the interface picture to be tested, and calculating the position deviation by combining the corresponding predefined coordinates.
Preferably, the reading of the coordinates of all elements on the interface picture to be tested is completed through a vision system.
The element types comprise texts, keys, icon pictures and background pictures; the element materials comprise title materials, list materials and bullet frame materials; the Text type comprises a word size; the predefined material includes a starting frame and a stopping frame, a title material, a list material, a bullet frame material and a Text material.
In the step S3, the covering the corresponding predefined material to the interface picture to be tested specifically includes: and according to the predefined coordinates, covering the starting frame, the ending frame, the title material, the list material, the bullet frame material and the Text material corresponding to the predefined coordinates on the interface picture to be tested.
In the step S4, reading the interface picture to be tested after the covering material is completed through a vision system.
The test result comprises the coincidence ratio of the predefined material and the corresponding element on the interface picture to be tested; the test report also comprises position deviations of all elements in the interface picture to be tested and a material coverage effect diagram.
The vision systems include, but are not limited to, laser scanners, linear and area array CCD cameras, TV cameras, and digital cameras.
Referring to fig. 3, the specific workflow of the element coordinate automatic test method provided by the invention is as follows:
loading an interface picture to be tested, matching the name of the interface picture to be tested with a predefined database, and if the matching is successful, finishing the predefined interface type of the interface picture to be tested; if the matching fails, the method represents that the predefining is not completed, and the method enters a custom program. The finished predefining includes directly inputted test criteria and test criteria established later according to a custom program.
The self-defining program is as follows: manufacturing an element starting frame and a cut-off frame according to design standards of an interface picture to be tested, manufacturing elements in the interface picture to be tested into materials such as titles, lists, bullet frames and the like of different types according to the design standards of a UI visual system, and manufacturing Text materials according to Text types, predefined coordinates, width and height of the elements; and finally, storing the starting frame, the ending frame, the element materials and the Text materials into a predefined database, and uniformly classifying the materials as predefined materials.
And acquiring an image of the interface picture to be tested through a visual system, acquiring element icons and coordinates in the interface picture to be tested through image processing, acquiring predefined materials and predefined coordinates corresponding to the elements, and covering the initial frame, the cut-off frame, the title materials, the list materials, the bullet frame materials and the Text materials corresponding to the predefined coordinates on the interface picture to be tested according to the predefined coordinates.
And reading the coverage effect diagram of the interface picture to be tested after the coverage material by using a vision system, calculating the position deviation according to the element coordinates and the predefined coordinates, further calculating the coincidence ratio of the element and the predefined material, integrating the coverage effect diagram, the element position deviation and the element coincidence ratio into a test report, and outputting the test report.
Corresponding to the above-mentioned automated testing method for element coordinates based on a vision system, the embodiment of the invention further provides a computer storage medium, on which a computer program is stored, which when executed by a processor, implements the above-mentioned automated testing method for element coordinates based on a vision system.
The computer readable storage medium includes, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks, ROMs (Read-Only memories), RAMs (Random AcceSS Memory, random access memories), EPROMs (EraSable Programmable Read-Only memories), EEPROMs (Electrically EraSable Programmable Read-Only memories), flash memories, magnetic cards, or optical cards. That is, a storage device includes any medium that stores or transmits information in a form readable by a device (e.g., computer, cell phone), and may be read-only memory, magnetic or optical disk, etc.
The embodiment of the invention provides an element coordinate automatic test method based on a visual system, which comprises the steps of predefining elements according to the set requirement of an interface or a client template, establishing a predefined database, covering a starting frame, a stopping frame, a title material, a list material, a bullet frame material and a Text material corresponding to the predefined coordinates on an interface picture to be tested according to the predefined coordinates when the test is performed, automatically acquiring the interface picture by using the visual system, obtaining the actual coordinates of the material coverage effect picture and all elements, and then calculating the position deviation with the predefined coordinates. According to the invention, the visual system is utilized to automatically acquire the element information, so that the full coverage of element testing and the automatic acquisition of the actual coordinates of the element are realized, the material coverage is utilized to quickly and intuitively obtain the test data and the element coordinate deviation of the interface to be tested, the full-automatic test of the interface element is realized, the image acquisition efficiency is greatly improved, the waste of manpower and material resources is reduced, and the interface testing efficiency is improved.
The embodiment of the invention also provides a computer readable storage medium, which realizes the data storage of the test process and result, the computer application program and the predefined database, and ensures the accuracy of the interface element test.
The above examples are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above examples, and any other changes, modifications, substitutions, combinations, and simplifications that do not depart from the spirit and principle of the present invention should be made in the equivalent manner, and the embodiments are included in the protection scope of the present invention.
Claims (9)
1. An element coordinate automatic test method based on a vision system is characterized by comprising the following steps:
s1, loading an interface picture to be tested;
s2, judging whether the interface picture to be tested is predefined, if yes, entering the next step, and if not, customizing the interface picture to be tested;
s3, reading elements contained in the interface picture to be tested, and covering corresponding predefined materials into the interface picture to be tested;
s4, reading the interface picture to be tested after covering the material, and outputting a test report according to a reading result;
the reading result comprises the coincidence ratio of the predefined material and the corresponding element on the interface picture to be tested; the test report also comprises position deviations of all elements in the interface picture to be tested and a predefined material coverage effect diagram;
judging whether the interface picture to be tested of the current type is predefined or not, specifically: matching the names of the interface pictures to be tested in the predefined database, wherein if the matching is successful, the predefined is completed, and if the matching is failed, the predefined is not completed;
and the customization is that the starting frame and the ending frame of the interface picture to be tested, the element materials and the Text materials are stored in a predefined database.
2. The automated testing method of element coordinates based on a vision system according to claim 1, further comprising, before the step S1:
s01, manufacturing an element initial frame and a cut-off frame according to design standards of interface pictures to be tested;
s02, according to UI vision system standards, elements in the interface picture to be tested are manufactured into different types of element materials;
s03, manufacturing Text materials according to the Text types of the elements on the interface picture to be tested and predefined coordinates, width and height;
s04, storing the starting frame, the ending frame, the element materials and the Text materials into a predefined database.
3. An automated test method for elemental coordinates based on a vision system, as set forth in claim 2, characterized in that, in said step S2,
the customizing of the interface picture to be tested is as follows: the process advances to step S01.
4. The automated testing method of element coordinates based on a vision system of claim 2, wherein the step S3 further comprises: and reading coordinates of all elements on the interface picture to be tested, and calculating the position deviation by combining the corresponding predefined coordinates.
5. The automated vision system-based element coordinate testing method of claim 4, wherein in said step S3: and finishing reading the coordinates of all elements on the interface picture to be tested through a visual system.
6. An automated testing method for elemental coordinates based on a vision system as claimed in claim 2, wherein: the element types comprise texts, keys, icon pictures and background pictures; the element materials comprise title materials, list materials and bullet frame materials; the Text type comprises a word size; the predefined material includes a starting frame and a stopping frame, a title material, a list material, a bullet frame material and a Text material.
7. The automated testing method of element coordinates based on a vision system according to claim 4, wherein in the step S3, the overlaying the corresponding predefined material into the interface picture to be tested is specifically: and according to the predefined coordinates, covering the starting frame, the ending frame, the title material, the list material, the bullet frame material and the Text material corresponding to the predefined coordinates on the interface picture to be tested.
8. An automated testing method for elemental coordinates based on a vision system as claimed in claim 1, wherein: in the step S4, reading the interface picture to be tested after the predefined material is covered by a vision system.
9. A computer storage medium, characterized by: the computer storage medium has stored thereon a computer program which, when executed by a processor, implements the vision system-based element coordinate automation test method according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911294618.2A CN111124903B (en) | 2019-12-16 | 2019-12-16 | Element coordinate automatic test method based on vision system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911294618.2A CN111124903B (en) | 2019-12-16 | 2019-12-16 | Element coordinate automatic test method based on vision system and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111124903A CN111124903A (en) | 2020-05-08 |
CN111124903B true CN111124903B (en) | 2023-04-28 |
Family
ID=70499270
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911294618.2A Active CN111124903B (en) | 2019-12-16 | 2019-12-16 | Element coordinate automatic test method based on vision system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111124903B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112732559A (en) * | 2020-12-30 | 2021-04-30 | 广东粤云工业互联网创新科技有限公司 | Picture comparison method, automatic dial testing method and system and storage medium |
CN116401178B (en) * | 2023-06-09 | 2023-08-11 | 成都融见软件科技有限公司 | UI component problem point positioning method, electronic device and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104516633A (en) * | 2014-11-19 | 2015-04-15 | 微梦创科网络科技(中国)有限公司 | User interface element management method and device |
CN109408367A (en) * | 2018-09-03 | 2019-03-01 | 深圳壹账通智能科技有限公司 | A kind of method and terminal of the control element identifying interactive interface |
CN109815156A (en) * | 2019-02-28 | 2019-05-28 | 北京百度网讯科技有限公司 | Displaying test method, device, equipment and the storage medium of visual element in the page |
CN109992518A (en) * | 2019-04-10 | 2019-07-09 | 禄鹏 | Detection method, device, electronic equipment and the storage medium at the interface UI |
CN110554957A (en) * | 2019-07-31 | 2019-12-10 | 北京三快在线科技有限公司 | method and device for testing user interface, electronic equipment and readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7650574B2 (en) * | 2004-05-11 | 2010-01-19 | National Instruments Corporation | Visually indicating problems found during programmatic analysis of a graphical program |
US20190303269A1 (en) * | 2018-03-28 | 2019-10-03 | Layout.io Ltd | Methods and systems for testing visual aspects of a web page |
-
2019
- 2019-12-16 CN CN201911294618.2A patent/CN111124903B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104516633A (en) * | 2014-11-19 | 2015-04-15 | 微梦创科网络科技(中国)有限公司 | User interface element management method and device |
CN109408367A (en) * | 2018-09-03 | 2019-03-01 | 深圳壹账通智能科技有限公司 | A kind of method and terminal of the control element identifying interactive interface |
CN109815156A (en) * | 2019-02-28 | 2019-05-28 | 北京百度网讯科技有限公司 | Displaying test method, device, equipment and the storage medium of visual element in the page |
CN109992518A (en) * | 2019-04-10 | 2019-07-09 | 禄鹏 | Detection method, device, electronic equipment and the storage medium at the interface UI |
CN110554957A (en) * | 2019-07-31 | 2019-12-10 | 北京三快在线科技有限公司 | method and device for testing user interface, electronic equipment and readable storage medium |
Non-Patent Citations (1)
Title |
---|
韦庆杰.一种Web应用跨浏览器兼容性测试方法.《计算机工程与应用》.2019,全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN111124903A (en) | 2020-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111930381B (en) | Personalized page configuration method supporting SaaS multi-tenant system | |
US6411731B1 (en) | Template-based image recognition and extraction | |
CN111124903B (en) | Element coordinate automatic test method based on vision system and storage medium | |
JP6826293B2 (en) | Information information system and its processing method and program | |
KR20070049518A (en) | Method for modifying a great number of powerpoint document | |
CN111178147A (en) | Screen crushing and grading method, device, equipment and computer readable storage medium | |
CN112632928B (en) | Table data processing method and device and computer readable storage medium | |
CN114490395A (en) | Test processing method, device, equipment and medium | |
CN113191671B (en) | Engineering amount calculating method and device and electronic equipment | |
CN110704477A (en) | Application history record viewing method, device, terminal and storage medium | |
CN110598186A (en) | Auxiliary processing method, device and system for image recognition | |
CN113989817A (en) | User-defined bill identification method, device and medium | |
CN110457219B (en) | Method and device for selecting time when test script is recorded | |
CN111753349A (en) | Dimension modification method of structural member, Revit platform and storage medium | |
CN110378566B (en) | Information checking method, device, storage medium and apparatus | |
CN112508717A (en) | Image information auditing method and device, electronic equipment and storage medium | |
CN110287182B (en) | Big data comparison method, device, equipment and terminal | |
CN114415911B (en) | Data entry method and device | |
KR20040017376A (en) | Method and mobile phone for reading name card using camera for cellular phone | |
US20210374667A1 (en) | Method and system for generating bill of materials for a product | |
CN106470258B (en) | Method and device for automatically dialing or sending short message | |
CN110443202B (en) | System, method and storage medium for real-time analysis of paper font regularity | |
CN109088977B (en) | Control method and control device for automatically installing mobile terminal application | |
CN113961296A (en) | Page element layout method and device, readable medium and electronic equipment | |
CN113836037A (en) | Interface interaction test method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |