CN109144868B - Page judgment method and device - Google Patents
Page judgment method and device Download PDFInfo
- Publication number
- CN109144868B CN109144868B CN201810930267.9A CN201810930267A CN109144868B CN 109144868 B CN109144868 B CN 109144868B CN 201810930267 A CN201810930267 A CN 201810930267A CN 109144868 B CN109144868 B CN 109144868B
- Authority
- CN
- China
- Prior art keywords
- page
- tested
- display
- control
- judging
- 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
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)
- User Interface Of Digital Computer (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The invention discloses a page judgment method and device. The method comprises the following steps: displaying a page to be tested on the current equipment; acquiring the display position of each control on the page to be tested; and judging whether the page to be tested is displayed abnormally or not according to the display position of each control. By the technical scheme, whether the page to be tested is abnormal or not can be automatically judged according to the display position of each control, so that the efficiency and the accuracy of judging the abnormality of the page to be tested are improved.
Description
Technical Field
The invention relates to the technical field of testing, in particular to a page judgment method and device.
Background
At present, for the UI (User Interface, User page) automation test, it is only necessary to check whether the function of the application is correct, and to determine whether the UI display is correct, especially whether the UI can be normally displayed on devices with different resolutions, by manual work. Therefore, how to quickly determine whether the page is displayed abnormally becomes an urgent problem to be solved.
Disclosure of Invention
The invention provides a page judgment method and device, which are used for automatically judging whether a page to be tested is displayed abnormally according to the display position of each control, so that the efficiency and the accuracy of judging the abnormality of the page to be tested are improved.
The invention provides a page judgment method, which comprises the following steps:
displaying a page to be tested on the current equipment;
acquiring the display position of each control on the page to be tested;
and judging whether the page to be tested is displayed abnormally or not according to the display position of each control.
In one embodiment, the obtaining the display position of each control on the page to be tested includes:
determining visible controls in the controls;
and determining the display position of the visible control relative to the page to be tested.
In an embodiment, the determining whether the page to be tested is displayed abnormally according to the display position of each control includes:
judging whether the control pieces are overlapped to display or not according to the display positions of the control pieces;
and when the judgment result is yes, judging that the display of the page to be tested is abnormal.
In an embodiment, the determining whether the page to be tested is displayed abnormally according to the display position of each control includes:
judging whether a control exceeding the screen display area exists in each control according to the display position of each control and the display size of the screen display area of the current equipment;
and when the judgment result is yes, judging that the display of the page to be tested is abnormal.
In one embodiment, the method further comprises:
generating a position coordinate graph of each control according to the display position of each control;
and displaying the position coordinate graph.
The present invention also provides a page determining apparatus, including:
the first display module is used for displaying a page to be tested on the current equipment;
the acquisition module is used for acquiring the display position of each control on the page to be tested;
and the judging module is used for judging whether the page to be tested is displayed abnormally or not according to the display position of each control.
In one embodiment, the obtaining module comprises:
the first determining sub-module is used for determining visible controls in the controls;
and the second determination sub-module is used for determining the display position of the visible control relative to the page to be tested.
In one embodiment, the determining module comprises:
the first judgment sub-module is used for judging whether the control pieces are overlapped and displayed according to the display positions of the control pieces;
and the first judgment submodule is used for judging that the to-be-tested page is abnormal when the judgment result is yes.
In one embodiment, the determining module comprises:
the second judgment sub-module is used for judging whether a control exceeding the screen display area exists in each control according to the display position of each control and the display size of the screen display area of the current equipment;
and the second judging submodule is used for judging that the to-be-tested page is abnormal when the judging result is yes.
In one embodiment, the apparatus further comprises:
the generating module is used for generating a position coordinate graph of each control according to the display position of each control;
and the second display module is used for displaying the position coordinate graph.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
by acquiring the display position of each control on the page to be tested, whether the page to be tested displays abnormity can be automatically judged according to the display position of each control, so that the efficiency and the accuracy of judging the abnormity of the page to be tested are improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart illustrating a page determination method according to an example embodiment.
FIG. 2 is a flow diagram illustrating another method of page determination in accordance with an exemplary embodiment.
Fig. 3 is a flowchart illustrating yet another page determination method according to an example embodiment.
FIG. 4 is a diagram illustrating a position of a control over an area of a screen display, according to an illustrative embodiment.
Fig. 5 is a block diagram illustrating a page judging apparatus according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating another page judging apparatus according to an example embodiment.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
In order to solve the above technical problem, an embodiment of the present disclosure provides a page determining method, which is applied to a page determining program, system or apparatus, and an execution subject of the page determining method may be a device such as a mobile phone, a tablet, a computer, and the like, as shown in fig. 1, the method includes steps S101 to S103, where:
in step S101, a page to be tested is displayed on the current device;
in step S102, the display position of each control on the page to be tested is obtained;
the page to be tested can be any page needing to be tested. The control on the page to be tested comprises all the controls on the page to be tested, and preferably, the displayable controls on the page to be tested.
In step S103, whether the page to be tested is displayed abnormally is determined according to the display position of each control.
By acquiring the display position of each control on the page to be tested, whether the page to be tested displays abnormity can be automatically judged according to the display position of each control, so that the efficiency and the accuracy of judging the abnormity of the page to be tested are improved.
As shown in fig. 2, in an embodiment, the step S102 shown in fig. 1, namely, obtaining the display position of each control on the page to be tested, may include steps a1 and a 2:
in step A1, determining visible controls in each control;
in step A2, the display position of the visible control relative to the page to be tested is determined.
Because the invisible controls (namely invisible controls) have no influence on the visual experience of the user no matter whether the abnormal display problem exists, the visible controls in the controls can be determined, and then the display positions of the visible controls relative to the page to be tested can be automatically determined, so that whether the page to be tested is abnormally displayed can be automatically judged according to the display positions of the visible controls.
And secondly, only the display positions of the visible controls are determined, so that the efficiency of judging whether the page to be tested is abnormally displayed can be effectively improved compared with the case of determining the display positions of all the controls in the page to be tested.
In addition, the display position of the visible control relative to the page to be tested may include: the display positions of the corners of the visible control (e.g., the four vertices of the visible control) relative to the page to be tested, and the step of determining the display position of the visible control relative to the page to be tested may be performed as:
determining the abscissa and the ordinate of the top left corner vertex of the visible control relative to the page to be tested;
and determining the abscissa and the ordinate of the rest corners (such as the rest three vertexes) of the visible control relative to the page to be tested according to the abscissa, the ordinate and the length and the width of the visible control.
In an embodiment, in step S103 shown in fig. 1, that is, determining whether the page to be tested is displayed abnormally according to the display position of each control, may be executed as:
judging whether the controls are overlapped according to the display positions of the controls;
and when the judgment result is yes, judging that the display of the page to be tested is abnormal.
According to the display position of each control, whether overlapping display exists between the controls (namely whether any two adjacent controls are at least partially overlapped) can be judged, when the judgment result shows that the overlapping display exists, the controls in the page to be tested are not normally displayed, the abnormal display of the page to be tested can be automatically judged, and the automatic judgment mode is favorable for improving the judgment efficiency of the abnormal display of the page.
In an embodiment, in step S103 shown in fig. 1, that is, determining whether the page to be tested is displayed abnormally according to the display position of each control, may be executed as:
judging whether a control exceeding a screen display area exists in each control according to the display position of each control and the display size of the screen display area of the current equipment;
and when the judgment result is yes, judging that the display of the page to be tested is abnormal.
According to the display position of each control and the display size of the screen display area of the current equipment, whether the control exceeding the screen display area exists in each control can be automatically judged by judging whether the display position of each control does not fall into the display size of the screen display area, and when the judgment result shows that the control exceeding the screen display area exists, the control exceeding the screen display area exists in the page to be tested, so that the abnormal display of the page to be tested can be automatically judged, and the automatic judgment mode is favorable for improving the judgment efficiency of the abnormal display of the page.
In one embodiment, the method further comprises:
generating a position coordinate graph of each control according to the display position of each control;
and displaying the position coordinate graph.
According to the display position of each control, a position coordinate graph of each control can be automatically generated, and then the position coordinate graph is automatically displayed, so that a tester can intuitively know the display position of each control and whether overlapped display and overflow display exist in each control.
As shown in fig. 3, the following will further illustrate the technical solution of the present invention by way of example:
step S301: and entering a page to be tested.
Step S302: and acquiring the position information of all controls (namely all visible controls) with the visitable attributes (display attributes) of true in the page to be tested.
Step S303: judging whether any two controls are overlapped according to the position information of all visible controls, and judging that the page has a display problem if any two control areas are overlapped or a control exceeding a screen display area exists (as shown in fig. 4, fig. 4 is a position coordinate diagram generated according to the position information of all visible controls, each grid in fig. 4 represents a visible control, and as can be seen from fig. 4, a visible control displaying a TEXT pattern exceeds the screen display area).
As shown in fig. 5, the present invention further provides a page determining apparatus, including:
a first display module 501 configured to display a page to be tested on a current device;
an obtaining module 502 configured to obtain display positions of controls on a page to be tested;
the judging module 503 is configured to judge whether the page to be tested is displayed abnormally according to the display position of each control.
As shown in fig. 6, in one embodiment, the obtaining module 502 may include:
a first determination submodule 5021 configured to determine visible controls in the controls;
the second determining sub-module 5022 is configured to determine the display position of the visible control relative to the page to be tested.
In one embodiment, the determining module comprises:
the first judgment sub-module is configured to judge whether the controls are overlapped according to the display positions of the controls;
and the first judgment sub-module is configured to judge that the page to be tested is abnormal in display when the judgment result is yes.
In one embodiment, the determining module comprises:
the second judgment sub-module is configured to judge whether a control exceeding the screen display area exists in each control according to the display position of each control and the display size of the screen display area of the current device;
and the second judging submodule is configured to judge that the page to be tested is abnormal when the judgment result is yes.
In one embodiment, the apparatus further comprises:
the generating module is configured to generate a position coordinate graph of each control according to the display position of each control;
and the second display module is configured to display the position coordinate graph.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Finally, the page judgment device is suitable for the terminal equipment. For example, it may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, etc.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (4)
1. A page testing method is characterized by comprising the following steps:
displaying a page to be tested on the current equipment;
acquiring the display position of a visible control in each control on the page to be tested, wherein the method comprises the following steps: determining the abscissa and the ordinate of a preset vertex of the visible control relative to the page to be tested; determining the abscissa and ordinate of the rest corners of the visible control relative to the page to be tested according to the abscissa, the ordinate and the length and width of the visible control;
judging whether the page to be tested is displayed abnormally according to the display position of the visible control, wherein the judging step comprises the following steps: and judging whether the display positions of the visible controls are not within the display size of the screen display area or not according to the display positions of the visible controls, and judging that the display of the page to be tested is abnormal when the judgment result is yes.
2. The method of claim 1, further comprising:
generating a position coordinate graph of each visible control according to the display position of each visible control;
and displaying the position coordinate graph.
3. A page testing apparatus, comprising:
the first display module is used for displaying a page to be tested on the current equipment;
the acquisition module is used for acquiring the display position of a visible control in each control on the page to be tested;
the judging module is used for judging whether the page to be tested is displayed abnormally or not according to the display position of each control;
the judging module comprises:
the first judgment sub-module is used for judging whether the conditions of overlapping display exist among the visible controls according to the display positions of the visible controls;
the first judgment submodule is used for judging that the to-be-tested page is abnormal when the judgment result is yes;
the judging module comprises:
the second judgment sub-module is used for judging whether the display position of the visible control does not fall into the display size of the screen display area according to the display position of each visible control and the display size of the screen display area of the current equipment;
and the second judging submodule is used for judging that the to-be-tested page is abnormal when the judging result is yes.
4. The apparatus of claim 3, further comprising:
the generating module is used for generating a position coordinate graph of each visible control according to the display position of each visible control;
and the second display module is used for displaying the position coordinate graph.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810930267.9A CN109144868B (en) | 2018-08-15 | 2018-08-15 | Page judgment method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810930267.9A CN109144868B (en) | 2018-08-15 | 2018-08-15 | Page judgment method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109144868A CN109144868A (en) | 2019-01-04 |
CN109144868B true CN109144868B (en) | 2022-02-01 |
Family
ID=64789698
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810930267.9A Active CN109144868B (en) | 2018-08-15 | 2018-08-15 | Page judgment method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109144868B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109857659B (en) * | 2019-01-23 | 2022-03-15 | 北京云测信息技术有限公司 | Control operation method and device |
CN110162460A (en) * | 2019-04-15 | 2019-08-23 | 平安普惠企业管理有限公司 | Application exception positioning problems method, apparatus, computer equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105740143A (en) * | 2016-01-27 | 2016-07-06 | 厦门美图移动科技有限公司 | Automated test method and apparatus as well as computing device |
CN105988933A (en) * | 2016-01-29 | 2016-10-05 | 腾讯科技(深圳)有限公司 | Interface operable node identification method and application test method, device and system |
CN107704389A (en) * | 2017-09-26 | 2018-02-16 | 无线生活(杭州)信息科技有限公司 | A kind of page method of testing and device |
CN107832774A (en) * | 2017-10-09 | 2018-03-23 | 无线生活(杭州)信息科技有限公司 | A kind of page exception detection method and device |
CN108132887A (en) * | 2018-01-10 | 2018-06-08 | 百度在线网络技术(北京)有限公司 | User interface method of calibration, device, software testing system, terminal and medium |
CN108363599A (en) * | 2018-01-12 | 2018-08-03 | 深圳壹账通智能科技有限公司 | User interface shows recognition methods and terminal device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105930261B (en) * | 2016-01-16 | 2018-06-22 | 平安科技(深圳)有限公司 | test method and test terminal |
US10372591B2 (en) * | 2016-09-07 | 2019-08-06 | International Business Machines Corporation | Applying eye trackers monitoring for effective exploratory user interface testing |
-
2018
- 2018-08-15 CN CN201810930267.9A patent/CN109144868B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105740143A (en) * | 2016-01-27 | 2016-07-06 | 厦门美图移动科技有限公司 | Automated test method and apparatus as well as computing device |
CN105988933A (en) * | 2016-01-29 | 2016-10-05 | 腾讯科技(深圳)有限公司 | Interface operable node identification method and application test method, device and system |
CN107704389A (en) * | 2017-09-26 | 2018-02-16 | 无线生活(杭州)信息科技有限公司 | A kind of page method of testing and device |
CN107832774A (en) * | 2017-10-09 | 2018-03-23 | 无线生活(杭州)信息科技有限公司 | A kind of page exception detection method and device |
CN108132887A (en) * | 2018-01-10 | 2018-06-08 | 百度在线网络技术(北京)有限公司 | User interface method of calibration, device, software testing system, terminal and medium |
CN108363599A (en) * | 2018-01-12 | 2018-08-03 | 深圳壹账通智能科技有限公司 | User interface shows recognition methods and terminal device |
Also Published As
Publication number | Publication date |
---|---|
CN109144868A (en) | 2019-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106097361B (en) | Defect area detection method and device | |
CN106502891B (en) | Automatic detection method and device for user interface | |
US20130177232A1 (en) | Visual Inspection Device, Visual Inspection Method, And Computer Program | |
EP2871560B1 (en) | Image processing method and apparatus | |
CN109144868B (en) | Page judgment method and device | |
CN107329659B (en) | Permission setting method and device, electronic equipment and storage medium | |
US9495348B2 (en) | Template application error detection | |
CN112637842A (en) | Screen projection equipment connection method, system, equipment and storage medium | |
CN104881888B (en) | Picture clipping method and device | |
CN104615331A (en) | Corner mark processing method | |
CN112286825A (en) | Screen testing method and device for intelligent cabin and electronic equipment | |
CN104809053A (en) | Control style testing method and device | |
CN107544724A (en) | In the method and apparatus that electric terminal rapidly enters application interface | |
CN116953968A (en) | Method, device, equipment and medium for detecting ghost shadow of LCD display screen | |
CN103810098A (en) | Evaluation of resizing capability of web browser | |
CN103324738B (en) | A kind of method and apparatus of alignment after webpage zoom on electronic equipment | |
CN108805931B (en) | Positioning detection method and device of AR product and computer readable storage medium | |
CN110827658A (en) | Method and device for displaying equipment in electronic map | |
EP3301529A1 (en) | Method and apparatus for displaying monitoring information | |
CN104615357A (en) | Terminal | |
CN114495084A (en) | Information acquisition method and device, electronic equipment and storage medium | |
CN109600558B (en) | Method and apparatus for generating information | |
CN104850371B (en) | Information processing method and electronic equipment | |
CN109739752B (en) | Built-in resource testing method and device, electronic equipment and readable storage medium | |
US11070716B2 (en) | Image sensor system, image sensor, data generation method of image sensor in image sensor system, and non-transitory computer-readable recording 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 |