CN105183654A - Android automatic testing screen recording mechanism and system disengaged from PC - Google Patents

Android automatic testing screen recording mechanism and system disengaged from PC Download PDF

Info

Publication number
CN105183654A
CN105183654A CN201510597946.5A CN201510597946A CN105183654A CN 105183654 A CN105183654 A CN 105183654A CN 201510597946 A CN201510597946 A CN 201510597946A CN 105183654 A CN105183654 A CN 105183654A
Authority
CN
China
Prior art keywords
record screen
automatic test
cache file
record
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
Application number
CN201510597946.5A
Other languages
Chinese (zh)
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.)
Xiamen Meitu Mobile Technology Co Ltd
Original Assignee
Xiamen Meitu Mobile 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 Xiamen Meitu Mobile Technology Co Ltd filed Critical Xiamen Meitu Mobile Technology Co Ltd
Priority to CN201510597946.5A priority Critical patent/CN105183654A/en
Publication of CN105183654A publication Critical patent/CN105183654A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an Android automatic testing screen recording mechanism and system disengaged from a PC. An automatic testing script is started, a screen recording program is operated to monitor the operating condition of the automatic testing script, the monitoring result of the screen recording program is recorded, a screen recording cache file is generated, whether operation of the automatic testing script is abnormal or not is judged, and if not, screen recording is finished, and the screen recording cache file is emptied; if yes, the screen recording cache file related to a time point when the abnormality occurs is saved. Only the screen recording cache file beside the time point when the abnormality occurs is saved, other unnecessary information is filtered out, storage space is saved, the analysis workload of abnormality causes in the later period is reduced, testing analysis work is more pertinent, and testing abnormality processing efficiency is higher.

Description

