Specific embodiment
It should be appreciated that specific embodiment described herein is not intended to limit the present invention only to explain the present invention.
First embodiment:
In order to solve in prior art when testing to tested terminal, can be because test operating procedure be numerousIt is miscellaneous, and cause tester after tested terminal occurs exception, it is difficult to accurate reproduction causes tested terminal that exception occursThe problem of test operation, the present embodiment provide a kind of terminal test method, and the method can be performed by terminal test device, pleaseWith reference to Fig. 1:
S102, during testing to tested terminal, terminal test device is to tested terminal display interfaceDisplay image cached.
As tested terminal is when tested personnel carry out operations, its display interface can be with operatorOperation and change, for example, when operator open video playback interface, the display interface of tested terminal willThe picture of current played video correspondence frame can be presented;Brightness of the tester to tested terminal plays video is adjustedWhen, the brightness of tested terminal not only display picture can be improved, and can also in the display picture that may be in course of adjustmentShow the process that adjustment control changes;When tester browses webpage by tested terminal, tested terminalDisplay interface will show corresponding webpage;If tester controls tested terminal from a page jump to other oneThe individual page, then the page of tested terminal the page after redirecting can be not only presented, the display in jump procedure may also can be presentedPicture.As above example, under the operation of tester, its display picture can also be presented other changes to tested terminalChange process.Although it is understood that the output of tested terminal is to the shape that the picture of its display screen is with image on a display screenWhat formula was present, but these images are all exist with digital signal in tested terminal inner, and terminal test device is to testedThese digital signals of examination terminal are stored.The picture of storage is played back with certain speed after storage and can just be formedVideo.
Due to the special physiological structure of human eye, human eye in observing scene, the incoming cerebral nerve of optical signal, need throughOne of short duration time, after the effect of light terminates, visual image does not disappear immediately, and the vision of this residual claims " after image ", depending onThis phenomenon felt then is referred to as " persistence of vision ".If in fact, when the frame per second of seen picture is higher than 16, will be recognizedFor be it is coherent, therefore, although electronic equipment play video when, frame per second is to be not quite similar, nearly all electronic equipmentFrame per second when video is played is both greater than 20.For example, the frame per second of radio and television is 25 frames/s, and the frame per second of common mobile terminal30 frames/s is mostly, or even the frame per second of part mobile terminal can reach 60 frames/s.Due to the effect of human vision effect, the mankindThe video that electronic equipment is played can just be seen.Also the frame per second just because of tested terminal may recognize non-coherent much larger than the mankindThe ability of picture, therefore, in the present embodiment, terminal test device, can be without when the display picture of tested terminal is cachedStore all pictures that tested terminal showed, but the picture shown from tested terminal according to certain sample frequencyIt is middle to extract a part of picture and stored.For example, it is when tested terminal shows that the frame per second of video is 60 frames/s that is, testedWhen will show 60 image frames in the terminal time per second, but terminal test device can with this 60 images at interval of oneOpen picture selection one to be cached, even so, the image chosen out still there are 30, by this 30 pictures in the same secondInterior frame per second when playing out according to original sequencing still up to 30 frames/s, this is still able to shape for the mankindInto coherent video.But after screening, terminal test device needs the picture of caching greatly reduce such that it is able to saveThe memory space of storage display picture, reduces the requirement to terminal test device memory space.
Beyond all doubt, terminal test device is when tested terminal display is cached, it is also possible to without sieveSelect and be directed to whole display pictures and stored.Or when selecting extraction tested terminal display, can notAccording to 1:The ratio of 2 (extracting one in i.e. two to be stored) is screened, it is also possible to according to 2:3 or 4:5 equal proportions are enteredOK, as long as 16 can be more than for the picture that each second extracts.
In the middle of above-mentioned example, when tested terminal is during being test for, terminal test device can cache quilt automaticallyThe display image of test terminal, this can detect the pattern residing for tested terminal, work as terminal mainly due to terminal test deviceWhen test device detects tested terminal under tested pattern, terminal test device can automatically turn on tested terminalImage buffer storage is enabled, to cache display image of the tested terminal in test process shown by display interface.
But as terminal test device is when the display picture of tested terminal is cached, it will make tested terminal systemInternal memory, CPU, GPU and power consumption are dramatically increased, and sometimes tester some simple tests are carried out to tested terminal,Abnormal scene recovery video need not be generated the mistake for causing tested terminal that abnormal test operation occurs just can be repeated with oneselfJourney is how, therefore, in such a case, it is possible to enable without the image buffer storage for opening tested terminal.So, in the present embodimentAnother kind of example in the middle of, it is to issue cache instruction according to user by terminal test device that the image buffer storage of tested terminal is enabledOpen.That is, if carrying out caching to the display image of tested terminal can be determined by tester, relative to straightFor taking out the scheme that tested terminal image caching is enabled, this image buffer storage controlled by tester enables switchProcess may more meet the wish of tester, give tester and more select space.
In addition, tester can also send instructions to terminal test device, instruction terminal test device is closed testedThe image buffer storage of terminal is enabled, close the scheme that image buffer storage enables be applied to it is above-mentioned automatically turned on by terminal test device it is testedExamination terminal image caching is enabled and tester passes through the image that cache instruction instruction terminal test device opens tested terminalThe scheme that caching is enabled.Enable tester that the image buffer storage of tested terminal is closed in some simple test processsEnable, so as to reduce the occupancy to tested terminal system disposal ability and performance.
S104, after there is abnormal problem in tested terminal, terminal test device based on caching display image and go outThe time of existing abnormal problem generates scene recovery video.
After tested terminal occurs exception under the test operation of tester, tester needs multiple to research staffWhat the test operation that stating causes terminal exception occur is successively, and more complicated for test operating procedure, tester canAid in determining the test behaviour before abnormal generation to generate scene recovery video by the terminal test device in the present embodimentMake, scene recovery video can show the test operation before abnormal generation.
It should be noted that terminal test device generate scene recovery video be currently occur for tested terminal it is differentOften generate, therefore, the time that will be occurred based on tested terminal abnormal when generating scene recovery video is generated.Generally,Tester voluntarily can generate the time by input video, including initial time and the time of termination of video, different in order to determineThe termination set of time for generating video typically the moment for abnormal by the reason for often occurring, tester can occur.And generate videoInitial time then decided in its sole discretion by tester's general layout practical situation.Therefore, in the middle of the other example of the present embodiment, userThe initial time for generating video can be only input into, by terminal test device using the abnormal time for occurring as the termination for generating videoTime.
The display image and the time for abnormal problem occur below to terminal test device based on caching generates fieldThe process of scape recovery video is simply introduced, and refers to Fig. 2:
S202, terminal test device receive the video generation instruction for generating the time occurred based on abnormal problem.
Video generates instruction is given birth to according to tested terminal abnormal problem time of occurrence by tester or research staffInto, there is the abnormal time as tester may become more apparent upon tested terminal relative to research staff, and it is testedWhen examination terminal occurs abnormal, tester should be in same position with which, and tested personnel can immediately according to instantlyTime generate scene recovery video, therefore, in the present embodiment, to terminal test device send video generate instruction it is basicAll it is tester.It is understood that tested terminal can also be recorded by tester occurs the abnormal time, work as research and developmentWhen personnel are the reason for positioning tested terminal abnormal, scene recovery video is generated further according to the time of tester's record, becauseThis, video generates instruction and can also be issued by research staff.
S204, terminal test device parsing video are generated and instruct and obtain the initial time and termination time for generating video.
Based on introduction above, it will be understood that, in the present embodiment, video can include needing life in generating instructionInto initial time and the time of termination of video, it is also possible to only including the initial time for generating video.So working as terminal test deviceWhen being parsed only from video generation instruction a time, can give tacit consent to the time that tested terminal abnormal is occurred into the momentAs generate the time the termination time.If parsing two times, can using the preceding time in two times asGeneration is the initial time of video, using the posterior time as the termination time for generating video.
S206, terminal test device extract initial time and the display image stored between the termination time, and according to extractionThe display image for going out generates scene recovery video.
After terminal test device gets the initial time and termination time for generating video, it will aobvious from what is stored beforeInitial time and the display image between the termination time are extracted in diagram picture, and it is multiple scene to be generated based on the display image for extractingFormer video.
The terminal test method provided in the present embodiment, by display interface is shown in test process to tested terminalThe display image shown is cached, and when tested terminal breaks down, can pass through the display image generation of cachingScene recovery video recording tested terminal test operation for being experienced before it there is exception, generate scene recovery video itAfterwards, what research staff can be just according to scene recovery video the reason for accurately understanding causes tested terminal to occur abnormal,Do not need that tester is same as language or word is stated to research staff, it is to avoid tester subjective expression is inaccurate,Mislead the problem of research staff;Simultaneously as eliminate research staff link up with tester the plenty of time for spending, therefore,Terminal production efficiency can be lifted.
Second embodiment:
In order that those skilled in the art are it will be appreciated that the advantage and details of terminal test method, the present embodiment will be with reference to toolThe example of body is introduced to which.
In the present embodiment, the display image that terminal test device is preserved is the image in frame buffer (frame buffering)Data.Terminal test device can pass through the value of cache frame buffer image enable (image frame buffer enable)Image buffer storage to control tested terminal is enabled, as tested terminal system attribute cache frame buffer imageWhen the value of enable is 1, characterizes tested terminal and currently had been switched on image buffer storage function.As cache frameWhen the value of buffer image enable is 0, the image buffer storage function of characterizing tested terminal is not currently activated.
The worth sizes of cache frame buffer image enable can be by terminal test device to tested terminalPattern detected that, when tested terminal is under the tested pattern, terminal test device can be cache frameBuffer image enable are entered as " 1 ", and the image buffer storage for opening tested terminal is enabled, when tested terminal is in non-Under test pattern, then terminal test device can be entered as " 0 " for cache frame buffer image enable, closedThe image buffer storage of tested terminal is enabled.In the middle of some other examples of the present embodiment, cache frame bufferImage enable are worth size be input into by cache instruction by user, when user input cache instruction is to indicate to open quiltDuring the image buffer storage function of test terminal, cache instruction of the terminal test device according to tester, by cache frameThe value of buffer image enable is revised as " 1 ", closes tested terminal when the cache instruction of tester's input is characterizedWhen image buffer storage is enabled, terminal test device is then by the cache frame buffer image enable values of tested terminalIt is revised as " 0 ".
It is opened when the image buffer storage of tested terminal is enabled, that is, cache frame buffer imageWhen the value of enable is 1, terminal test device can call create Cache Test Procedure () to create oneIndividual test caching process.As shown in figure 3, in the present embodiment, test caching process 33 is based on linux kernel (LinuxKernel) 32, and linux kernel 32 then needs the support of various hardware 31.It is various types of to be in top in whole frameworkThe application program 36 of type, exploitation and the operation of application program are all based on application framework 35, and application framework 35 passes through call function storehouseEach function in 34 is realizing the various functions of application program 36.
This carry out central terminal test device can by interface save Frame Buffer Image () to show boundaryThe display image in face is stored, the present embodiment an example work as this, terminal buffers device can with 640 × 480 pointResolution preserves the view data in frame buffer.The cache path of display image can be such as:/mnt/sdcard/Debug/framebuffer/ year-month-day-when-point-second-millisecond .jpg.Corresponding to the create for creating test caching processCache Test Procedure () interfaces, in the present embodiment, terminal test device may call upon release CacheTest Procedure () interfaces test caching process to destroy, discharge.
Once tested terminal occurs exception in test process, terminal test device can be according to tester's inputVideo generates instruction, calls input Start And End Time () interfaces, input that the initial time of video file is generatedWith the time of termination, finally using output Video File () interfaces are according to the initial time of input and terminate the time, extractionDisplay image in this time is generated video by the display image of caching, and in the middle of a kind of example of the present embodiment, terminal is surveyedTrial assembly is put and can generate scene with AVC (H.264High Profile, 640 × 480 resolution, the frame per second of 30fps) coding and restoreVideo, the scene recovery video file of generation can preserve to:/ mnt/sdcard/debug/test/ year-month-day-when-point.mp4。
Simultaneously as the caching of display image expends memory space very much, therefore, when necessary, terminal test deviceNeed to empty the view data of caching, with release disk space.Terminal test device can be by calling clear PreCached Images () is removing buffered data.The display image to having cached carry out deleting including modeIncluding so several:
The first, in tested terminal closedown or when restarting, deletes the display image for caching before this.As north side isTerminal closedown can characterize the current test of tested terminal when restart and have finished on, and exit test patternA kind of performance, therefore, it can all remove all display images for storing before at this moment.
Second, when the image buffer storage enabled state of tested terminal changes, namely cache frame bufferWhen the value of image enable changes, can become from 0 in the value of cache frame buffer image enableFor 1 when, it is also possible to when its value is changed into 0 from 1, when the value of cache frame buffer image enable is from 0When being changed into 1, sign will open the test for surveying a new round, and now, terminal test device can delete the institute for storing beforeSome display images;And when the value of cache frame buffer image enable is changed into 0 from 1, characterize currentlyDisplay image need not be stored, it is different from the test phase for storing display image before, therefore, it can delete before thisThe display image of storage is vacateing memory space.
The third, deletes the display image that user specifies according to the image-erasing instruction that user issues.Delete aobvious by userIn the scheme of diagram picture, terminal test device can be monitored to the quantity of buffered display image, when discovery is delayedWhen the display image deposited exceedes predetermined threshold value, terminal test device can issue the user with information, point out user to slowThe display image deposited is deleted, and then receive user is instructed according to the image-erasing that information is returned, and to image-erasingInstruction is parsed, and determines the display image to be deleted that user specifies;The display image to be deleted determined is deleted finally.Specify to terminal test device need to delete which display image when, user can refer in deletion according to the demand of oneselfSpecified in order.But it is to be appreciated that terminal test device can preselect the display image number that part can be deletedAccording to then in information, prompting user deletes the view data that this part is selected, when the deletion instruction catalogue that user returns is agreedWhen determining, that is, characterize user and agree to delete this not sub-image data.It is this that the display image data that can be deleted is supplied toUser, can avoid user effort energy to screen needs the volume view data deleted, and gives user and preferably experiences.Terminal is surveyedTrial assembly is put when issuing the user with information, can be carried out in the form of pop-up illustrated in fig. 4.
In the present embodiment, generation dynamic base can also be carried out for image buffer storage, so that tester is to hardware conditionWhen different various tested terminals is tested, the test can be called to cache process by terminal test device,For the ease of it will be appreciated by those skilled in the art that in the present embodiment, there is provided a kind of scheme for generating dynamic base:
It is possible, firstly, to configure Android.mk files, LOCAL_MODULE=lib Cache Test are setProcedure, reference to variable include $ ((BUILD_SHARED_LIBRARY);Then according to configuration attribute, compiling generates oneIndividual public dynamic base lib Cache Test Procedure.so are called for Frame Buffer;Finally, the dynamic that will be generatedThe path in storehouse is set to out/target/Project Name/system/lib/lib Cache Test Procedure.so.
The terminal test method that the present embodiment is provided, can not only create special envoy's caching process and come to tested terminal test mouldDisplay image under formula is cached, it is ensured that stage casing can be easier to determine after there is exception causes abnormal testOperating process;Can also to it is currently buffered, and the display image data that do not have value timely cleared up, it is ensured thatThere are enough spatial caches to store new display image.Meanwhile, the terminal test method in the present embodiment can also be slow for testCheng Shengcheng dynamic bases are deposited into, the terminal test of the present embodiment offer can be used for the tested terminal of various hardware supportedMethod is tested, and improves the versatility of the present embodiment terminal test method.
3rd embodiment:
The present embodiment provides a kind of terminal test device for performing terminal test method in first embodiment, refer toFig. 5:
Terminal test device 50 includes image buffer storage module 502 and video generation module 504.Tested terminal is being carried outDuring test, image buffer storage module 502 is for caching to the display image of tested terminal display interface.To quiltDuring test terminal is tested, video generation module 504 delays to the display image of tested terminal display interfaceDeposit.
As tested terminal is when tested personnel carry out operations, its display interface can be with operatorOperation and change, for example, when operator open video playback interface, the display interface of tested terminal willThe picture of current played video correspondence frame can be presented;Brightness of the tester to tested terminal plays video is adjustedWhen, the brightness of tested terminal not only display picture can be improved, and can also in the display picture that may be in course of adjustmentShow the process that adjustment control changes;When tester browses webpage by tested terminal, tested terminalDisplay interface will show corresponding webpage;If tester controls tested terminal from a page jump to other oneThe individual page, then the page of tested terminal the page after redirecting can be not only presented, the display in jump procedure may also can be presentedPicture.As above example, under the operation of tester, its display picture can also be presented other changes to tested terminalChange process.Although it is understood that the output of tested terminal is to the shape that the picture of its display screen is with image on a display screenWhat formula was present, but these images are all exist with digital signal in tested terminal inner, 502 pairs of quilts of image buffer storage moduleThese digital signals of test terminal are stored.After storage the picture of storage is played back with certain speed just can shapeInto video.
Due to the special physiological structure of human eye, human eye in observing scene, the incoming cerebral nerve of optical signal, need throughOne of short duration time, after the effect of light terminates, visual image does not disappear immediately, and the vision of this residual claims " after image ", depending onThis phenomenon felt then is referred to as " persistence of vision ".If in fact, when the frame per second of seen picture is higher than 16, will be recognizedFor be it is coherent, therefore, although electronic equipment play video when, frame per second is to be not quite similar, nearly all electronic equipmentFrame per second when video is played is both greater than 20.For example, the frame per second of radio and television is 25 frames/s, and the frame per second of common mobile terminal30 frames/s is mostly, or even the frame per second of part mobile terminal can reach 60 frames/s.Due to the effect of human vision effect, the mankindThe video that electronic equipment is played can just be seen.Also the frame per second just because of tested terminal may recognize non-coherent much larger than the mankindThe ability of picture, therefore, in the present embodiment, image buffer storage module 502, can not when the display picture of tested terminal is cachedThe all pictures shown with the tested terminal of storage, but the picture shown from tested terminal according to certain sample frequencyExtract a part of picture to be stored in face.For example, it is when tested terminal shows that the frame per second of video is 60 frames/s that is, testedWhen examination terminal will show 60 image frames in the time per second, but image buffer storage module 502 can be with every in this 60 imagesOne, interval picture is chosen one and is cached, and even so, the image chosen out still has 30, and this 30 pictures are existedFrame per second when playing out according to original sequencing in the same second still up to 30 frames/s, this for the mankind, orCoherent video can be formed.But after screening, image buffer storage module 502 needs the picture of caching greatly reduce, fromAnd the memory space for storing display picture can be saved, reduce the requirement to 50 memory space of terminal test device.
Beyond all doubt, image buffer storage module 502 is when tested terminal display is cached, it is also possible to withoutScreen and be directed to whole display pictures and stored.Or when selecting extraction tested terminal display, can be withNot according to 1:The ratio of 2 (extracting one in i.e. two to be stored) is screened, it is also possible to according to 2:3 or 4:5 equal proportionsCarry out, as long as 16 can be more than for the picture that each second extracts.
In the middle of above-mentioned example, when tested terminal is during being test for, image buffer storage module 502 can be cached automaticallyThe display image of tested terminal, this can detect the pattern residing for tested terminal mainly due to terminal test device 50,In the middle of another example of the present embodiment, as shown in fig. 6, terminal test device 50 also includes state adjusting module 506, work as shapeWhen state adjusting module 506 detects tested terminal under tested pattern, state adjusting module 506 can automatically turn on testedThe image buffer storage of examination terminal is enabled, to cache display image of the tested terminal in test process shown by display interface.
But as image buffer storage module 502 is when the display picture of tested terminal is cached, it will make tested terminal systemThe internal memory of system, CPU, GPU and power consumption are dramatically increased, and tester is carrying out some simple surveys to tested terminal sometimesExamination, it is not necessary to which generating abnormal scene recovery video and just being repeated with oneself causes tested terminal that abnormal test operation occursProcess is how, therefore, in such a case, it is possible to enable without the image buffer storage for opening tested terminal.So, in this enforcementIn the middle of another kind of example of example, the image buffer storage of tested terminal enable be issued according to user by state adjusting module 506 it is slowDeposit instruction unpack.That is, if carrying out caching to the display image of tested terminal can be determined by tester, phaseFor the scheme that tested terminal image caching is enabled directly is opened, this image buffer storage controlled by tester is enabledThe process of switch may more meet the wish of tester, give tester and more select space.
In addition, tester can also send instructions to state adjusting module 506, instruction state adjusting module 506 is closedThe image buffer storage of tested terminal is enabled, close the scheme that image buffer storage enables be applied to it is above-mentioned by state adjusting module 506 fromMove the tested terminal image caching enable of unlatching and tester opens tested by cache instruction instruction state adjusting module 506The scheme that the image buffer storage of examination terminal is enabled.Tester is enabled to close tested end in some simple test processsThe image buffer storage at end is enabled, so as to reduce the occupancy to tested terminal system disposal ability and performance.
After tested terminal occurs exception under the test operation of tester, tester needs multiple to research staffWhat the test operation that stating causes terminal exception occur is successively, and more complicated for test operating procedure, tester canAid in determining the test before abnormal generation to generate scene recovery video by the video generation module 504 in the present embodimentOperation, scene recovery video can show the test operation before abnormal generation.
It should be noted that the scene recovery video that video generation module 504 is generated currently is sent out for tested terminalRaw abnormal generation, therefore, the time that will be occurred based on tested terminal abnormal when generating scene recovery video is generated.It is logicalOften, tester voluntarily can generate the time by input video, including initial time and the time of termination of video, in order to determineThe termination set of time for generating video typically the moment for abnormal by the reason for abnormal generation, tester can occur.And generate and regardThe initial time of frequency is then decided in its sole discretion by tester's general layout practical situation.Therefore, in the middle of the other example of the present embodiment, useFamily can only be input into the initial time for generating video, by video generation module 504 using the abnormal time for occurring as generation videoThe termination time.
The display image and the time for abnormal problem occur below to video generation module 504 based on caching is generatedThe process of scene recovery video is simply introduced:
First, video generation module 504 receives the video generation instruction of the time generation occurred based on abnormal problem.
Video generates instruction is given birth to according to tested terminal abnormal problem time of occurrence by tester or research staffInto, there is the abnormal time as tester may become more apparent upon tested terminal relative to research staff, and it is testedWhen examination terminal occurs abnormal, tester should be in same position with which, and tested personnel can immediately according to instantlyTime generate scene recovery video, therefore, in the present embodiment, to video generation module 504 send video generate instructionIt is substantially tester.It is understood that can also record tested terminal by tester there is the abnormal time, whenWhen research staff is the reason for positioning tested terminal abnormal, the time generation scene recovery further according to tester's record is regardedFrequently, therefore, video generate instruction can also be issued by research staff.
Based on introduction above, it will be understood that, in the present embodiment, video can include needing life in generating instructionInto initial time and the time of termination of video, it is also possible to only including the initial time for generating video.So working as video generation module504 generate from video when only parse a time in instruction, can give tacit consent to and for tested terminal abnormal occur the momentThe termination time as the time of generation of time.If parsing two times, can be by the preceding time in two timesIt is the initial time of video as generation, using the posterior time as the termination time for generating video.
After video generation module 504 gets the initial time and termination time for generating video, it will store from beforeDisplay image in extract initial time and the display image between the termination time, and field is generated based on the display image for extractingScape recovery video.
The terminal test device provided in the present embodiment, by display interface is shown in test process to tested terminalThe display image shown is cached, and when tested terminal breaks down, can pass through the display image generation of cachingScene recovery video recording tested terminal test operation for being experienced before it there is exception, generate scene recovery video itAfterwards, what research staff can be just according to scene recovery video the reason for accurately understanding causes tested terminal to occur abnormal,Do not need that tester is same as language or word is stated to research staff, it is to avoid tester subjective expression is inaccurate,Mislead the problem of research staff;Simultaneously as eliminate research staff link up with tester the plenty of time for spending, therefore,Terminal production efficiency can be lifted.
Fourth embodiment:
Continuing with reference to Fig. 5-Fig. 6, in the present embodiment, the display image that image buffer storage module 502 is preserved is frameView data in buffer (frame buffering).State adjusting module 506 can pass through cache frame buffer imageThe value of enable (image frame buffer enable) is enabled come the image buffer storage for controlling tested terminal, when tested terminal system attributeWhen the value of cache frame buffer image enable is 1, characterizes tested terminal and currently had been switched on imageCaching function.When the value of cache frame buffer image enable is 0, the image of tested terminal is characterizedCaching function is not currently activated.
The worth sizes of cache frame buffer image enable can be by state adjusting module 506 to testedThe pattern of terminal is detected that, when tested terminal is under tested pattern, state adjusting module 506 can be cacheFrame buffer image enable are entered as " 1 ", and the image buffer storage for opening tested terminal is enabled, when tested terminalUnder non-test, mode, then state adjusting module 506 can be entered as cache frame buffer image enable" 0 ", the image buffer storage for closing tested terminal enable.In the middle of some other examples of the present embodiment, cache frameBuffer image enable are worth size be input into by cache instruction by user, when user input cache instruction is referred toShow when opening the image buffer storage function of tested terminal, cache instruction of the state adjusting module 506 according to tester, willThe value of cache frame buffer image enable is revised as " 1 ", closes when the cache instruction of tester's input is characterizedWhen the image buffer storage of tested terminal is enabled, state adjusting module 506 is then by the cache frame buffer of tested terminalImage enable values are revised as " 0 ".
It is opened when the image buffer storage of tested terminal is enabled, that is, cache frame buffer imageWhen the value of enable is 1, image buffer storage module 502 can call create Cache Test Procedure () to createOne test caching process.As shown in figure 3, in the present embodiment, test caching process 33 is based on linux kernel (LinuxKernel) 32, and linux kernel 32 then needs the support of various hardware 31.It is various types of to be in top in whole frameworkThe application program 36 of type, exploitation and the operation of application program are all based on application framework 35, and application framework 35 passes through call function storehouseEach function in 34 is realizing the various functions of application program 36.This carry out central image buffer storage module 502 can be by connecingMouth save Frame Buffer Image () is stored to the display image of display interface, in an example of the present embodimentWhen this, terminal buffers device can preserve the view data in frame buffer with 640 × 480 resolution.Display imageCache path can be such as:/ mnt/sdcard/debug/framebuffer/ year-month-day-when-point-second-millisecond .jpg.Corresponding to create Cache Test the Procedure () interfaces for creating test caching process, in the present embodiment, imageCache module 502 may call upon release Cache Test Procedure () interfaces destroy, discharge test cache intoJourney.
Once tested terminal occurs exception in test process, video generation module 504 can be defeated according to testerThe video for entering generates instruction, calls input Start And End Time () interfaces, input that the starting of video file is generatedTime and termination time, finally using output Video File () interfaces are according to the initial time of input and terminate the time,The display image of caching is extracted, the display image in this time is generated into video, in the middle of a kind of example of the present embodiment, depending onFrequency generation module 504 can be generated with AVC (H.264High Profile, 640 × 480 resolution, the frame per second of 30fps) codingScene recovery video, the scene recovery video file of generation can preserve to:/ mnt/sdcard/debug/test/-the moon--when-point .mp4.
Simultaneously as the caching of display image expends memory space very much, therefore, when necessary, terminal test device50 need to empty the view data of caching, therefore, as shown in fig. 7, terminal test device 50 also includes data in the present embodimentModule 508 is removed, data dump module 508 can have been delayed to remove by calling clear Pre Cached Images ()The data deposited.The display image that data dump module 508 pairs has been cached carry out deleting including mode include it is so several:
The first, in tested terminal closedown or when restarting, data dump module 508 deletes the display for caching before thisImage.As north side is terminal closedown or can characterize the current test of tested terminal when restart and has finished on,It is a kind of performance for exiting test pattern, therefore, it can all remove all display images for storing before at this moment.
Second, when the image buffer storage enabled state of tested terminal changes, namely cache frame bufferWhen the value of image enable changes, such as the value in cache frame buffer image enable becomes from 0For 1 when, it is also possible to when its value is changed into 0 from 1.When the value of cache frame buffer image enable is from 0When being changed into 1, sign will open the test for surveying a new round, and now, data dump module 508 can delete what is stored beforeAll of display image;And when the value of cache frame buffer image enable is changed into 0 from 1, characterize currentDisplay image need not have been stored, it is different from the test phase for storing display image before, therefore, data dump module508 can delete the display image for storing before this to vacate memory space.
The third, data dump module 508 deletes the display figure that user specifies according to the image-erasing instruction that user issuesPicture.Deleted in the scheme of display image by user, data dump module 508 can be entered to the quantity of buffered display imageRow monitoring, when the display image for finding to have cached exceedes predetermined threshold value, data dump module 508 can issue the user with promptingInformation, points out user to deleting with the display image for caching, and then receive user is deleted according to the image that information is returnedExcept instruction, and image-erasing instruction is parsed, determine the display image to be deleted that user specifies;Finally delete and determineDisplay image to be deleted.Specify to data dump module 508 need to delete which display image when, user can be withSpecified in instruction is deleted according to the demand of oneself.But it is to be appreciated that data dump module 508 can be preselectedThe display image data that part can be deleted, then points out user to delete the view data that this part is selected in information,When the deletion instruction catalogue that user returns is affirmed, that is, characterize user and agree to delete this not sub-image data.It is this can be withThe display image data of deletion is supplied to user, and can avoid user effort energy to screen needs the volume view data deleted,Give user preferably to experience.When data dump module 508 issues the user with information, can be with bullet illustrated in fig. 4The form of window is carried out.
In the present embodiment, generation dynamic base can also be carried out for image buffer storage, so that tester is to hardware conditionWhen different various tested terminals is tested, can by terminal test device 50 call the test cache intoJourney.For the ease of it will be appreciated by those skilled in the art that in the present embodiment, there is provided a kind of scheme for generating dynamic base:
It is possible, firstly, to configure Android.mk files, LOCAL_MODULE=lib Cache Test are setProcedure, reference to variable include $ ((BUILD_SHARED_LIBRARY);Then according to configuration attribute, compiling generates oneIndividual public dynamic base lib Cache Test Procedure.so are called for Frame Buffer;Finally, the dynamic that will be generatedThe path in storehouse is set to out/target/Project Name/system/lib/lib Cache Test Procedure.so.
The terminal test device that the present embodiment is provided, can not only create special envoy's caching process and come to tested terminal test mouldDisplay image under formula is cached, it is ensured that stage casing can be easier to determine after there is exception causes abnormal testOperating process;Can also to it is currently buffered, and the display image data that do not have value timely cleared up, it is ensured thatThere are enough spatial caches to store new display image.Meanwhile, the terminal test method in the present embodiment can also be slow for testCheng Shengcheng dynamic bases are deposited into, the terminal test of the present embodiment offer can be used for the tested terminal of various hardware supportedMethod is tested, and improves the versatility of the present embodiment terminal test device.
5th embodiment:
The present embodiment will provide a kind of terminal, while can also fill to terminal test in 3rd embodiment and fourth embodimentThe hardware configuration put is introduced, and refers to Fig. 8:
The terminal test device 50 that terminal 8 is provided in including 3rd embodiment and fourth embodiment, that is to say, that eventuallyEnd test device 50 can be deployed in the middle of terminal 8.Terminal 8 can be implemented in a variety of manners.For example, described in the present inventionTerminal can (individual digital be helped including such as mobile phone, smart phone, notebook computer, digit broadcasting receiver, PDAReason), PAD (panel computer), PMP (portable media player), the mobile terminal of guider etc. and such as numeralThe fixed terminal of TV, desk computer etc..Hereinafter it is assumed that terminal is mobile terminal, however, it will be understood by those skilled in the art that, in addition to being used in particular for moving the element of purpose, construction according to the embodiment of the present invention can also apply to admittedlyDetermine the terminal of type.
Fig. 9 is the hardware architecture diagram for realizing the optional mobile terminal of each embodiment one of the invention.
Mobile terminal 900 can include user input unit 910, output unit 920, memorizer 930, controller 940 etc.Deng.Fig. 1 shows the mobile terminal with various assemblies, it should be understood that be not required for implementing all components for illustrating,More or less of component can alternatively be implemented, the element of mobile terminal is will be discussed in more detail below.
User input unit 910 can generate key input data to control each of mobile terminal according to the order of user inputPlant operation.User input unit 910 allows the various types of information of user input, and can include keyboard, metal dome, touchPlate (for example, detection is due to the sensitive component of the change of touched and caused resistance, pressure, electric capacity etc.), roller, rocking bar etc.Deng.Especially, when touch pad is superimposed upon on display module 921 in the form of layer, touch screen can be formed.
Output unit 920 can include display module 921, dio Output Modules 922, alarm modules 923 etc..
The information that display module 921 is processed in may be displayed on mobile terminal 900.For example, when mobile terminal 900 is in electricityDuring words call mode, display module 921 can show and converse or other communicate (for example, text messaging, multimedia filesDownload etc.) related user interface (UI) or graphic user interface (GUI).When mobile terminal 900 is in video calling patternOr during image capture mode, display module 921 can show the image of capture and/or the image of reception, illustrate video or figureUI or GUI of picture and correlation function etc..
Meanwhile, when the display module 921 and touch pad touch screen with formation superposed on one another in the form of layer, display module921 can serve as input equipment and output device.Display module 921 can include liquid crystal display (LCD), thin film transistor (TFT)In LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc. at leastIt is a kind of.Some in these display may be constructed such that transparence to allow user from outside viewing, and this is properly termed as transparentDisplay, typical transparent display can be, for example, TOLED (transparent organic light emitting diode) display etc..According to specificThe embodiment wanted, mobile terminal 900 can include two or more display modules (or other display devices), for example, moveDynamic terminal can include outside display module (not shown) and internal display module (not shown).Touch screen can be used for detection and touchInput pressure and touch input position and touch input area.
Dio Output Modules 922 can mobile terminal in call signal reception pattern, call mode, logging mode,It is when under the isotypes such as speech recognition mode, broadcast reception mode, that wireless communication unit 110 is received or in memorizer 930The voice data transducing audio signal of middle storage and it is output as sound.And, dio Output Modules 922 can be provided and movementThe audio output (for example, call signal receives sound, message sink sound etc.) of the specific function correlation that terminal 900 is performed.Dio Output Modules 922 can include speaker, buzzer etc..
Alarm modules 923 can provide output so that event is notified to mobile terminal 900.Typical event can be withIncluding calling reception, message sink, key signals input, touch input etc..In addition to audio or video is exported, alarm modules923 can provide output in a different manner with the generation of notification event.For example, alarm modules 923 can be in the form of vibratingOutput is provided, when calling, message or some other entrance communication (incoming communication) are received, alarm mouldBlock 923 can provide tactile output (that is, vibrating) to notify to user.Tactile output as by providing, even ifWhen the mobile phone of user is in the pocket of user, user also can recognize that the generation of various events.Alarm modules 923The output of the generation of notification event can be provided via display module 921 or dio Output Modules 922.
In the diagram, the data dump module in terminal test device 50 can be when memory space inadequate with pop-upThe view data stored before form prompting user's deletion part, in the present embodiment, mobile terminal 900 with play frame show toWhen user sends information, sound (such as tone) or vibration prompt can be aided with, be carried with ensureing that user will not missShow information.
Memorizer 930 can store software program for the process and control operation performed by controller 940 etc., Huo ZhekeWith the data (for example, telephone directory, message, still image, video etc.) for temporarily storing own Jing outputs or will export.AndAnd, memorizer 930 can be storing the vibration of various modes with regard to exporting when touching and being applied to touch screen and audio signalData.
Memorizer 930 can include the storage medium of at least one type, and the storage medium includes flash memory, hard disk, manyMedia card, card-type memorizer (for example, SD or DX memorizeies etc.), random access storage device (RAM), static random-access storageDevice (SRAM), read only memory (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory(PROM), magnetic storage, disk, CD etc..And, mobile terminal 900 can perform memorizer with by network connectionThe network storage device cooperation of 930 store function.
The overall operation of the generally control mobile terminal of controller 940.For example, controller 940 is performed and voice call, dataThe related control of communication, video calling etc. and process.In addition, controller 940 can be included for reproducing (or playback) many matchmakersThe multi-media module 941 of volume data, multi-media module 941 can be constructed in controller 940, or it is so structured that and controlDevice 940 is separated.Controller 940 can be with execution pattern identifying processing, by the handwriting input for performing on the touchscreen or pictureDraw input and be identified as character or image.
Various embodiments described herein can be with use such as computer software, hardware or its any combination of calculatingMachine computer-readable recording medium is implementing.For hardware is implemented, embodiment described herein can be by using application-specific IC(ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene canProgramming gate array (FPGA), processor, controller, microcontroller, microprocessor, it is designed to perform function described hereinAt least one in electronic unit implementing, in some cases, can be implemented in controller 940 by such embodiment.For software is implemented, the embodiment of such as process or function can with allow to perform the single of at least one function or operationSoftware module is implementing.Software code can be come by the software application (or program) write with any appropriate programming languageImplement, perform during software code can be stored in memorizer 930 and by controller 940.
So far, own Jing describes mobile terminal according to its function.Below, for the sake of brevity, will description such as folded form,Slide type mobile terminal in various types of mobile terminals of board-type, oscillating-type, slide type mobile terminal etc. is used as showingExample.Therefore, the present invention can be applied to any kind of mobile terminal, and be not limited to slide type mobile terminal.
3rd embodiment can be by controller 940 with memorizer 930 altogether with the image buffer storage module in fourth embodimentWith realization, the needs output to output that 940 control memory 930 of controller will be stored in mobile terminal 900frame bufferThe display module 921 of unit 920 view data up is stored.The function of video generation module can be by controller 940To realize, controller 940 generates instruction according to the video that user is input into from input block 910 and extracts from memorizer 930Corresponding view data, is saved in memorizer 930 after then generating view data.910 receive user of user input unit is defeatedThe cache instruction for entering, and cache instruction is sent to into controller 940, make 940 control memory 930 of controller carry out display imageStorage, therefore the function of state adjusting module can be common with controller 940 real by user input unit 910 in the present embodimentIt is existing, but it will be appreciated by persons skilled in the art that whether controller 940 can also be directly to mobile terminal in test mouldFormula is monitored, and when mobile terminal 1 00 is in test pattern, cache frame buffer are changed in directly controlThe value of image enable.And the function of data dump module can also be by 940 balance reservoir of controller, 930 common realization.
The terminal provided in the embodiment of the present invention, including the terminal test device provided in previous embodiment, therefore, rightDuring the terminal that this enforcement is provided is tested, can be by terminal test device come the display figure during cache testPiece, so as to record terminal test process.Before this recording exceptional generation, the process of test operation has the reliability of height, visitorThe property seen, it is to avoid being difficult to caused by the memory of tester is only relied upon in prior art and accurately repeats abnormal front operationThe problem that journey even can not be repeated completely, improves the efficiency of test operation.
It should be noted that herein, term " including ", "comprising" or its any other variant are intended to non-rowHis property is included, so that a series of process, method, article or device including key elements not only include those key elements, andAnd also include other key elements being not expressly set out, or also include for this process, method, article or device institute inherentlyKey element.In the absence of more restrictions, the key element for being limited by sentence "including a ...", it is not excluded that including being somebody's turn to doAlso there is other identical element in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment sideMethod can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many casesThe former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other wordsThe part for going out contribution can be embodied in the form of software product, and the computer software product is stored in a storage mediumIn (such as ROM/RAM, magnetic disc, CD), use so that a station terminal equipment including some instructions (can be mobile phone, computer, clothesBusiness device, air-conditioner, or network equipment etc.) perform method described in each embodiment of the invention.
Embodiments of the invention are described above in conjunction with accompanying drawing, but be the invention is not limited in above-mentioned concreteEmbodiment, above-mentioned specific embodiment are only schematic, rather than restricted, one of ordinary skill in the artUnder the enlightenment of the present invention, in the case of without departing from present inventive concept and scope of the claimed protection, can also make a lotForm, these are belonged within the protection of the present invention.