CN105227949A - A kind of Android Set Top Box automated testing method - Google Patents
A kind of Android Set Top Box automated testing method Download PDFInfo
- Publication number
- CN105227949A CN105227949A CN201510591884.7A CN201510591884A CN105227949A CN 105227949 A CN105227949 A CN 105227949A CN 201510591884 A CN201510591884 A CN 201510591884A CN 105227949 A CN105227949 A CN 105227949A
- Authority
- CN
- China
- Prior art keywords
- top box
- set top
- computer
- picture
- script
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
The invention discloses a kind of Android Set Top Box automated testing method, comprise the following steps: record script: select the Set Top Box being applicable to recording script to be connected with computer, computer sends instruction by Set Top Box sectional drawing, then picture file is back to computer, picture is resolved to condition code by computer, and preserves into test script by the position coordinates of picture and condition code; Perform script: computer connects Set Top Box to be measured, computer sends instruction by Set Top Box sectional drawing to be measured, then picture file is back to computer, computer reads the position coordinates of picture and picture is resolved to condition code, carry out mating with the condition code of correspondence position coordinate in test script and contrast, if the match is successful, then perform the test of next step script; If it fails to match, then crawl log preserving.Android Set Top Box automated testing method of the present invention replaces manual testing with automatic test, and testing efficiency is higher, and test mass is better.
Description
Technical field
The invention belongs to set top box testing technical field, be specifically related to a kind of Android Set Top Box automated testing method.
Background technology
Compared with traditional media terminal apparatus, current lift-launch gets more and more with the media terminal apparatus of Android android system foundational development, such as Android Android Set Top Box, increasing software is wherein installed to enrich the function of Set Top Box, but along with increasing of software, in Set Top Box production process, then need to carry out last debugging to Set Top Box, debug successfully, production could be calculated and complete.But about the adjustment method of Android Android Set Top Box, still artificially drive the mode of test for master at present, in test process, need manually to test one by one each software function, perform debugging to need to drop into a large amount of manpowers and time, and test result is somewhat dependent upon the level height of tester.Therefore, it is low to there is debugging efficiency in manual debugging, problem of low quality.
Summary of the invention
The object of the invention is to: in existing android set top box in debug process Problems existing, a kind of Android Set Top Box automated testing method is provided, adopts automatic test, save manpower, time or hardware resource, improve testing efficiency, heighten test mass.
To achieve these goals, the technical solution used in the present invention is:
A kind of Android Set Top Box automated testing method, comprises the following steps:
Record script: select the Set Top Box being applicable to recording script to be connected with computer, computer sends instruction by Set Top Box sectional drawing, then picture file is back to computer, picture is resolved to condition code by computer, and preserves into test script by the position coordinates of picture and condition code;
Perform script: computer connects Set Top Box to be measured, computer sends instruction by Set Top Box sectional drawing to be measured, then picture file is back to computer, computer reads the position coordinates of picture and picture is resolved to condition code, carry out mating with the condition code of correspondence position coordinate in test script and contrast, if the match is successful, then perform the test of next step script; If it fails to match, then crawl log preserving.
Preferably, the method that picture is resolved to condition code by computer is: reduce dimension of picture, then by picture gray processing, calculating pixel mean value, the pixel value being greater than mean value is set to 1, and the pixel value being less than mean value is set to 0, and saves as condition code with setting order.
Preferably, when carrying out the contrast of condition code coupling, condition code Similarity value according to setting carries out matching judgment, and higher than Similarity value, then the match is successful, carry out next step script test, if lower than Similarity value, then it fails to match, stops performing script, and send logcat order acquisition log information, and sectional drawing is saved in computer this locality.
Preferably, when recording script and performing script, the instruction that computer sends comprises key assignments order, sectional drawing order and transmission picture command, and computer sends key assignments order, and Set Top Box performs corresponding button; Computer sends sectional drawing order, and Set Top Box carries out sectional drawing to current picture; Computer sends transmission picture command, and the picture file of sectional drawing is transferred to computer by Set Top Box.
Preferably, when recording script and performing script, adb network or USB between computer with Set Top Box, is adopted to be connected.
Owing to have employed technique scheme, the invention has the beneficial effects as follows:
A kind of Android Set Top Box automated testing method of the present invention, utilize picture principle of contrast, " fingerprint " character string is generated to every pictures, then the fingerprint of more different picture, reach the requirement of Android system application stability test by contrast expection picture analogies degree, test process runs on computers, the operation of Set Top Box can not be affected because of overweight computing, the response of simulation key assignments simulates the operation that client uses a teleswitch, method of testing of the present invention saves manpower, time, hardware resource, improves testing efficiency.
Accompanying drawing explanation
Fig. 1 is the recording script flow chart of method of testing of the present invention.
Fig. 2 is the execution script flow chart of method of testing of the present invention.
Embodiment
A kind of Android Set Top Box automated testing method of the present invention, concrete steps are as follows,
With reference to Fig. 1, record script: select the Set Top Box being applicable to recording script to be connected with computer, the so-called Set Top Box being applicable to recording script is the qualified Set Top Box of debugging, and this Set Top Box can be debugged by manual mode etc.Computer is the computer based on linux system, adb is installed in computer and debugs bridge, computer is connected with Set Top Box by adb network or USB, enter shell pattern, computer debugs bridge by using adb, with sending key assignments order " adbshellinputtext " mode manipulator top box; With sending sectional drawing order " adbshellscreencap " mode intercept the current picture of Set Top Box; With transmission command " adbpull " mode by the sectional drawing document backup of Set Top Box to computer, the picture of this position is also resolved to condition code by the self-defined designated pictures position of computer, and preserves into test script by the Picture Coordinate of assigned address and condition code; Initial cursor position is moved the cursor at the end of recording.
With reference to Fig. 2, perform script: computer connects Set Top Box to be measured, computer is connected with Set Top Box by adb network or USB, enters shell pattern, with the order of transmission key assignments " adbshellinputtext " mode manipulator top box; With sending sectional drawing order " adbshellscreencap " mode intercept the current picture of Set Top Box; With transmission command " adbpull " mode by the sectional drawing document backup of Set Top Box to computer, computer reads the position coordinates of picture and picture is resolved to condition code, carry out mating with the condition code of correspondence position coordinate in test script and contrast, if the match is successful, then perform the test of next step script; If it fails to match, then crawl log preserving.When carrying out the contrast of condition code coupling, the condition code Similarity value according to setting carries out matching judgment, and higher than Similarity value, then the match is successful, carries out next step script test, until stipulated time cut-off; If lower than Similarity value, then it fails to match, stops performing script, and send logcat order acquisition log information, and sectional drawing is saved in computer this locality.Wherein, the acquaintance angle value in matching process can set according to the demand of actual case.
The method that picture is resolved to condition code by computer is: reduce dimension of picture, and then by picture gray processing, calculating pixel mean value, the pixel value being greater than mean value is set to 1, and the pixel value being less than mean value is set to 0, and saves as condition code with setting order.
Claims (5)
1. an Android Set Top Box automated testing method, is characterized in that, comprises the following steps:
Record script: select the Set Top Box being applicable to recording script to be connected with computer, computer sends instruction by Set Top Box sectional drawing, then picture file is back to computer, picture is resolved to condition code by computer, and preserves into test script by the position coordinates of picture and condition code;
Perform script: computer connects Set Top Box to be measured, computer sends instruction by Set Top Box sectional drawing to be measured, then picture file is back to computer, computer reads the position coordinates of picture and picture is resolved to condition code, carry out mating with the condition code of correspondence position coordinate in test script and contrast, if the match is successful, then perform the test of next step script; If it fails to match, then crawl log preserving.
2. Android Set Top Box automated testing method according to claim 1, it is characterized in that, the method that picture is resolved to condition code by computer is: reduce dimension of picture, then by picture gray processing, calculating pixel mean value, the pixel value being greater than mean value is set to 1, and the pixel value being less than mean value is set to 0, and saves as condition code with setting order.
3. Android Set Top Box automated testing method according to claim 1, it is characterized in that, when carrying out the contrast of condition code coupling, the condition code Similarity value according to setting carries out matching judgment, higher than Similarity value, then the match is successful, carries out next step script test, if lower than Similarity value, then it fails to match, stop performing script, and send logcat order acquisition log information, and sectional drawing is saved in computer this locality.
4. Android Set Top Box automated testing method according to claim 1, it is characterized in that, when recording script and performing script, the instruction that computer sends comprises key assignments order, sectional drawing order and transmission picture command, computer sends key assignments order, and Set Top Box performs corresponding button; Computer sends sectional drawing order, and Set Top Box carries out sectional drawing to current picture; Computer sends transmission picture command, and the picture file of sectional drawing is transferred to computer by Set Top Box.
5. Android Set Top Box automated testing method according to claim 1, is characterized in that, when recording script and performing script, adopts adb network or USB to be connected between computer with Set Top Box.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510591884.7A CN105227949A (en) | 2015-09-16 | 2015-09-16 | A kind of Android Set Top Box automated testing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510591884.7A CN105227949A (en) | 2015-09-16 | 2015-09-16 | A kind of Android Set Top Box automated testing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105227949A true CN105227949A (en) | 2016-01-06 |
Family
ID=54996592
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510591884.7A Pending CN105227949A (en) | 2015-09-16 | 2015-09-16 | A kind of Android Set Top Box automated testing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105227949A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106993222A (en) * | 2017-03-27 | 2017-07-28 | 山东浪潮商用系统有限公司 | The method and apparatus that visual automation tools are write based on android set top box |
CN108579094A (en) * | 2018-05-11 | 2018-09-28 | 深圳市腾讯网络信息技术有限公司 | A kind of user interface detection method and relevant apparatus, system and storage medium |
CN109358939A (en) * | 2018-10-08 | 2019-02-19 | 北京云测信息技术有限公司 | A kind of mobile APP carousel figure automatically selects click method |
CN109618148A (en) * | 2018-11-13 | 2019-04-12 | 中信国安广视网络有限公司 | Based on set-top box large-size screen monitors automated testing method |
CN110377476A (en) * | 2019-07-05 | 2019-10-25 | 无锡睿勤科技有限公司 | Terminal test method, terminal and readable storage medium storing program for executing |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102378035A (en) * | 2010-08-06 | 2012-03-14 | 周炜 | Set top box test method and system thereof |
CN202385232U (en) * | 2011-12-27 | 2012-08-15 | 上海全景数字技术有限公司 | Automated testing device of set top box |
CN104519351A (en) * | 2014-12-17 | 2015-04-15 | 天津大学 | Automatic test method for set top boxes |
-
2015
- 2015-09-16 CN CN201510591884.7A patent/CN105227949A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102378035A (en) * | 2010-08-06 | 2012-03-14 | 周炜 | Set top box test method and system thereof |
CN202385232U (en) * | 2011-12-27 | 2012-08-15 | 上海全景数字技术有限公司 | Automated testing device of set top box |
CN104519351A (en) * | 2014-12-17 | 2015-04-15 | 天津大学 | Automatic test method for set top boxes |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106993222A (en) * | 2017-03-27 | 2017-07-28 | 山东浪潮商用系统有限公司 | The method and apparatus that visual automation tools are write based on android set top box |
CN108579094A (en) * | 2018-05-11 | 2018-09-28 | 深圳市腾讯网络信息技术有限公司 | A kind of user interface detection method and relevant apparatus, system and storage medium |
CN108579094B (en) * | 2018-05-11 | 2023-04-18 | 深圳市腾讯网络信息技术有限公司 | User interface detection method, related device, system and storage medium |
CN109358939A (en) * | 2018-10-08 | 2019-02-19 | 北京云测信息技术有限公司 | A kind of mobile APP carousel figure automatically selects click method |
CN109618148A (en) * | 2018-11-13 | 2019-04-12 | 中信国安广视网络有限公司 | Based on set-top box large-size screen monitors automated testing method |
CN110377476A (en) * | 2019-07-05 | 2019-10-25 | 无锡睿勤科技有限公司 | Terminal test method, terminal and readable storage medium storing program for executing |
CN110377476B (en) * | 2019-07-05 | 2023-07-28 | 无锡睿勤科技有限公司 | Terminal testing method, terminal and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105227949A (en) | A kind of Android Set Top Box automated testing method | |
WO2018010552A1 (en) | Test method and device | |
US20150378876A1 (en) | Visual graphical user interface verification | |
CN103823758A (en) | Browser testing method and device | |
US10162742B2 (en) | System and method for end to end performance response time measurement based on graphic recognition | |
CN107659455B (en) | Method, storage medium, device and system for Mock data of iOS (internet operating system) end | |
US20170322637A1 (en) | Mouse action capture and replay system and method, recording medium, and program product | |
TWI678614B (en) | Test system | |
CN109543417B (en) | Vulnerability mining method and device based on Qemu platform | |
CN110888812B (en) | Test system and test method for response time of terminal page | |
CN103268289A (en) | Method and system for transcribing and applying test script on mobile terminal | |
CN104699617A (en) | Automated testing method for games | |
CN110990285B (en) | UI (user interface) automatic testing method and device | |
CN108572892B (en) | PowerPC multi-core processor-based offline test method and device | |
CN109840212B (en) | Function test method, device and equipment of application program and readable storage medium | |
CN105320510B (en) | A kind of method and device of automatic tracing data relationship | |
CN112597662A (en) | Method and system for checking correctness and mistakes of building model | |
CN111459831B (en) | Test system and test method | |
CN103971052A (en) | Magnetic disk boot virus identification method and device | |
CN115373929A (en) | Test method, device, equipment, readable storage medium and program product | |
CN113836825A (en) | Application method of key standard and verification chip of neural network processor | |
CN113722203A (en) | Program testing method and device, electronic device and computer readable storage medium | |
Wang et al. | Research on automation testing technology based on image recognition | |
CN111008140A (en) | Cross-platform UI (user interface) automatic testing method and device | |
US10514779B2 (en) | System and method for measuring association between screen resolution and mouse movement speed, recording medium, and computer program product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160106 |
|
RJ01 | Rejection of invention patent application after publication |