A kind of Android automatic test record screen mechanism and record screen system departing from PC
Technical field
The present invention relates to automatization testing technique field, particularly the system of mechanism and application the method thereof is shielded in a kind of Android automatic test record departing from PC.
Background technology
Automatic test is by automated test tool or other means, tests automatically according to the scheduled plan of Test Engineer, thus reaches the object improving software quality.The most frequently used means of Test Engineer, exactly by writing automatic test script, being gone to perform by the use-case made by being allowed tested program, being found the defect of tested program by contrast test result and expected results.When there is expected results and test result is inconsistent, retain abnormal on-the-spot related data particularly important, data are preserved more complete, then be more beneficial to defect or leak that research staff repairs tested program.
Existing automatic test mechanism, there is not a set of perfect monitoring mechanism for script ruuning situation, once make a mistake in the operational process of script, just preserve wrong on-the-spot related data by modes such as sectional drawing, preservation daily records, this mode has two larger drawbacks, one is that data are preserved imperfect, current mechanism is only the data of preserving wrong time of origin point current time, but the failed likely a series of operation of the operation of a script causes, and only preserves the data of wrong time point and cannot absolutely prove problem; Two is that data are directly perceived not, is unfavorable for that mistake inducement is inferred.Tester goes misjudgment inducement only according to several sectional drawings or correlation log, needs by rule of thumb and reasoning, brings certain difficulty to the location of bugs or leak and deduction.If can monitor the operation of the time adjacent segments of wrong time of origin point, the mode of ruuning situation by record screen is preserved, greatly will facilitate location, although the instrument having some PC to hold at present can carry out record screen to mobile phone, often need to depart from PC at race automatic test script and run.Based on above background, the present invention proposes a kind of Android automatic test record screen mechanism departing from PC.
Summary of the invention
The present invention, for solving the problem, provides a kind of the Android automatic test record screen mechanism and the record screen system that depart from PC, reaches object that is effective, complete, that preserve wrong on-the-spot related data intuitively, solve the drawback existing for current mechanism.
For achieving the above object, the technical solution used in the present invention is:
A kind of Android automatic test record screen mechanism departing from PC, it comprises the following steps:
10. start automatic test script, and the ruuning situation of operation record screen program to described automatic test script is monitored;
The snoop results of described record screen program is recorded by 20., and generates record screen cache file;
Whether the operation of the automatic test script described in 30. judgements there is exception, if not, then terminates to record and shields and empty described record screen cache file; If so, then record screen cache file abnormal time point occurring relevant is preserved.
Preferably, described step 10 comprises further:
11. run record screen program, open thread uninterruptedly record screen by Android application program to be tested;
12. by the automatic test script described in Android application program launching to be tested;
Record screen program described in 13. is monitored according to the ruuning situation of script ruuning situation feedback mechanism to described automatic test script.
Preferably, after generating record screen cache file in described step 20, be adopt first in first out, last-in, last-out the buffering of stack architecture by the record screen cache file that generates stored in buffer area, each record screen cache file has default fixing duration.
Preferably, in described step 30, judge whether the operation of described automatic test script exception occurs, refer to when described automatic test script is out of service, judge whether this automatic test script exception occurs by script ruuning situation feedback mechanism:
If 31. described automatic test scripts are normally out of service, then terminate to record shield and empty described record and shield cache file;
If 32. described automatic test scripts are the operation that abends, then record screen cache file abnormal time point occurring relevant is preserved;
33. record screen cache files relevant according to described generation abnormal time point carry out abnormal inducement judgement and analysis.
In addition, the present invention also provides a kind of Android automatic test record screen system departing from PC, and it comprises:
Script runs modules A, for starting automatic test script;
Record panel module B, monitors for running the ruuning situation of record screen program to described automatic test script, and the snoop results of described record screen program is recorded;
Cache module C, for generating record screen cache file by the snoop results of recorded record screen program;
Analysis module D, for judging whether the operation of described automatic test script exception occurs, if not, then terminates to record and shields and empty described record screen cache file; If so, then record screen cache file abnormal time point occurring relevant is preserved;
Memory module E, for preserving the relevant record screen cache file of described generation abnormal time point.
The invention has the beneficial effects as follows:
A kind of Android automatic test record screen mechanism and record screen system departing from PC of the present invention, it is by starting automatic test script, and the ruuning situation of operation record screen program to described automatic test script is monitored, the snoop results of described record screen program is recorded, and generate record screen cache file, then judge whether the operation of described automatic test script exception occurs, if not, then terminate to record and shield and empty described record screen cache file; If so, then record screen cache file abnormal time point occurring relevant is preserved; Thus only preserve the record screen cache file occurred near abnormal time point, filter other unnecessary information, not only saved storage space, and save the analytical work amount of follow-up abnormal inducement, make test analysis work more targeted, the efficiency of test abnormality processing is higher.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms a part of the present invention, and schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is a kind of general flow chart departing from the Android automatic test record screen mechanism of PC of the present invention;
Fig. 2 is a kind of structural representation departing from the Android automatic test record screen system of PC of the present invention.
Embodiment
In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearly, understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
As shown in Figure 1, a kind of Android automatic test record screen mechanism departing from PC of the present invention, it comprises the following steps:
10. start automatic test script, and the ruuning situation of operation record screen program to described automatic test script is monitored;
The snoop results of described record screen program is recorded by 20., and generates record screen cache file;
Whether the operation of the automatic test script described in 30. judgements there is exception, if not, then terminates to record and shields and empty described record screen cache file; If so, then record screen cache file abnormal time point occurring relevant is preserved.
Described automatic test script carries out Scripting Edition according to specified format, or imported the test script edited according to specified format by testing tool outward, and set the time interval etc. performed between the number of times of test case and execution thereof, the time interval of execution and two test cases; Also can set the parameter of carrying out system resource monitoring in test process simultaneously.
Described record screen program can be a kind ofly use common programs language, and such as c language development is out and independent of the executable file of application program to be tested; In the present embodiment, described record screen program is an independently Android application program, and when carrying out the method for testing of Android terminal application program, user carries out startup record screen by the functional module double-clicking described record screen program.
Described step 10 comprises further:
11. run record screen program, open thread uninterruptedly record screen by Android application program to be tested;
12. by the automatic test script described in Android application program launching to be tested;
Record screen program described in 13. is monitored according to the ruuning situation of script ruuning situation feedback mechanism to described automatic test script.
After generating record screen cache file in described step 20, be adopt first in first out, last-in, last-out stack architecture buffering by generate record screen cache file stored in buffer area, each record screen cache file has default fixing duration, such as, the duration of each record screen cache file is 1 minute.
Judge in described step 30 whether the operation of described automatic test script exception occurs, refer to when described automatic test script is out of service, judge whether this automatic test script exception occurs by script ruuning situation feedback mechanism:
If 31. described automatic test scripts are normally out of service, then terminate to record shield and empty described record and shield cache file;
If 32. described automatic test scripts are the operation that abends, then record screen cache file abnormal time point occurring relevant is preserved, such as, abnormal time point occurs described automatic test script is the K moment, then only preserve K moment adjacent several records screen cache files, and empty remaining and shield cache file with record that generation abnormal time point has nothing to do;
33. record screen cache files relevant according to described generation abnormal time point carry out abnormal inducement judgement and analysis.
As shown in Figure 2, the present invention also provides a kind of Android automatic test record screen system departing from PC, and it comprises:
Script runs module, for starting automatic test script;
Record panel module, monitors for running the ruuning situation of record screen program to described automatic test script, and the snoop results of described record screen program is recorded;
Cache module, for generating record screen cache file by the snoop results of recorded record screen program;
Analysis module, for judging whether the operation of described automatic test script exception occurs, if not, then terminates to record and shields and empty described record screen cache file; If so, then record screen cache file abnormal time point occurring relevant is preserved;
Memory module, for preserving the relevant record screen cache file of described generation abnormal time point.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.For record screen system embodiment, because itself and record shield mechanism embodiment basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.And, in this article, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.In addition, one of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
Above-mentioned explanation illustrate and describes the preferred embodiments of the present invention, be to be understood that the present invention is not limited to the form disclosed by this paper, should not regard the eliminating to other embodiments as, and can be used for other combinations various, amendment and environment, and can in invention contemplated scope herein, changed by the technology of above-mentioned instruction or association area or knowledge.And the change that those skilled in the art carry out and change do not depart from the spirit and scope of the present invention, then all should in the protection domain of claims of the present invention.

