Background technology
User interface (User interface, be called for short UI) test refers to whether the style at test subscriber interface satisfies customer requirement, whether literal is correct, whether the page is attractive in appearance, whether literal and picture combination be perfect, whether operate function such as close friend.UI test comprises the test of friendly to UI, hommization, ease for operation etc.The target of UI test is to guarantee that user interface can come for the user provides corresponding visit or function of browse by tested object, guarantees that user interface meets the standard of company or industry.
Automatic test is to use automated test tool to test, and this class testing does not generally need the people to intervene, and uses morely in tests such as general user interface (being called for short GUI) test, system performance testing usually.
Have a difficult problem in the automatic test of terminal UI: the characteristics of terminal series products need the demonstration at more concern UI interface, whether correctly whether normally to show, point out as menu, some dynamic interfaces particularly, do you how to judge its correctness? to this, following solution is arranged in the prior art:
1, in the terminal UI test process,, and, realizes the judgement of the correctness of UI test result by analyzing the shooting picture afterwards with the demonstration of video camera shooting mobile phone screen by the operation of mechanical arm analogue-key.
The weak point of this method is: needs to use mechanical arm and video camera, and needs manual analysis, and the cost height, input ratio is bigger; The interpretation of result more complicated need carefully be browsed and take image in the test process.
2, in the terminal UI test process, the data file of the LCD of output mobile phone (Liquid Crystal Display is called for short LCD) is judged UI test result correctness by comparison document then.
The weak point of this method is: the LCD data volume of output is big, influences handset capability, and is subjected to the limitation of data-transmission efficiency; Because the LCD of mobile phone data variation is bigger, relatively total data is infeasible in addition.
Summary of the invention
Embodiments of the invention provide a kind of test method for terminal user interfaces and device, can significantly reduce data quantity transmitted, simplify the operation effectively, raise the efficiency, and use manpower and material resources sparingly.
A kind of test method for terminal user interfaces that embodiments of the invention provide comprises: testing apparatus sends the request message of the check code be used to obtain the terminal liquid crystal display on-screen data to terminal; After terminal is received described request message, calculate the check code of the described liquid crystal display equipment screen data of described terminal, and will calculate the check code that obtains and return to testing apparatus; The check code that the described calculating of receiving when testing apparatus obtains and default, liquid crystal display equipment screen show that the pairing liquid crystal display equipment screen data test of check code of described calculating acquisition passed through when the on-screen data check code when correct was consistent.Wherein, described testing apparatus comprises PC or special test equipment etc.
In technique scheme, by after receiving request message, calculate the check code (as cyclic redundancy check (CRC) code) of liquid crystal display equipment screen data, the check code that described calculating is obtained with default, compare when liquid crystal display equipment screen shows the check code of on-screen data corresponding when correct, the pairing on-screen data of the described check code of receiving is by testing when the two is consistent.From the above, technique scheme is carried out validation test by the check code according to the liquid crystal display equipment screen data, but not liquid crystal display equipment screen data itself are carried out validation test, thereby significantly reduced data quantity transmitted, simultaneously do not need mechanical arm of the prior art and video camera yet, significantly reduced manually-operated simultaneously, simplified operating process, improve efficient, saved manpower and materials.
The proving installation of a kind of end-user interface that embodiments of the invention provide comprises: interface module, and mutual with the UART Universal Asynchronous Receiver Transmitter of terminal, be used for by UART Universal Asynchronous Receiver Transmitter and testing apparatus interactive information; Computing module, be connected with interface module, after being used for obtaining the request message of check code of terminal liquid crystal display on-screen data in interface module being used to of receiving that testing apparatus sends, calculate the check code of the liquid crystal display equipment screen data of this terminal, and will calculate the check code that obtains and return to testing apparatus via interface module.
In technique scheme, by the proving installation of described end-user interface is set in end side, thereby the function to existing terminal is expanded, come the request message of acceptance test equipment transmission by interface module, and calculate and return the check code of corresponding liquid crystal display on-screen data by computing module.From the above, technique scheme is by expanding the function of existing terminal, the request message that makes terminal can be automatically obtain the check code of terminal liquid crystal display on-screen data to testing apparatus being used to of sending is handled, and return corresponding check code, simplified operation greatly, reduce the transmission quantity of data, improved efficient, saved manpower and materials.
Embodiment
Below in conjunction with drawings and Examples, the technical scheme of embodiments of the invention is described in further detail.
The embodiment one of test method for terminal user interfaces of the present invention comprises: the request message that sends the check code be used to obtain the terminal liquid crystal display on-screen data; Calculate the check code of described liquid crystal display equipment screen data; The check code that obtains when described calculating and default, liquid crystal display equipment screen show that the pairing liquid crystal display equipment screen data test of check code of described calculating acquisition passed through when the on-screen data check code when correct was consistent.
In the foregoing description one, by after receiving request message, calculate the check code (as cyclic redundancy check (CRC) code) of liquid crystal display equipment screen data, the check code that described calculating is obtained with default, compare when liquid crystal display equipment screen shows the check code of on-screen data corresponding when correct, the pairing on-screen data of the described check code of receiving is by testing when the two is consistent.From the above, the foregoing description one carries out validation test by the check code according to the liquid crystal display equipment screen data, but not liquid crystal display equipment screen data itself are carried out validation test, thereby significantly reduced data quantity transmitted, simultaneously do not need mechanical arm of the prior art and video camera yet, significantly reduced manually-operated simultaneously, simplified operating process, improve efficient, saved manpower and materials.
Preferably, in the foregoing description one, the request message that described transmission is used to obtain the check code of terminal liquid crystal display on-screen data can specifically comprise: identify the screen area of the terminal liquid crystal display that need test by pixel coordinate information, and send the request message that comprises this pixel coordinate information.The check code of the described liquid crystal display equipment screen data of described calculating can specifically comprise: the check code that calculates the data of the screen area that this pixel coordinate information identified.The described check code that obtains when described calculating with preset, when liquid crystal display equipment screen shows that on-screen data check code when correct is consistent, the pairing liquid crystal display equipment screen data test of check code that described calculating obtains is by can specifically comprising: the check code that obtains when described calculating and the screen area of terminal liquid crystal display default, that described needs are tested show that the data test of the screen area of the pairing LCD of check code of described calculating acquisition passed through when the screen area data check sign indicating number when correct was consistent.In addition, in the foregoing description one, also can receive described request message, and send the check code that described calculating obtains by the Diagnosis Service interface by the Diagnosis Service interface.
As shown in Figure 1, embodiments of the invention two provide a kind of test method for terminal user interfaces, and this embodiment two comprises: in step 1, testing apparatus sends the request message of the check code be used to obtain the terminal liquid crystal display on-screen data to terminal; In step 2, after terminal is received this request message, calculate the check code of the liquid crystal display equipment screen data of this terminal then, and will calculate the check code that obtains and return to testing apparatus; Then in step 3, the check code of receiving when testing apparatus and default, liquid crystal display equipment screen show that the pairing liquid crystal display equipment screen data test of the described check code of receiving passed through when the on-screen data check code when correct was consistent.
In the foregoing description two, by terminal after receiving the request message that testing apparatus sends, send the check code (as cyclic redundancy check (CRC) code) of liquid crystal display equipment screen data to testing apparatus, by testing apparatus with the check code received with default, compare when liquid crystal display equipment screen shows the check code of on-screen data corresponding when correct, the pairing on-screen data of the described check code of receiving is by test when the two is consistent.
Be that example brief introduction check code principle: CRC is a class important linear block code with cyclic redundancy check (CRC) code (being called for short CRC) below, the Code And Decode method is simple, and the EDC error detection and correction ability is strong, is widely used for realizing Error Control in the communications field.The coding method of CRC be with binary data t (x) to be sent divided by generator polynomial g (x), with last remainder as CRC.
From the above, the foregoing description two carries out validation test by the check code according to the liquid crystal display equipment screen data, but not liquid crystal display equipment screen data itself are carried out validation test, thereby significantly reduced data quantity transmitted (only needing transmission 32 bit check sign indicating numbers); Comparison is simple, can conveniently realize the comparison of terminal UI display result; Simultaneously do not need mechanical arm of the prior art and video camera yet, significantly reduced manually-operated simultaneously, simplified operating process, improved efficient, saved manpower and materials.
The black and white LCD screen that with the screen size is 128X64 is an example, if transmit full frame data, data volume is the 128X64/8=1024 byte; The color LCD screen that with the screen size is 128X64 is an example, if transmit full frame data, data volume is the 128X64X2=16384 byte; And if the method that adopts the foregoing description one to be provided only needs the check code of transmission lcd screen data, is example with CRC, data volume only is 4 bytes (promptly 32).
Further, at the frequent problem that changes of partial L CD on-screen data, but piecemeal obtains the lcd screen data, exports its verification code value then, tests with the on-screen data subregion to LCD.As shown in Figure 2, schematic flow sheet for the embodiment three of test method for terminal user interfaces of the present invention, present embodiment three comprises: in step 10, testing apparatus identifies the screen area of the terminal liquid crystal display that need test by pixel coordinate information, and will comprise that the request message of this pixel coordinate information sends to terminal; Then in step 20, after terminal is received this request message, calculate the check code of the data of the screen area that this pixel coordinate information identified; Then in step 21, terminal will be calculated the check code that obtains and return to testing apparatus; Subsequently in step 30, the screen area of check code of receiving when testing apparatus and terminal liquid crystal display default, that described needs are tested shows that the data test of the screen area of the pairing LCD of check code that described testing apparatus is received passed through when the screen area data check sign indicating number when correct was consistent.
In the present embodiment three, verify, can test, thereby effectively solve the problem that partial L CD on-screen data often changes the on-screen data subregion of LCD by check code to the data in lcd screen zone; By obtaining the check code of the different viewing areas of screen data, also can improve the accuracy of comparison simultaneously.
In the foregoing description one to three, described testing apparatus can comprise PC (being called for short PC) or special test equipment etc., described terminal can be come request message that the acceptance criteria IO interface is received, that testing apparatus sends by Diagnosis Service interface (being called for short the Diag interface), and comes to send check code to testing apparatus via standard I-O interface by the Diagnosis Service interface.
For example, can use PC, connect data line, carry out communication with mobile phone, realize obtaining LCD of mobile phone on-screen data check code function, and the check code that obtains is compared, the output comparative result by serial ports or USB mouth in the PC side as testing apparatus.Simultaneously in end side, the Diag interface of terminal extension, and the LCD of mobile phone viewing area carried out subregion, obtain the LCD data of full frame or subregion; The LCD of mobile phone video data that obtains is carried out verification, by the expansion the Diag interface to PC back-checking sign indicating number.
In addition, those of ordinary skill in the art is to be understood that, all or part of step among the embodiment one to three of the invention described above test method for terminal user interfaces, can instruct relevant hardware to realize by program, described program can be stored in the computer read/write memory medium, for example is stored in ROM (read-only memory) (being called for short ROM), random access memory (being called for short RAM), disk, the CD etc.
Fig. 3 is the structural representation of the embodiment one of the proving installation of end-user interface of the present invention, present embodiment one comprises: interface module 31, mutual with the UART Universal Asynchronous Receiver Transmitter (being called for short UART) of terminal, be used for by UART Universal Asynchronous Receiver Transmitter and testing apparatus interactive information; Computing module 32, be connected with interface module 31, after being used for obtaining the request message of check code of terminal liquid crystal display on-screen data in interface module 31 being used to of receiving that testing apparatus sends, calculate the check code of the liquid crystal display equipment screen data of this terminal, and will calculate the check code that obtains and return to testing apparatus via interface module 31.
In the embodiment one of the proving installation of the invention described above end-user interface, by the proving installation of described end-user interface is set in end side, thereby the function to existing terminal is expanded, come the request message of acceptance test equipment transmission by interface module, and calculate and return the check code of corresponding liquid crystal display on-screen data by computing module.
From the above, the embodiment one of the proving installation of the invention described above end-user interface is by expanding the function of existing terminal, the request message that makes terminal can be automatically obtain the check code of terminal liquid crystal display on-screen data to testing apparatus being used to of sending is handled, and return corresponding check code, simplified operation greatly, reduce the transmission quantity of data, improved efficient, saved manpower and materials.
Preferably, among the embodiment one of the proving installation of the invention described above end-user interface, described computing module can comprise: the on-screen data extraction module, and the pixel coordinate information that the described request message that is used for receiving according to interface module comprises is extracted the data of the screen area of corresponding liquid crystal display; The check code computing module is used to calculate the check code of the data of described screen area, and will calculate the check code that obtains and return to testing apparatus via interface module.Verify by check code, can test, thereby effectively solve the problem that partial L CD on-screen data often changes the on-screen data subregion of LCD to the data in lcd screen zone; Obtain the check code of the different viewing areas of screen data simultaneously by the on-screen data extraction module, also can improve the accuracy of comparison.
Preferably, among the embodiment one of the proving installation of the invention described above end-user interface, described interface module can be the standard input/output module, described computing module is the Diagnosis Service interface that possesses expanded function, described expanded function is obtained the request message of check code of terminal liquid crystal display on-screen data for being used to of receiving in interface module that testing apparatus sends after, calculate the check code of the liquid crystal display equipment screen data of this terminal, and will calculate the check code that obtains and return to testing apparatus via interface module.Corresponding Principle of Communication is: terminal is operated UART (a universal asynchronous receipts/device) mouthful by standard I-O interface, encapsulated the DIAG interface on the standard I-O interface again, this DIAG interface is carried out the function expansion, make this DIAG interface can handle the request package that standard I-O interface is received, and return a respond packet or erroneous packets and give standard I-O interface.
Those of ordinary skill in the art should understand, all or part of module among the embodiment one of the proving installation of the invention described above end-user interface can directly realize by hardware, also can instruct relevant hardware to realize by program, and when realizing by the relevant hardware of programmed instruction, described program can be stored in the computer read/write memory medium, for example is stored in ROM (read-only memory) (being called for short ROM), random access memory (being called for short RAM), disk, the CD etc.
Above embodiment is only in order to illustrating technical scheme of the present invention, but not the present invention is made restrictive sense.Although the present invention is had been described in detail with reference to above-mentioned preferred embodiment, those of ordinary skill in the art is to be understood that: it still can make amendment or be equal to replacement technical scheme of the present invention, and this modification or be equal to the spirit and scope that replacement does not break away from technical solution of the present invention.