CN105426144B - A kind of method and apparatus of the adaptive multiresolution of test application program - Google Patents

A kind of method and apparatus of the adaptive multiresolution of test application program Download PDF

Info

Publication number
CN105426144B
CN105426144B CN201510733602.2A CN201510733602A CN105426144B CN 105426144 B CN105426144 B CN 105426144B CN 201510733602 A CN201510733602 A CN 201510733602A CN 105426144 B CN105426144 B CN 105426144B
Authority
CN
China
Prior art keywords
terminal
tested
application program
interface element
coordinate
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.)
Expired - Fee Related
Application number
CN201510733602.2A
Other languages
Chinese (zh)
Other versions
CN105426144A (en
Inventor
李阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Synacast Media Technology Co Ltd
Original Assignee
Shanghai Synacast Media Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Synacast Media Technology Co Ltd filed Critical Shanghai Synacast Media Technology Co Ltd
Priority to CN201510733602.2A priority Critical patent/CN105426144B/en
Publication of CN105426144A publication Critical patent/CN105426144A/en
Application granted granted Critical
Publication of CN105426144B publication Critical patent/CN105426144B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1415Digital output to display device ; Cooperation and interconnection of the display device with other functional units with means for detecting differences between the image stored in the host and the images displayed on the displays

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of method and apparatus of the adaptive multiresolution of test application program.This method is first by the resolution ratio and the interface data information in same application of computing terminal acquisition reference termination and multiple measured terminals, it is then based on resolution ratio and interface data information and obtains the size factor of measured terminal and the coordinate position of interface element respectively, then the relative position of interface element is calculated based on size factor and coordinate position, it is compared eventually by by the relative position of measured terminal interface element with the coordinate position of reference termination, determines the application program to the adaptive ability of multiresolution.Utilize this method, solving the problems, such as cannot the adaptive ability of efficient, accurate test application program or operating system in different resolution terminal, the digitlization for realizing test application program or operating system multi-resolution adaptive ability has achieved the effect that rapidly and efficiently to carry out software test.

Description

Method and device for testing adaptive multi-resolution of application program
Technical Field
The embodiment of the invention relates to the technical field of software testing, in particular to a method and a device for testing adaptive multi-resolution of an application program.
Background
In the design of an operation interface of an application program or an operating system, whether the interface can be normally displayed on terminals with different resolutions is generally considered, so that a plurality of adaptive algorithms capable of enabling the operation interface to adapt to multiple resolutions appear, and the normal display of the operation interface of the application program or the operating system on the terminals with different resolutions can be ensured based on the algorithms.
In practical applications, these operation interface adaptive multi-resolution algorithms need to be tested to ensure the correctness of the application program or the operation system adapting to the terminals with different resolutions. Therefore, the correctness of the adaptive algorithm can be determined by testing the adaptive capacity of an application program or an operating system on a terminal with various resolutions. In the existing testing method, an operation interface of a terminal to be tested is generally synchronized to a PC, and whether the interface of application software is well matched with the resolution of the terminal to be tested is identified in a manual observation mode. Obviously, however, the above scheme requires a lot of labor, and the recognition accuracy is not high, and the standard is not uniform.
Disclosure of Invention
The invention provides a method and a device for testing adaptive multi-resolution of an application program. The method solves the problem that the self-adaptive capability of an application program or an operating system on terminals with different resolutions cannot be tested efficiently and accurately.
The embodiment of the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for testing an application adaptive multi-resolution, where the method includes:
the method comprises the steps that a computing terminal obtains interface data information of the same application program on at least two tested terminals and a reference terminal, and the resolutions of the tested terminals and the reference terminal are determined, wherein different tested terminals have different resolutions;
the method comprises the steps that a computing terminal computes coordinate positions of interface elements in the same application program of a tested terminal and a reference terminal based on interface data information of the tested terminal and the reference terminal;
the calculation terminal calculates the size coefficient of the measured terminal according to the resolution ratios of the measured terminal and the reference terminal;
the method comprises the steps that a computing terminal computes the relative position of a corresponding interface element according to the size coefficient of a tested terminal and the coordinate position of the interface element in the same application program of the tested terminal;
and the computing terminal compares the relative positions of the interface elements in the same application program of the tested terminal with the coordinate positions of the corresponding interface elements in the reference terminal in sequence, and judges the self-adaptive capacity of the application program to the multi-resolution according to the comparison result.
In a second aspect, an embodiment of the present invention further provides an apparatus for testing adaptive multiresolution of an application, where the apparatus includes:
the information acquisition module is used for acquiring interface data information of the same application program on at least two tested terminals and a reference terminal and determining the resolutions of the tested terminals and the reference terminal, wherein different tested terminals have different resolutions;
the coordinate position calculation module is used for calculating the coordinate positions of interface elements in the same application program of the tested terminal and the reference terminal based on the interface data information of the tested terminal and the reference terminal;
the size coefficient calculation module is used for calculating the size coefficient of the measured terminal according to the resolution ratios of the measured terminal and the reference terminal;
the relative position calculation module is used for calculating the relative position of the corresponding interface element according to the size coefficient of the tested terminal and the coordinate position of the interface element in the same application program of the tested terminal;
and the result judging module is used for sequentially comparing the relative positions of the interface elements in the same application program of the tested terminal with the coordinate positions of the corresponding interface elements in the reference terminal, and judging the self-adaptive capacity of the application program to the multi-resolution according to the comparison result.
The invention provides a method and a device for testing the self-adaptive multi-resolution of an application program. By using the method, the problem that the self-adaptive capacity of the application program or the operating system on the terminals with different resolutions cannot be efficiently and accurately tested is solved, the digitization of the multi-resolution self-adaptive capacity of the application program or the operating system is realized, and the effect of rapidly and efficiently testing software is achieved.
Drawings
Fig. 1 is a flowchart of a method for testing adaptive multiresolution of an application according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for testing adaptive multiresolution of an application according to a second embodiment of the present invention;
fig. 3A is a flowchart of a method for testing adaptive multi-resolution of an application according to a third embodiment of the present invention;
FIG. 3B is an interface for operating the same application program displayed on the tested terminal C1;
FIG. 3C is an interface for operating the same application program displayed on the terminal under test C2;
FIG. 3D is an interface for operation of the same application as displayed on reference terminal C0;
fig. 4 is a schematic structural diagram of an apparatus for testing adaptive multi-resolution of an application according to a third 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 method for testing adaptive multi-resolution of an application according to an embodiment of the present invention, where this embodiment is applicable to a case where the application is tested to be capable of adaptive multi-resolution, and the method may be executed by an apparatus configured in a computing terminal for testing adaptive multi-resolution of an application, as shown in fig. 1, where the method for testing adaptive multi-resolution of an application according to this embodiment includes the following operations:
step 101, a computing terminal acquires interface data information of the same application program on at least two tested terminals and a reference terminal, and determines the resolutions of the tested terminals and the reference terminal, wherein different tested terminals have different resolutions.
In this embodiment, the computing terminal may specifically refer to an electronic device with processing and computing capabilities, such as a personal computer and a notebook computer. The tested terminal and the reference terminal can be mobile terminal equipment supporting intelligent operating systems such as android, IOS and Windows phone. The reference terminal is mainly used as a standard for testing the multi-resolution self-adaptive capacity of the application program.
Specifically, in this embodiment, the same application installed on the tested terminal and the reference terminal needs to be tested, and the computing terminal first obtains the interface data information and the resolution of the same application on the tested terminal and the reference terminal. The interface data information is specifically programming data information forming a visual operation interface of an application program, and is mainly compiled based on Extensible Markup Language (XML). In this embodiment, the computing terminal captures, based on the capture program, an XML file for operating interface layout settings in the same application as interface data information of the application. Generally, the interface data information may specifically include position coordinate data, size, and the like of a control set when the interface is operated to perform layout setting. The resolution specifically refers to the screen resolution of the terminal to be tested or the reference terminal. The screen resolution of the tested terminal or the reference terminal can be obtained based on the product basic information of the corresponding terminal, and it should be noted that the screen resolutions of the tested terminals for testing are different from each other.
102, calculating coordinate positions of interface elements in the same application program of the measured terminal and the reference terminal by the calculating terminal based on interface data information of the measured terminal and the reference terminal.
In this embodiment, the multi-resolution adaptive capability of the test application is converted into whether the interface element in the test application has a position deviation when the resolution is changed. Therefore, this step mainly calculates the coordinate positions of the interface elements in the application program. The interface elements are controls capable of being directly operated in a visual operation interface of the application program, such as buttons, text boxes, scroll bars and the like.
In this embodiment, the computing terminal may compute the coordinate positions of the interface elements in the same application program of the measured terminal and the reference terminal, based on the interface data information of the measured terminal and the reference terminal. It should be noted that the outer contour of the interface element in the operation interface is generally a square, and the square may be determined based on a plurality of coordinate points, that is, the outer contour of the interface element may be formed based on a plurality of coordinate points, so as to display the position of the interface element in the operation interface. In addition, in the interface data information, a coordinate value exists at all coordinate points, and the coordinate value is set in the basic unit of the pixel px.
Specifically, coordinate values of a plurality of coordinate points used for forming the interface elements are obtained through the interface data information; based on the coordinate values of the coordinate points, an average coordinate value of the coordinate points can be calculated, wherein the average coordinate value is the coordinate position of the interface element.
And 103, calculating the size coefficient of the measured terminal by the calculating terminal according to the resolution ratios of the measured terminal and the reference terminal.
In the embodiment, the self-adaptive capability of the test application program to the multi-resolution can be converted into whether the interface elements in the test application program are deviated in position when the resolution is changed. And testing whether the position deviation occurs or not is actually to test whether the display position of the interface element in the visual operation interface of the application program on the tested terminal with different resolutions deviates or not, and if the deviation does not occur, the application program can be self-adaptive to multiple resolutions. And judging whether the display position of the interface element is deviated or not, wherein data comparison is needed. But the coordinate positions of the interface elements on different terminals to be tested cannot be directly compared, so that after the coordinate positions calculated in step 102, the size coefficients of different terminals to be tested need to be calculated, and the size coefficients are particularly used for calculating the relative positions of the interface elements.
Further, the calculating terminal calculates the size coefficient of the measured terminal according to the resolutions of the measured terminal and the reference terminal, and includes: and the calculating terminal calculates the ratio of the resolution of the reference terminal to the resolution of the measured terminal and records the ratio as the size coefficient of the corresponding measured terminal.
In this embodiment, the size coefficient of the measured terminal is a ratio of a resolution of the reference terminal to a resolution of the measured terminal. For example, the size factor in the test method provided by the present invention can be simply described as: if the screen resolution of the reference terminal is (1280 × 720) and the screen resolution of the measured terminal is (640 × 480), the ratio (1280 × 720)/(640 × 480) of the resolution of the reference terminal (1280 × 720) to the resolution of the measured terminal (640 × 480) is the size coefficient of the measured terminal.
And 104, calculating the relative position of the corresponding interface element by the calculation terminal according to the size coefficient of the tested terminal and the coordinate position of the interface element in the same application program of the tested terminal.
In this embodiment, based on the coordinate position of the interface element calculated in step 102 and the size coefficient of the terminal under test calculated in step 103, the relative position of the interface element in the same application program of different terminals under test can be calculated. The relative position can be used for comparing whether the interface element has position deviation on different tested terminals.
And 105, comparing the relative positions of the interface elements in the same application program of the tested terminal with the coordinate positions of the corresponding interface elements in the reference terminal in sequence by the computing terminal, and judging the self-adaptive capacity of the application program to the multi-resolution according to the comparison result.
In this embodiment, whether the display position of the interface element in the visual operation interface of the test application program is deviated or not is determined on the tested terminals with different resolutions by comparing the relative position of the interface element in the same application program of different tested terminals with the coordinate position of the corresponding interface element in the same application program of the reference terminal. And judging whether the application program can adapt to the multi-resolution according to the comparison result.
According to the technical scheme of the first embodiment, the coordinate position of the interface element can be calculated through the interface data information of the tested terminal and the reference terminal, the size coefficient of the tested terminal can be obtained through the resolution of the tested terminal and the reference terminal, and then the relative position of the interface element can be calculated based on the coordinate position and the size coefficient; and finally, whether the application program is adaptive to multi-resolution or not can be judged by comparing the relative position of the interface element of the tested terminal with the coordinate position of the reference terminal. By using the method, the digitization of the multi-resolution self-adaptive capacity of the test application program or the operating system is realized, and the effect of quickly and efficiently carrying out software test is achieved.
Example two
Fig. 2 is a flowchart of a method for testing adaptive multi-resolution of an application according to a second embodiment of the present invention. In this embodiment, the step "the computing terminal obtains interface data information of the same application program on at least two tested terminals and a reference terminal, and determines the resolutions of the tested terminals and the reference terminal" is further optimized as follows: the computing terminal is connected with at least two tested terminals and a reference terminal; the method comprises the steps that a computing terminal obtains extensible markup language (XML) files of operation interfaces in the same application program on a tested terminal and a reference terminal, wherein the XML files are interface data information of the application program; and the calculation terminal determines the resolution of the tested terminal and the reference terminal according to the product parameter information of the tested terminal and the reference terminal.
In addition, in this embodiment, the "determining the adaptive capability of the application program to the multi-resolution according to the comparison result" is further embodied as: if the coordinate value of the relative position of the interface element in the same application program of the tested terminal is the same as the coordinate value of the coordinate position of the corresponding interface element of the reference terminal, determining that the application program can be self-adaptive to multi-resolution
As shown in fig. 2, a method for testing adaptive multi-resolution of an application according to an embodiment of the present invention includes the following steps:
step 201, the computing terminal establishes connection with at least two tested terminals and a reference terminal.
In this embodiment, since the adaptive capability of the application program in multiple resolutions needs to be tested, the number of the terminals to be tested is at least two. In addition, the computing terminal can establish connection with the tested terminal and the reference terminal through a wireless communication protocol or a Universal Serial Bus (USB) so as to perform operation control on the tested terminal and the reference terminal.
Step 202, the computing terminal obtains an extensible markup language (XML) file of an operation interface in the same application program on the tested terminal and the reference terminal, wherein the XML file is interface data information of the application program.
In this embodiment, the computing terminal controls the tested terminal and the reference terminal to obtain the XML files corresponding to the operation interfaces of the same application program in the tested terminal and the reference terminal. Specifically, after the computing terminal is connected with the tested terminal and the reference terminal; the method comprises the steps that a computing terminal controls a tested terminal and a reference terminal to open any one operation interface of the same application program, captures an XML file of the operation interface based on a capture program and stores the XML file into memories of the corresponding tested terminal and the reference terminal; the computing terminal extracts XML files corresponding to the terminals from the memories of the tested terminal and the reference terminal and names the XML files with the labels of the corresponding tested terminals; and the computing terminal stores all the XML files in the same folder for later operation and computation. In this embodiment, the XML file is data information set based on a control layout of an application operating interface written in an extensible markup language, and the data information is interface data information required by this embodiment. Illustratively, the XML file includes information such as position coordinates of the control required for layout in the operation interface, and a size of the control.
And 203, the calculation terminal determines the resolution of the tested terminal and the reference terminal according to the product parameter information of the tested terminal and the reference terminal.
In this embodiment, the product parameter information introduction of each of the tested terminal and the reference terminal includes the introduction of the product basic information, so that the resolution information of the tested terminal and the reference terminal can be obtained through the product parameter information.
And 204, calculating the coordinate positions of the interface elements in the same application program of the tested terminal and the reference terminal by the calculating terminal based on the interface data information of the tested terminal and the reference terminal.
In this embodiment, the computing terminal can compute the coordinate positions of the interface elements in the same application program of the terminals based on the XML files of the terminal to be tested and the reference terminal.
Further, the interface element comprises at least one of an icon, a button, a progress bar, a scroll bar, a navigation bar, a text box, a prompt box and a window; the coordinate position of the interface element is a coordinate point, and the coordinate value corresponding to the coordinate point is the average value of the coordinate values of all the coordinate points required for forming the outer contour of the interface element in the XML file.
In this embodiment, the interface element is specifically a control in an application operating interface. When an application program is operated, the control in the application program operation interface is mainly operated. The control of the operation interface can be said to be a basic element constituting the operation interface, and therefore, the control in the operation interface is an interface element in the operation interface. These interface elements can be divided into five categories by their function, including: triggering operations, data entry, information presentation, containers, and navigation. The most representative interface elements in the five categories are icons, buttons, progress bars, scroll bars, navigation bars, text boxes, prompt boxes, windows and the like.
In this embodiment, the coordinate position of the interface element calculated by the computing terminal is a coordinate point, and the coordinate value of the coordinate point is an average value of coordinate values of all coordinate points required for forming the outline of the interface element in the XML file. The interface element displayed in the operation interface is generally not a point in a specific shape, so that the outline of the interface element is formed based on the coordinate values of the plurality of coordinate points.
Step 205, calculating the ratio of the resolution of the reference terminal to the resolution of the terminal to be tested by the computing terminal, and recording the ratio as the size coefficient of the corresponding terminal to be tested.
In this embodiment, the numerator of the calculated size coefficient of the measured terminal is the resolution of the reference terminal, and the denominator is the resolution of different measured terminals.
And step 206, the computing terminal computes the relative position of the corresponding interface element according to the size coefficient of the tested terminal and the coordinate position of the interface element in the same application program of the tested terminal.
In this embodiment, the relative position of the interface element of the tested terminal is specifically used for comparing the coordinate position of the interface element of the tested terminal with the coordinate position of the reference terminal, and the comparison result can determine whether the interface element has a position deviation in the application operation interfaces of different tested terminals.
Further, the calculating terminal calculates the relative position of the corresponding interface element according to the size coefficient of the terminal to be tested and the coordinate position of the interface element in the same application program of the terminal to be tested, and the calculating method includes: and the computing terminal computes the product of the coordinate position of the interface element in the same application program of the tested terminal and the size coefficient of the corresponding tested terminal, and records the product as the relative position of the corresponding interface element in the same application program of the tested terminal.
In this embodiment, the relative position of the interface element is a product of the coordinate position of the interface element and the size coefficient of the corresponding measured terminal. Therefore, the relative position of the interface element is also a coordinate point, and the coordinate value of the coordinate point is the product of the measured terminal size coefficient and the coordinate value of the coordinate position of the corresponding interface element.
And step 207, the computing terminal compares the relative positions of the interface elements in the same application program of the tested terminal with the coordinate positions of the corresponding interface elements in the reference terminal in sequence.
In this embodiment, in order to test the adaptive capability of the application program on multiple resolutions, the relative positions of the interface elements in the same application program of different terminals to be tested need to be sequentially compared with the coordinate positions of the corresponding interface elements in the reference terminal. And sequentially judging whether the display positions of the interface elements in the application program operation interface are deviated or not.
And 208, if the coordinate value of the relative position of the interface element in the same application program of the tested terminal is the same as the coordinate value of the coordinate position of the corresponding interface element of the reference terminal, determining that the application program can adapt to multi-resolution.
In this embodiment, based on the result of comparing the relative positions of the interface elements in the same application program of different terminals to be tested with the coordinate positions of the corresponding interface elements in the reference terminal in sequence, it may be determined whether the display positions of the interface elements in the application program operation interface are deviated, and finally, if the display positions of the interface elements are not deviated, it may be determined that the application program is capable of adapting to multiple resolutions.
According to the technical scheme of the second embodiment, the computing terminal is connected with the tested terminal and the reference terminal to obtain the XML file of the operation interface of the application program, then the coordinate position of the interface element is computed through the coordinate point of the outline of the interface element formed in the XML file, then the size coefficient of the tested terminal and the relative position of the interface element are computed in sequence, the purpose of digitally testing the multi-resolution self-adaptive capacity of the application program or the operation system is finally achieved, the accuracy and the efficiency of software testing are improved, and the method is simple and convenient.
EXAMPLE III
As shown in fig. 3A, a preferred embodiment of a method for testing application program adaptation multiresolution according to a third embodiment of the present invention is specifically that application scenarios of the third embodiment are shown in fig. 3B, fig. 3C and fig. 3D, where fig. 3B, fig. 3C and fig. 3D are operation interfaces of the same application program displayed on the terminals to be tested C1, C2 and the reference terminal C0, respectively, and the following describes in detail a testing process of application program adaptation multiresolution in fig. 3B, fig. 3C and fig. 3D with reference to fig. 3A, and as shown in fig. 3A, a schematic flow chart for testing application program adaptation with different resolutions based on the method of the present invention is provided, which specifically includes the following steps:
and step 301, the computing terminal establishes connection with the tested terminals C1 and C2 and the reference terminal C0.
Illustratively, the computing terminal establishes connections with two terminals under test C1 and C2 and a reference terminal C0 of different resolutions, based on USB or Wi-Fi.
And step 302, the computing terminal acquires the resolutions of the tested terminals C1 and C2 and the reference terminal, and acquires XML files of the same application program on different terminals.
Illustratively, the computing terminal controls the tested terminals C1 and C2 and the reference terminal C0 to enable the operation interfaces of the same application program on each terminal to be displayed on the screen of the computing terminal; then capturing the XML file of the operation interface on each terminal based on a capture program, wherein the captured XML file is stored in the memory of each terminal by default; and finally, the computing terminal extracts the XML files from the memory of each terminal and stores the XML files in a folder named as Test of the computing terminal, wherein the XML files of the tested terminals C1 and C2 and the reference terminal C0 in the Test file are respectively marked as TestC1, TestC2 and TestC 0. The XML file is the interface data information needed by the test application.
In addition, the computing terminal determines the resolutions of the terminals under test C1 and C2 and the reference terminal C0 based on the product parameter information of each terminal as follows: (640 × 480), (960 × 640), and (1280 × 720).
And step 303, the computing terminal computes the coordinate position of the interface element in the application program based on the XML file.
In this embodiment, the coordinate position of the interface element is an average value of coordinate values of all coordinate points required to form an outer contour of the interface element in the XML file. The calculation process of the coordinate positions of the interface elements is explained below by taking any one of the interface elements 31 of the same application in the terminals under test C1 and C2 and the reference terminal C0 shown in fig. 3B as an example.
Illustratively, the XML files TestC1, TestC2, and TestC0 of the respective terminals are read, and first, coordinate values of coordinate points forming the outer contour of the corresponding interface element 31 are read in TestC1, TestC2, and TestC 0. It should be noted that, since the interface element 31 has a square shape, the outline thereof can be determined based on four vertices. In TestC1, the coordinate points of the outer contour of interface element 31 that can be read out are: p1(30px ), p2(30px,250px), p3(228px,30px), p4(228px,250 px); in TestC2, the coordinate points of the outer contour of interface element 31 are read as follows: p1(60px ), p2(60px,500px), p3(456px,60px), p4(456px,500 px); in TestC0, the coordinate points of the outer contour of interface element 31 are read as follows: p1(90px ), p2(90px,750px), p3(684px,90px), p4(684px,750 px). Finally, the computing terminal calculates an average value of coordinate values of coordinate points forming the outer contour of the interface element 31 in the XML file, wherein the average value is the coordinate position of the interface element 31 on the corresponding terminal, and the coordinate value of the coordinate position P0 of the interface element 31 of the application program on the tested terminal C1 is (129px,140 px); the coordinate value of the coordinate position P0 of the interface element 31 of the application program on the tested terminal C2 is (258px,280 px); the coordinate value of the coordinate position P0 of the interface element 31 of the application on the reference terminal C0 is (387px,420 px). Note that the coordinate values of the coordinate points are each in the basic unit of the pixel px.
And step 304, calculating the ratio of the resolution of the reference terminal to the resolution of each measured terminal by the calculating terminal, and taking the ratio as the size coefficient of the measured terminals C1 and C2.
For example, based on the calculation formula of the measured terminal size coefficient, the calculating terminal may calculate the size coefficient of the measured terminal C1 as: (1280 × 720)/(640 × 480) ═ 3; the dimensional coefficient of the terminal C2 to be measured is: (1280 × 720)/(960 × 640) ═ 3/2.
And 305, calculating the relative positions of the interface elements in the tested terminals C1 and C2 by the calculating terminal based on the coordinate positions of the interface elements and the size coefficient of the tested terminal.
For example, based on the calculation formula of the relative position of the interface element in the tested terminal, the calculating terminal may calculate the coordinate value of the relative position P0' of the interface element 31 in the tested terminal C1 as: p0 '═ 3 × P0, i.e., P0' ═ (3 × 129px,3 × 140px) ═ (387px,420 px); similarly, the coordinate value of the relative position of the interface element 31 in the tested terminal C2 can also be calculated as: p 0' ═ (387px,420 px).
And step 306, calculating the difference between the coordinate value of the relative position of each detected terminal interface element and the coordinate value of the coordinate position of the reference terminal interface element by the computing terminal, and if the difference value is 0, indicating that the application terminal is adaptive to multi-resolution.
Illustratively, the computing terminal calculates the difference between the relative position p 0' (387px,420px) of the interface element 31 in the tested terminal C1 and the coordinate position p0(387px,420px) of the interface element 31 in the reference terminal C0, the difference being (0px ); then, the difference between the relative position p 0' (387px,420px) of the interface element 31 in the terminal under test C2 and the coordinate position p0(387px,420px) of the interface element 31 in the terminal under reference C0 is calculated, and the difference is also (0px ).
If the differences between the coordinate values of the relative positions of all the interface elements in the applications of the tested terminals C1 and C2 and the coordinate values of the coordinate positions of the corresponding interface elements in the corresponding application of the reference terminal C0 are all 0, the applications are considered to have the capability of adapting to different resolutions.
The third embodiment of the invention provides a preferred embodiment of a method for testing the self-adaptive multi-resolution of an application program, wherein in the preferred embodiment, a computing terminal is firstly connected with a tested terminal and a reference terminal to obtain interface data information of the application program in the tested terminal and the reference terminal; then, the computing terminal computes the coordinate position of the interface element based on the interface data information and the size coefficient of the tested terminal based on different terminal resolutions; then, calculating the relative position of the interface element based on the coordinate position of the interface element and the size coefficient of the measured terminal; and finally, judging the self-adaptive capacity of the application program to the multi-resolution based on the difference between the relative position of the interface element in the tested terminal and the coordinate position of the interface element in the reference terminal. By utilizing the method, the digitization of the multi-resolution self-adaptive capacity of the test application program or the operating system is realized, and the effect of quickly and efficiently carrying out software test is achieved.
Example four
Fig. 4 is a schematic structural diagram of an apparatus for testing adaptive multi-resolution of an application according to a fourth embodiment of the present invention. The present embodiment may be applicable to the case of testing whether the application is capable of adaptive multi-resolution, and the apparatus may be implemented by software and/or hardware and is generally integrated in a computing terminal. The device has the following specific structure: an information acquisition module 41, a coordinate position calculation module 42, a size coefficient calculation module 43, a relative position calculation module 44, and a result determination module 45. Wherein,
the information obtaining module 41 is configured to obtain interface data information of the same application program on at least two tested terminals and a reference terminal, and determine resolutions of the tested terminals and the reference terminal, where different tested terminals have different resolutions.
And the coordinate position calculating module 42 is configured to calculate coordinate positions of interface elements in the same application program of the terminal to be tested and the reference terminal based on the interface data information of the terminal to be tested and the reference terminal.
And a size coefficient calculating module 43, configured to calculate a size coefficient of the terminal to be tested according to resolutions of the terminal to be tested and the reference terminal.
And the relative position calculating module 44 is configured to calculate the relative position of the corresponding interface element according to the size coefficient of the terminal to be tested and the coordinate position of the interface element in the same application program of the terminal to be tested.
And the result judging module 45 is configured to compare the relative positions of the interface elements in the same application program of the terminal to be tested with the coordinate positions of the corresponding interface elements in the reference terminal in sequence, and judge the adaptive capacity of the application program to multiple resolutions according to a comparison result.
In this embodiment, the apparatus first obtains interface data information and resolution of at least two terminals to be tested and a reference terminal through the information obtaining module 41; secondly, calculating the coordinate positions of the interface elements in the same application program of the tested terminal and the reference terminal according to the interface data information through a coordinate position calculating module 42; then, the size coefficient of the terminal to be measured is calculated by the size coefficient calculating module 43 according to the resolution of the terminal to be measured and the reference terminal; then, calculating the relative position of the interface element in the same application program of the tested terminal according to the size coefficient of the tested terminal and the coordinate position of the corresponding interface element by using a relative position calculating module 44; finally, the adaptive capacity of the application program under multiple resolutions is determined by the result determination module 45.
In the fourth embodiment, the device for testing the adaptive multi-resolution of the application program solves the problem that the adaptive capacities of the application program or the operating system on terminals with different resolutions cannot be tested efficiently and accurately, realizes digitization of the adaptive capacities of the application program or the operating system with the multi-resolution, and achieves the effect of performing software testing quickly and efficiently.
On the basis of the above embodiment, the information obtaining module 41 includes: the connection establishing unit is used for establishing connection with at least two tested terminals and a reference terminal; the interface data information acquisition unit is used for acquiring extensible markup language (XML) files of operation interfaces in the same application program on the tested terminal and the reference terminal, and the XML files are interface data information of the application program; and the resolution acquisition unit is used for determining the resolutions of the tested terminal and the reference terminal according to the product parameter information of the tested terminal and the reference terminal.
Meanwhile, in the apparatus for testing the application adaptive multi-resolution, the interface element includes at least one of an icon, a button, a progress bar, a scroll bar, a navigation bar, a text box, a prompt box, and a window; the coordinate position of the interface element is a coordinate point, and the coordinate value corresponding to the coordinate point is the average value of the coordinate values of all the coordinate points required for forming the outer contour of the interface element in the XML file.
On the basis of the foregoing embodiment, the size coefficient calculating module 43 is specifically configured to: and calculating the ratio of the resolution of the reference terminal to the resolution of the terminal to be measured, and recording the ratio as the size coefficient of the corresponding terminal to be measured.
On the basis of the above embodiment, the relative position calculating module 44 is specifically configured to: and calculating the product of the coordinate position of the interface element in the same application program of the tested terminal and the size coefficient of the corresponding tested terminal, and recording the product as the relative position of the corresponding interface element in the same application program of the tested terminal.
On the basis of the foregoing embodiment, the result determining module 45 is specifically configured to: and comparing the relative position of the interface element in the same application program of the tested terminal with the coordinate position of the corresponding interface element in the reference terminal in sequence, and if the coordinate value of the relative position of the interface element in the same application program of the tested terminal is the same as the coordinate value of the coordinate position of the corresponding interface element in the reference terminal, determining that the application program can be self-adaptive to multi-resolution.
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 (12)

1. A method for testing application adaptive multiresolution, comprising:
the method comprises the steps that a computing terminal obtains interface data information of the same application program on at least two tested terminals and a reference terminal, and determines the resolution ratios of the tested terminals and the reference terminal, wherein different tested terminals have different resolution ratios, the multi-resolution self-adaptive capacity of a test application program is converted into whether the display positions of interface elements in a visual operation interface of the test application program on the tested terminals with different resolution ratios are deviated or not;
the method comprises the steps that a computing terminal computes coordinate positions of interface elements in the same application program of a tested terminal and a reference terminal based on interface data information of the tested terminal and the reference terminal;
the calculation terminal calculates the size coefficient of the measured terminal according to the resolution ratios of the measured terminal and the reference terminal;
the method comprises the steps that a computing terminal computes the relative position of a corresponding interface element according to the size coefficient of a tested terminal and the coordinate position of the interface element in the same application program of the tested terminal, wherein the relative position is used for comparing whether the interface element has position deviation on different tested terminals;
and the computing terminal compares the relative positions of the interface elements in the same application program of the tested terminal with the coordinate positions of the corresponding interface elements in the reference terminal in sequence, and judges the self-adaptive capacity of the application program to the multi-resolution according to the comparison result.
2. The method of claim 1, wherein the step of the computing terminal obtaining interface data information of the same application program on at least two tested terminals and a reference terminal and determining the resolution of the tested terminals and the reference terminal comprises:
the computing terminal is connected with at least two tested terminals and a reference terminal;
the method comprises the steps that a computing terminal obtains extensible markup language (XML) files of operation interfaces in the same application program on a tested terminal and a reference terminal, wherein the XML files are interface data information of the application program;
and the calculation terminal determines the resolution of the tested terminal and the reference terminal according to the product parameter information of the tested terminal and the reference terminal.
3. The method of claim 2, wherein the interface element comprises at least one of an icon, a button, a progress bar, a scroll bar, a navigation bar, a text box, a prompt box, and a window;
the coordinate position of the interface element is a coordinate point, and the coordinate value corresponding to the coordinate point is the average value of the coordinate values of all the coordinate points required for forming the outer contour of the interface element in the XML file.
4. The method according to claim 1, wherein the calculating terminal calculates the size coefficient of the terminal under test according to the resolutions of the terminal under test and the reference terminal, and comprises:
and the calculating terminal calculates the ratio of the resolution of the reference terminal to the resolution of the measured terminal and records the ratio as the size coefficient of the corresponding measured terminal.
5. The method according to claim 1, wherein the calculating terminal calculates the relative position of the corresponding interface element according to the size coefficient of the tested terminal and the coordinate position of the interface element in the same application program of the tested terminal, and comprises:
and the computing terminal computes the product of the coordinate position of the interface element in the same application program of the tested terminal and the size coefficient of the corresponding tested terminal, and records the product as the relative position of the corresponding interface element in the same application program of the tested terminal.
6. The method according to claim 1, wherein the determining, by the computing terminal, the adaptive capacity of the application program to the multi-resolution according to the comparison result comprises:
and if the coordinate value of the relative position of the interface element in the same application program of the tested terminal is the same as the coordinate value of the coordinate position of the corresponding interface element of the reference terminal, determining that the application program can adapt to multi-resolution.
7. An apparatus for testing adaptive multi-resolution of an application, configured in a computing terminal, comprising:
the information acquisition module is used for acquiring interface data information of the same application program on at least two tested terminals and a reference terminal and determining the resolutions of the tested terminals and the reference terminal, wherein different tested terminals have different resolutions, and the multi-resolution self-adaptive capacity of the test application program is converted into whether the display positions of interface elements on the visual operation interface of the test application program on the tested terminals with different resolutions are deviated or not;
the coordinate position calculation module is used for calculating the coordinate positions of interface elements in the same application program of the tested terminal and the reference terminal based on the interface data information of the tested terminal and the reference terminal;
the size coefficient calculation module is used for calculating the size coefficient of the measured terminal according to the resolution ratios of the measured terminal and the reference terminal;
the relative position calculation module is used for calculating the relative position of the corresponding interface element according to the size coefficient of the tested terminal and the coordinate position of the interface element in the same application program of the tested terminal, and the relative position is used for comparing whether the interface element has position deviation on different tested terminals;
and the result judging module is used for sequentially comparing the relative positions of the interface elements in the same application program of the tested terminal with the coordinate positions of the corresponding interface elements in the reference terminal, and judging the self-adaptive capacity of the application program to the multi-resolution according to the comparison result.
8. The apparatus of claim 7, wherein the information obtaining module comprises:
the connection establishing unit is used for establishing connection with at least two tested terminals and a reference terminal;
the interface data information acquisition unit is used for acquiring extensible markup language (XML) files of operation interfaces in the same application program on the tested terminal and the reference terminal, and the XML files are interface data information of the application program;
and the resolution acquisition unit is used for determining the resolutions of the tested terminal and the reference terminal according to the product parameter information of the tested terminal and the reference terminal.
9. The apparatus of claim 8, wherein the interface element comprises at least one of an icon, a button, a progress bar, a scroll bar, a navigation bar, a text box, a prompt box, and a window;
the coordinate position of the interface element is a coordinate point, and the coordinate value corresponding to the coordinate point is the average value of the coordinate values of all the coordinate points required for forming the outer contour of the interface element in the XML file.
10. The apparatus of claim 7, wherein the size factor calculating module is specifically configured to:
and calculating the ratio of the resolution of the reference terminal to the resolution of the terminal to be measured, and recording the ratio as the size coefficient of the corresponding terminal to be measured.
11. The apparatus of claim 7, wherein the relative position calculation module is specifically configured to:
and calculating the product of the coordinate position of the interface element in the same application program of the tested terminal and the size coefficient of the corresponding tested terminal, and recording the product as the relative position of the corresponding interface element in the same application program of the tested terminal.
12. The apparatus of claim 7, wherein the result determination module is specifically configured to:
and comparing the relative position of the interface element in the same application program of the tested terminal with the coordinate position of the corresponding interface element in the reference terminal in sequence, and if the coordinate value of the relative position of the interface element in the same application program of the tested terminal is the same as the coordinate value of the coordinate position of the corresponding interface element in the reference terminal, determining that the application program can be self-adaptive to multi-resolution.
CN201510733602.2A 2015-11-02 2015-11-02 A kind of method and apparatus of the adaptive multiresolution of test application program Expired - Fee Related CN105426144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510733602.2A CN105426144B (en) 2015-11-02 2015-11-02 A kind of method and apparatus of the adaptive multiresolution of test application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510733602.2A CN105426144B (en) 2015-11-02 2015-11-02 A kind of method and apparatus of the adaptive multiresolution of test application program

Publications (2)

Publication Number Publication Date
CN105426144A CN105426144A (en) 2016-03-23
CN105426144B true CN105426144B (en) 2019-03-29

Family

ID=55504375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510733602.2A Expired - Fee Related CN105426144B (en) 2015-11-02 2015-11-02 A kind of method and apparatus of the adaptive multiresolution of test application program

Country Status (1)

Country Link
CN (1) CN105426144B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106383789A (en) * 2016-12-05 2017-02-08 广州唯品会信息科技有限公司 Software interface test method and software interface test system
CN112395201A (en) * 2020-11-26 2021-02-23 交控科技股份有限公司 ATS test method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927143A (en) * 2014-04-04 2014-07-16 福建星网视易信息系统有限公司 Method and device for adaptively adjusting interface layout on basis of screen resolution
CN104951397A (en) * 2014-05-16 2015-09-30 腾讯科技(深圳)有限公司 Mobile equipment testing method, mobile equipment testing device, mobile equipment testing server and mobile equipment testing system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050282133A1 (en) * 2004-06-18 2005-12-22 Christopher Crowhurst System and method for facilitating computer-based testing using traceable test items

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927143A (en) * 2014-04-04 2014-07-16 福建星网视易信息系统有限公司 Method and device for adaptively adjusting interface layout on basis of screen resolution
CN104951397A (en) * 2014-05-16 2015-09-30 腾讯科技(深圳)有限公司 Mobile equipment testing method, mobile equipment testing device, mobile equipment testing server and mobile equipment testing system

Also Published As

Publication number Publication date
CN105426144A (en) 2016-03-23

Similar Documents

Publication Publication Date Title
US10747634B2 (en) System and method for utilizing machine-readable codes for testing a communication network
US9633450B2 (en) Image measurement device, and recording medium
KR101228336B1 (en) Personalization Service Providing Method by Using Mobile Terminal User's Activity Pattern and Mobile Terminal therefor
CN111027531A (en) Pointer instrument information identification method and device and electronic equipment
CN105426144B (en) A kind of method and apparatus of the adaptive multiresolution of test application program
CN110740315B (en) Camera correction method and device, electronic equipment and storage medium
JP2017068465A (en) Information processing device, control method, and program
CN112762915B (en) Compass precision optimization method and device, storage medium and electronic equipment
CN112419402B (en) Positioning method and system based on multispectral image and laser point cloud
CN110211459B (en) Examination item rechecking method and device, processing terminal and storage medium
CN112667212A (en) Buried point data visualization method and device, terminal and storage medium
CN112731030A (en) Electronic component detection method and device, terminal equipment and storage medium
CN117252837A (en) Data processing method and device for wafer test, medium and electronic equipment
CN104508706A (en) Feature extraction method, program and system
CN111136655B (en) Method and device for acquiring inspection point
CN112767211A (en) Rescue resource recommendation method and device, electronic equipment and storage medium
JP6357843B2 (en) Application inspection system, application inspection apparatus, and application inspection program
EP4001931A1 (en) Electromagnetic environment analysis system, electromagnetic environment analysis method, and program
EP2919166A1 (en) Image processing device, image processing method, and image processing program
CN109300130B (en) Detection method and device
CN111356977A (en) Method for processing writing strokes and related equipment
CN107885643A (en) The display methods and device of monitoring information
CN110189279A (en) Model training method, device, electronic equipment and storage medium
US20220155357A1 (en) Electromagnetic environment analysis system, electromagnetic environment analysis method, and non-transitory computer-readable medium
CN114422050B (en) Method, system and platform for detecting subcarriers and visualizing subcarriers in real time based on WIFI

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190329

Termination date: 20211102