Claims (5)

1. one kind departs from the Android automatic test record screen mechanism of PC, it is characterized in that, comprises the following steps:
10. start automatic test script, and the ruuning situation of operation record screen program to described automatic test script is monitored;
The snoop results of described record screen program is recorded by 20., and generates record screen cache file;
Whether the operation of the automatic test script described in 30. judgements there is exception, if not, then terminates to record and shields and empty described record screen cache file; If so, then record screen cache file abnormal time point occurring relevant is preserved.
2. a kind of Android automatic test record screen mechanism departing from PC according to claim 1, is characterized in that: described step 10 comprises further:
11. run record screen program, open thread uninterruptedly record screen by Android application program to be tested;
12. by the automatic test script described in Android application program launching to be tested;
Record screen program described in 13. is monitored according to the ruuning situation of script ruuning situation feedback mechanism to described automatic test script.
3. a kind of Android automatic test record screen mechanism departing from PC according to claim 1 and 2, it is characterized in that: after generating record screen cache file in described step 20, be adopt first in first out, last-in, last-out the buffering of stack architecture by the record screen cache file that generates stored in buffer area, each record screen cache file has default fixing duration.
4. a kind of Android automatic test record screen mechanism departing from PC according to claim 1 and 2, it is characterized in that: in described step 30, judge whether the operation of described automatic test script exception occurs, refer to when described automatic test script is out of service, judge whether this automatic test script exception occurs by script ruuning situation feedback mechanism:
If 31. described automatic test scripts are normally out of service, then terminate to record shield and empty described record and shield cache file;
If 32. described automatic test scripts are the operation that abends, then record screen cache file abnormal time point occurring relevant is preserved;
33. record screen cache files relevant according to described generation abnormal time point carry out abnormal inducement judgement and analysis.
5. depart from an Android automatic test record screen system of PC, it is characterized in that, it comprises:
Script runs module, for starting automatic test script;
Record panel module, monitors for running the ruuning situation of record screen program to described automatic test script, and the snoop results of described record screen program is recorded;
Cache module, for generating record screen cache file by the snoop results of recorded record screen program;
Analysis module, for judging whether the operation of described automatic test script exception occurs, if not, then terminates to record and shields and empty described record screen cache file; If so, then record screen cache file abnormal time point occurring relevant is preserved;
Memory module, for preserving the relevant record screen cache file of described generation abnormal time point.
CN201510597946.5A 2015-09-18 2015-09-18 Android automatic testing screen recording mechanism and system disengaged from PC Pending CN105183654A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510597946.5A CN105183654A (en) 2015-09-18 2015-09-18 Android automatic testing screen recording mechanism and system disengaged from PC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510597946.5A CN105183654A (en) 2015-09-18 2015-09-18 Android automatic testing screen recording mechanism and system disengaged from PC

Publications (1)

Publication Number Publication Date
CN105183654A true CN105183654A (en) 2015-12-23

Family

ID=54905746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510597946.5A Pending CN105183654A (en) 2015-09-18 2015-09-18 Android automatic testing screen recording mechanism and system disengaged from PC

Country Status (1)

Country Link
CN (1) CN105183654A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126424A (en) * 2016-06-29 2016-11-16 厦门美图移动科技有限公司 A kind of visual automated testing method of script, device and mobile terminal
CN106603787A (en) * 2016-11-29 2017-04-26 努比亚技术有限公司 Terminal testing method, device and terminal
CN106789209A (en) * 2016-12-09 2017-05-31 网易(杭州)网络有限公司 Abnormality eliminating method and device
CN106776341A (en) * 2016-12-30 2017-05-31 上海亿账通互联网科技有限公司 The test errors localization method and device of client-side program
CN107197088A (en) * 2017-05-16 2017-09-22 网易(杭州)网络有限公司 Screenshot method and device based on Android mobile device
CN107577594A (en) * 2017-07-12 2018-01-12 捷开通讯(深圳)有限公司 The abnormal method of record test, intelligent terminal and the device with store function
CN107704379A (en) * 2017-06-23 2018-02-16 上海斐讯数据通信技术有限公司 A kind of video recording system and application method suitable for automatic test course
CN107832205A (en) * 2017-10-16 2018-03-23 深圳天珑无线科技有限公司 Terminal and its record screen method of running, external equipment, storage device
CN108090173A (en) * 2017-12-14 2018-05-29 广东欧珀移动通信有限公司 Delet method, device, terminal and the storage medium of record screen file
CN108108294A (en) * 2017-12-29 2018-06-01 北京奇虎科技有限公司 A kind of method and system that customization operation data are obtained according to fiducial time
CN109614278A (en) * 2018-10-16 2019-04-12 深圳壹账通智能科技有限公司 The method, apparatus and terminal of positioning problems in automatic test course
CN110929249A (en) * 2019-11-22 2020-03-27 北京博睿宏远数据科技股份有限公司 Screen recording method, device, equipment and storage medium for automatic test
CN111367753A (en) * 2018-12-26 2020-07-03 中兴通讯股份有限公司 Cloud desktop screen recording method and device based on network communication engine ICE architecture
CN112511497A (en) * 2020-11-06 2021-03-16 中国人寿保险股份有限公司 Method and device for recording simulated attack scene and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102841845A (en) * 2012-07-30 2012-12-26 广东欧珀移动通信有限公司 Automatic testing method of Android device software
CN104317709A (en) * 2014-10-21 2015-01-28 工业和信息化部电子第五研究所 Method and system for testing performance of software
US20150135169A1 (en) * 2013-11-12 2015-05-14 Institute For Information Industry Testing device and testing method thereof
CN104866420A (en) * 2015-04-27 2015-08-26 深圳市祈锦通信技术有限公司 Precisely recorded mobile phone software testing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102841845A (en) * 2012-07-30 2012-12-26 广东欧珀移动通信有限公司 Automatic testing method of Android device software
US20150135169A1 (en) * 2013-11-12 2015-05-14 Institute For Information Industry Testing device and testing method thereof
CN104317709A (en) * 2014-10-21 2015-01-28 工业和信息化部电子第五研究所 Method and system for testing performance of software
CN104866420A (en) * 2015-04-27 2015-08-26 深圳市祈锦通信技术有限公司 Precisely recorded mobile phone software testing method

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126424A (en) * 2016-06-29 2016-11-16 厦门美图移动科技有限公司 A kind of visual automated testing method of script, device and mobile terminal
CN106603787A (en) * 2016-11-29 2017-04-26 努比亚技术有限公司 Terminal testing method, device and terminal
CN106789209A (en) * 2016-12-09 2017-05-31 网易(杭州)网络有限公司 Abnormality eliminating method and device
WO2018120720A1 (en) * 2016-12-30 2018-07-05 上海壹账通金融科技有限公司 Method for locating test error of client program, electronic device, and storage medium
CN106776341A (en) * 2016-12-30 2017-05-31 上海亿账通互联网科技有限公司 The test errors localization method and device of client-side program
CN107197088A (en) * 2017-05-16 2017-09-22 网易(杭州)网络有限公司 Screenshot method and device based on Android mobile device
CN107197088B (en) * 2017-05-16 2020-09-25 网易(杭州)网络有限公司 Screenshot method and device based on android mobile device
CN107704379A (en) * 2017-06-23 2018-02-16 上海斐讯数据通信技术有限公司 A kind of video recording system and application method suitable for automatic test course
CN107577594A (en) * 2017-07-12 2018-01-12 捷开通讯(深圳)有限公司 The abnormal method of record test, intelligent terminal and the device with store function
CN107832205A (en) * 2017-10-16 2018-03-23 深圳天珑无线科技有限公司 Terminal and its record screen method of running, external equipment, storage device
CN108090173A (en) * 2017-12-14 2018-05-29 广东欧珀移动通信有限公司 Delet method, device, terminal and the storage medium of record screen file
CN108108294A (en) * 2017-12-29 2018-06-01 北京奇虎科技有限公司 A kind of method and system that customization operation data are obtained according to fiducial time
CN108108294B (en) * 2017-12-29 2021-08-24 北京奇虎科技有限公司 Method and system for acquiring customized operation data according to reference time
CN109614278A (en) * 2018-10-16 2019-04-12 深圳壹账通智能科技有限公司 The method, apparatus and terminal of positioning problems in automatic test course
CN111367753A (en) * 2018-12-26 2020-07-03 中兴通讯股份有限公司 Cloud desktop screen recording method and device based on network communication engine ICE architecture
CN111367753B (en) * 2018-12-26 2023-03-14 中兴通讯股份有限公司 Cloud desktop screen recording method and device based on network communication engine ICE architecture
CN110929249A (en) * 2019-11-22 2020-03-27 北京博睿宏远数据科技股份有限公司 Screen recording method, device, equipment and storage medium for automatic test
CN110929249B (en) * 2019-11-22 2023-03-24 北京博睿宏远数据科技股份有限公司 Screen recording method, device, equipment and storage medium for automatic test
CN112511497A (en) * 2020-11-06 2021-03-16 中国人寿保险股份有限公司 Method and device for recording simulated attack scene and electronic equipment

Similar Documents

Publication Publication Date Title
CN105183654A (en) Android automatic testing screen recording mechanism and system disengaged from PC
US9396094B2 (en) Software test automation systems and methods
US8578340B1 (en) Recording and replaying computer program execution with recorded execution event breakpoints
Cotroneo et al. Fault triggers in open-source software: An experience report
US9032371B2 (en) Method and apparatus for automatic diagnosis of software failures
US7856575B2 (en) Collaborative troubleshooting computer systems using fault tree analysis
US8839203B2 (en) Code coverage-based taint perimeter detection
US20140109063A1 (en) Capturing test data associated with error conditions in software item testing
US8990621B2 (en) Fast detection and diagnosis of system outages
US20090204946A1 (en) Intelligent software code updater
WO2018103216A1 (en) Method and apparatus for detecting memory leakages
WO2014052655A2 (en) Policy evaluation based upon dynamic observation, static analysis and code change history
US10387294B2 (en) Altering a test
JP2015011372A (en) Debug support system, method, program, and recording medium
US7478283B2 (en) Provisional application management with automated acceptance tests and decision criteria
CN103425576A (en) Information feedback method and terminal
CN115599645B (en) Method and device for testing stability of linux driving module
CN111435327B (en) Log record processing method, device and system
US8949421B2 (en) Techniques for discovering database connectivity leaks
CN115757138A (en) Method and device for determining script abnormal reason, storage medium and electronic equipment
US9165007B2 (en) Log message optimization to ignore or identify redundant log messages
US9940068B2 (en) Device and method for determining memory leaks
Li et al. eDelta: Pinpointing energy deviations in smartphone apps via comparative trace analysis
Mendes et al. Log severity levels matter: A multivocal mapping
CN108108304A (en) A kind of detection method and device of test coverage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20151223