CN110569184B - Test method and terminal equipment - Google Patents

Test method and terminal equipment Download PDF

Info

Publication number
CN110569184B
CN110569184B CN201910705205.2A CN201910705205A CN110569184B CN 110569184 B CN110569184 B CN 110569184B CN 201910705205 A CN201910705205 A CN 201910705205A CN 110569184 B CN110569184 B CN 110569184B
Authority
CN
China
Prior art keywords
test
video
event
test event
target
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.)
Active
Application number
CN201910705205.2A
Other languages
Chinese (zh)
Other versions
CN110569184A (en
Inventor
唐勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Simplecredit Micro-Lending Co ltd
Original Assignee
Simplecredit Micro-Lending 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 Simplecredit Micro-Lending Co ltd filed Critical Simplecredit Micro-Lending Co ltd
Priority to CN201910705205.2A priority Critical patent/CN110569184B/en
Publication of CN110569184A publication Critical patent/CN110569184A/en
Application granted granted Critical
Publication of CN110569184B publication Critical patent/CN110569184B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a test method and terminal equipment, wherein the test method comprises the following steps: in the process of testing a test object, acquiring characteristic information of at least one test event generated for the test object; generating a first video according to the characteristic information of at least one test event; acquiring a fault time point of a test object recorded in a test log; generating a second video according to the fault time point and the first video; and determining a target test event which causes the test object to fail from at least one test event according to the second video. Therefore, the target test event obtained by the method is the cause of the fault of the test object, so that the method can automatically check the test fault.

Description

Test method and terminal equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a testing method and a terminal device.
Background
Applications and systems on the terminal equipment and the like may malfunction during use due to system anomalies or other reasons. In this regard, the terminal device may issue a random test instruction to the application program or the system to simulate an operation instruction issued by the user, so as to test stability of the application program and the system on the terminal device in the actual use process. Although the stability of the terminal equipment can be tested by the method, the reasons of faults of the application programs, the system and the like on the terminal equipment cannot be determined.
At present, the cause of the fault is determined by adopting a manual repeatability test mode, however, the fault detection method is very low in efficiency. In another method, the test process is recorded through a screen, but the screen can only record the interface displayed by the display interface in response to the operation action, and the specific operation action cannot be displayed. Even some of the operational actions do not cause interface changes, such as testing of hidden controls, etc. Therefore, the fault cannot be checked based on the screen recording.
Disclosure of Invention
The embodiment of the application provides a testing method which can automatically check testing faults.
In a first aspect, embodiments of the present application provide a test method, including:
in the process of testing a test object, acquiring characteristic information of at least one test event generated for the test object, wherein the characteristic information comprises position information and execution time;
generating a first video according to the characteristic information of the at least one test event;
acquiring a fault time point of the test object recorded in a test log;
generating a second video according to the fault time point and the first video;
and determining a target test event which causes the test object to fail from the at least one test event according to the second video.
In a second aspect, an embodiment of the present application provides a terminal device, where the terminal device includes a unit for executing the test method of the first aspect, and the terminal device includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring characteristic information of at least one test event generated for a test object in the process of testing the test object, and the characteristic information comprises position information and execution time;
the generating unit is used for generating a first video according to the characteristic information of the at least one test event;
the acquisition unit is further used for acquiring the fault time point of the test object recorded in the test log;
the generating unit is further used for generating a second video according to the fault time point and the first video;
and the determining unit is used for determining a target test event which causes the test object to fail from the at least one test event according to the second video.
In a third aspect, an embodiment of the present application provides another terminal device, including a processor and a memory, where the processor and the memory are connected to each other, where the memory is configured to store a computer program supporting the terminal device to execute the test method described above, and the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the test method of the first aspect described above.
In the application, the terminal equipment records at least one test event generated in the test process, and generates a first video for reproducing the track of the at least one test event according to the at least one test event. And then generating a second video according to the fault time point when the test object breaks down and the first video. And finally, determining a target test event which causes the test object to fail from the at least one test event according to the second video. It can be seen that for either a test event that causes a change in the display interface or a test event that does not cause a change in the display interface (for operation of the hidden control), both the first video and the second video can reproduce the trajectory of the test event, which is not possible with a simple screen recording. And the second video is a video segment when the test object fails, so that the test failure can be accurately positioned. Finally, the target test event which is obtained and causes the test object to fail is further determined according to the second video, so that the cause of the failure can be rapidly determined. Therefore, the method and the device can automatically check the test faults.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a schematic flow chart of a test method provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart of a test method provided in another embodiment of the present application;
fig. 3 is a schematic block diagram of a terminal device provided in an embodiment of the present application;
fig. 4 is a structural block diagram of a terminal device according to another embodiment of the present application;
FIG. 5 is an application scenario diagram of a test method provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of a first video provided in an embodiment of the present application;
FIG. 7 is a schematic diagram of another first video provided by an embodiment of the present application;
fig. 8 is a schematic diagram of another first video provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The application is mainly applied to terminal equipment, and the terminal equipment can be traditional terminal equipment, a large-scale storage system, a desktop computer, a notebook computer, a tablet computer, a palm computer, a smart phone, a portable digital player, a smart watch, a smart bracelet and the like, and the application is not limited to the above. When the terminal equipment performs data interaction with other terminal equipment, the terminal equipment and the terminal equipment record and transmit the characteristics of the data according to a preset format, wherein the characteristics of the data comprise time, place, type and the like.
In order to test the stability of applications and systems on the terminal device in the actual use process, the terminal device can simulate the operation instruction sent by the user by sending random test instructions to the applications or systems. If the application program or the system on the terminal equipment fails, the tester can interrupt the test and determine the cause of the failure through manual repeated test. It can be seen that the troubleshooting efficiency of this test method is very low.
Therefore, the problem of low efficiency of the test method is solved, and the embodiment of the application provides another test method which can automatically check the test faults so as to improve the efficiency of fault check. In brief, the terminal device first records feature information of a test event generated in a test process and used for testing a test object. And then generating a first video according to the position information and the execution time of the test event indicated by the characteristic information, wherein the first video comprises the test track of the test event in the test process. In order to further locate the fault in the test process, the terminal device firstly acquires the fault time point of the test object recorded in the test log, and then intercepts the video clip containing the process of the fault of the test event from the first video according to the fault time point to serve as a second video. The second video reduces the query range of faults, so that the faults of the test object can be accurately positioned. And finally, the terminal equipment determines a target test event which causes the test object to fail from the at least one test event according to the second video, thereby realizing automatic investigation of the test failure.
In order to better understand the embodiment of the present invention, a method of the embodiment of the present invention will be described below with reference to fig. 5, and the embodiment of the present invention may be applied to a scenario of automatically detecting an application program and a system on a terminal device.
When testing the test object on the terminal equipment, the terminal equipment can receive the operation of a user through input equipment such as a touch screen or a mouse and the like, and generates a test event aiming at the test object according to the operation of the user. The terminal device can also randomly generate test events by directly utilizing a preset program so as to simulate manual operation. It is assumed that the terminal device acquires feature information of a slide event generated for a display interface as shown in fig. 5, the feature information of the slide event including position information and execution time of the slide event. The terminal device then draws the trajectory of the slide event according to the position information and execution time of the slide event, or acquires an animation effect of the slide operation to represent the trajectory of the slide event, resulting in a trajectory video as shown in fig. 6. To this end, the track video may be used as the first video, or the track video may be combined with text information describing the sliding event to obtain the first video as shown in fig. 6. Or the terminal device may synthesize the first video shown in fig. 6 and the video recorded for the test object to obtain the first video shown in fig. 7 (the track video and the video recorded overlap together, the blank part of the track video will not cause shielding to the video recorded), or fig. 8 (the track video and the video recorded do not overlap with each other).
After the first video is obtained, the terminal equipment obtains a fault time point when the test object breaks down in the test process from the test log. Then, the terminal equipment intercepts a video which contains the fault time point and has a preset duration from the first video to serve as a second video. And after the second video is played, the tester can determine a target event which causes the test object to fail from at least one test event generated in the test process.
After the second video is obtained, the terminal equipment automatically determines a target test event which causes the test object to fail from at least one test event generated in the test process according to the second video. Specifically, the terminal device frames the second video into a plurality of frames of pictures according to the fault time point, determines the picture closest to the fault time point and containing the track from the plurality of frames of pictures, and takes the picture as the target picture. And then the terminal equipment acquires a test event corresponding to the target picture as a target test event which leads to the fault of the test object. Or the terminal equipment acquires a plurality of test events contained in the second video, then determines the test event with the execution time closest to the fault time point from the plurality of test events contained in the second video, and takes the test event obtained by the determination as a target test event which leads to the fault of the test object. After determining the target test event, a test report including the target test event may also be output.
After determining the target test event that causes the test object to fail, the terminal device may further perform depth detection on the test object based on the target test event. Specifically, the terminal device determines a preset area including a track of the target test event according to the position information of the target test event, and takes the preset area as a to-be-tested area of the test object. The area to be tested is then tested. If no fault occurs in the test process, no processing is performed. If a fault occurs in the process of testing, generating a first test video according to the characteristic information of at least one test event generated for the region to be tested in the process of testing, wherein the first test video comprises the track of the at least one test event generated in the process of testing the region to be tested. And then generating a second test video according to the time point when the test object fails and the first test video, and finally determining a target test event which causes the test object to fail in the process of testing the region to be tested according to the second test video. The specific implementation process may refer to the process of generating the second video according to the first video and determining the target test event according to the second video, which are not described herein.
It should be noted that, the content shown in fig. 1 is an example, and is not meant to limit the embodiments of the present invention. Because in the present application the display interface displayed on the terminal device is different for different applications and programs.
Referring to fig. 1, a schematic flow chart of a testing method according to an embodiment of the present application, where the testing method shown in fig. 1 may include:
101: and in the process of testing the test object, acquiring the characteristic information of at least one test event generated for the test object.
In the embodiment of the application, the terminal device generates at least one test event aiming at the test object (including an application program, a system and the like) on the terminal device through a random test program (such as a monkey test program) so as to test the test object, and obtains the characteristic information of the at least one test event through a monitoring service program record. Wherein the test event includes clicking, long pressing, dragging, sliding, data input, etc. for the test object, and the characteristic information of the test event includes location information (e.g., coordinates, etc.) and execution time (one execution time for each location information) of the test event. The principle of the random test program for testing the test object is that the step that a user operates the test object through a touch screen or a mouse and the like is omitted, and then a corresponding test event is generated according to the operation of the user, and the test event acting on the test object is directly generated.
For example, as shown in fig. 5, the terminal device generates a sliding event for a certain display interface of the application program as shown in fig. 5. The sliding event simulates the process of a user sliding the display interface from point a to point B.
102: and generating a first video according to the characteristic information of the at least one test event.
In the embodiment of the invention, the terminal equipment generates the first video according to the obtained characteristic information (including the position information and the execution time) of at least one test event. Specifically, when the first video is generated, the track of the test event may be directly drawn according to the position information of the test event and the execution time of the position information.
In an embodiment, the feature information further includes an event type of a test event, and when the first video is generated, an event type of each of at least one test event is obtained first; then obtaining an animation effect corresponding to the event type of each test event; and finally, generating a first video according to the position information of each test event and the animation effect corresponding to the event type of each test event according to the sequence of the execution time of each test event.
In order to make the track of the test event in the first video more vivid and readable, the application implements rendering the track of the test event in the first video by utilizing an animation effect. Specifically, when the first video is generated, sequentially acquiring animation effects corresponding to event types of each test event according to the sequence of execution time of each test event in at least one test event generated in the test process. And then adjusting the position of the animation effect in the display interface of the terminal equipment according to the position information of the test event, so that the track of the test event is represented by the vivid animation effect. After rendering the trajectory of each of the at least one test event with an animation effect, a first video is obtained, the first video comprising a trajectory video, for example as shown in fig. 6. The event type of the moving event is moving, and the corresponding animation effect is linear connection; the event type of the clicking event is clicking, and the corresponding animation effect is a circle; the event type of the long-press event is long-press, and the corresponding animation effect is a rounded rectangle; the event type of the sliding event is sliding, and the corresponding animation effect is an arrow with a direction.
In one embodiment, the first video includes text information describing at least one test event. Specifically, the first video includes a track video and a text portion, for example, as shown in fig. 6. The text portion shown in fig. 6 is the text information described above for describing at least one test event. The text information displays the text information with preset number in a scrolling mode, and the text information with preset number comprises the text information corresponding to the currently played test event. The preset number may be any number, which is not limited in this application.
In one implementation manner, during the process of testing the test object, the terminal device records the screen of the display interface of the test object to obtain a recorded screen video, for example, as shown in fig. 7; and then the terminal equipment generates a first video according to the characteristic information of at least one test event and the recorded video acquired in the test process.
In this embodiment of the present application, the terminal device may further record, by using a recording program, a screen of a display interface of the terminal device in a testing process, so as to obtain a screen recording video as shown in fig. 7. The terminal device then generates a track video, for example as shown in fig. 7, according to at least one test event acquired during the test. Because the video recording includes time information, the time axis of the video recording and the time axis of the first video can be completely overlapped according to the time information of the video recording, so as to achieve the effect of synchronous playing. And finally, generating a first video according to the track video and the screen recording video. The first video includes a track video and a recording video, which occupy different areas of a display screen of the first video, for example, the first video shown in fig. 7; alternatively, the track video and the recording video overlap, and a blank portion of the track video does not cause shielding to the recording video, such as the first video shown in fig. 8. When the track video and the screen recording video occupy different areas of the display picture of the first video respectively, the first video and the screen recording video can be distributed up and down or left and right, and the specific distribution mode of the first video and the screen recording video is not limited.
103: and acquiring a fault time point of the test object recorded in the test log.
In the embodiment of the application, after the first video is generated, the terminal equipment acquires the test log and acquires the fault time point of the test object recorded in the test log. The fault time point of the test object is the time point when the test object breaks down in the test process. Faults that may occur to a test object include: program running crashes, e.g., 11-point 18 minutes, system exceptions cause program exit ≡ -!
104: and generating a second video according to the fault time point and the first video.
In this embodiment of the present application, the terminal device generates a second video according to the fault time point and the first video, where the second video is used to determine, from at least one test event, a target test event that causes a fault of the test object. Specifically, a target time period containing a fault time point is determined; and intercepting a video segment corresponding to the target time period from the first video, and taking the video segment as a second video. For example, a video of 3 seconds before and after the center of the failure time point in the first video is taken as the second video.
105: and determining a target test event which causes the test object to fail from the at least one test event according to the second video.
In the embodiment of the application, since the second video is a segment video including a process of generating a fault in the test object, which is captured from the first video, the terminal device may determine a target test object that causes the fault in the test object in at least one test event acquired in the test process by analyzing the second video. Specifically, the terminal equipment firstly acquires a fault time point of a test object recorded in a test log, and determines a test event with the execution time closest to the fault time point from at least one test event contained in a second video; then, taking the test event with the execution time closest to the fault time point as a target test event which leads to the fault of the test object; and finally, outputting a test report containing the target test event.
For example, the terminal device determines at least one test event included in the second video according to the execution time of the at least one test event acquired during the test, and assumes that the second video includes test events for the test object at 1 st second, 3 rd second and 4 th second, respectively. The terminal equipment obtains the fault time point of the fault of the test object as 2.5 seconds. And determining that the time point closest to the fault time point in the 3 test events contained in the second video is the test event generated in the 3 rd second, and then taking the test event generated in the 3 rd second as the target test event which leads to the fault of the test object. And finally, generating a test report containing the target test event.
In one embodiment, the most recent test event occurring before the time of execution at the point of failure is determined from at least one test event obtained during the test. Next, the method can determine that the latest time point occurring before the fault time point in the 3 test events included in the second video is the test event generated in the 1 st second. And then taking the test event generated in the 1 st second as a target test event which leads to the fault of the test object. And finally, generating a test report containing the target test event.
In one embodiment, there is another method of determining the above-described target test event. Specifically, the terminal equipment frames the second video according to the fault time point to obtain at least one frame of picture; then, carrying out image analysis on the at least one frame of picture to determine a picture which is closest to the fault time point and contains a track, and taking the picture which is closest to the fault time point and contains the track as a target picture; then, a test event corresponding to the target picture is obtained and used as a target test event which leads to the fault of the test object; finally, a test report for the test object may also be output, the test report including the target test event.
In the embodiment of the application, the terminal device firstly frames the second video into multi-frame pictures. Then, starting from the picture corresponding to the fault time point, searching the picture closest to the fault time point and containing the track of the test event, and taking the picture as a target picture. And then determining a test event with execution time corresponding to the time axis of the target picture from at least one test event obtained in the test process, and taking the test event as a target test event. The mapping relationship exists between the time axis of the picture and the execution time of the test event. And finally, after determining the target test event, the terminal equipment can also output a test report containing the target test event. Therefore, when determining the target test event causing the fault of the test object, the method quickly locates the second video through the fault time point, then determines the picture which is closest to the fault time point and contains the track in the second video by utilizing the framing and image analysis method, and finally searches the recorded at least one test event for the target test event corresponding to the picture, so that the method can automatically and quickly troubleshoot the test fault.
In one embodiment, the first video and the second video may include at least one icon selected from pause, play, rewind, forward, accelerate, and decelerate, and when the icon is selected, a function corresponding to the icon is triggered. For example, when a "pause" icon in the first video is selected, the first video pauses playback.
In an implementation manner, after the target test event is determined, the terminal device determines a region to be tested of the test object according to the position information of the target test event and a preset range; and then testing the region to be tested.
In this embodiment of the present application, if the target test event causes the test object to fail, in addition to operating the location where the track of the target test event is located, which causes the test object to fail, operating the area near the track of the target test event may also cause the test object to fail. Specifically, the terminal device determines a preset area including a track of the target test event according to the position information of the target test event, and takes the preset area as a to-be-tested area of the test object. The area to be tested is then tested. If no fault occurs in the test process, no operation is performed. If a fault occurs in the process of testing, generating a first test video according to the characteristic information of at least one test event generated for the region to be tested in the process of testing, wherein the first test video comprises the track of the at least one test event generated in the process of testing the region to be tested. And then generating a second test video according to the time point when the test object fails and the first test video, and finally determining a target test event which causes the test object to fail in the process of testing the region to be tested according to the second test video. The specific implementation process may refer to the process of generating the second video according to the first video and determining the target test event according to the second video, which are not described herein. Therefore, the method can not only detect the trace of the target test event in a verification manner, but also perform centralized test on the vicinity of the trace of the target test event, so that the efficiency of finding test faults can be effectively improved.
It should be noted that, determining the preset area including the track of the target test event according to the position information of the target test event refers to determining a circular area with a line segment between the two farthest points on the track of the target test event as a diameter, and taking the circular area as an area to be tested; or, determining two tangent circle areas with two endpoints of the track of the target test event as circle centers respectively, and taking the two tangent circle areas as the area to be tested.
In the embodiment of the application, the terminal equipment records at least one test event generated in the test process, and generates a first video for reproducing the track of the at least one test event according to the at least one test event. And then generating a second video according to the fault time point when the test object breaks down and the first video. And finally, determining a target test event which causes the test object to fail from at least one test event according to the second video. It can be seen that for either a test event that causes a change in the display interface or a test event that does not cause a change in the display interface (for operation of the hidden control), both the first video and the second video can reproduce the trajectory of the test event, which is not possible with a simple screen recording. And the second video is a video segment when the test object fails, so that the test failure can be automatically and accurately positioned. And finally, further determining the obtained target test event which causes the fault of the test object according to the second video, thereby rapidly determining the cause of the fault. Therefore, the method and the device can automatically check the test faults.
Referring to fig. 2, which is a schematic flow chart of a testing method according to another embodiment of the present application, the testing method shown in fig. 2 may include:
201: and in the process of testing the test object, acquiring the characteristic information of at least one test event generated for the test object.
202: and generating a first video according to the characteristic information of the at least one test event.
In one implementation mode, in the process of testing the test object, recording a screen of a display interface of the test object to obtain a recorded screen video; and then generating a first video according to the characteristic information of at least one test event and the recorded video.
In an embodiment, the feature information further includes an event type of a test event, and when the first video is generated, an event type of each of at least one test event is obtained first; then obtaining an animation effect corresponding to the event type of each test event; and finally, generating a first video according to the position information of each test event and the animation effect corresponding to the event type of each test event according to the sequence of the execution time of each test event. The event type of the moving event is moving, and the corresponding animation effect is linear connection; the event type of the clicking event is clicking, and the corresponding animation effect is a circle; the event type of the long-press event is long-press, and the corresponding animation effect is a rounded rectangle; the event type of the sliding event is sliding, and the corresponding animation effect is an arrow with a direction.
In one embodiment, the first video includes text information describing at least one test event. Specifically, the first video includes a track video and a text portion, for example, as shown in fig. 6. The text portion shown in fig. 6 is the text information described above for describing at least one test event. The text information displays the text information with preset number in a scrolling mode, and the text information with preset number comprises the text information corresponding to the currently played test event. The preset number may be any number, which is not limited in this application.
203: and acquiring a fault time point of the test object recorded in the test log.
204: and determining a target time period containing the fault time point, and intercepting a video segment corresponding to the target time period from the first video as a second video.
In the embodiment of the application, a target time period containing a fault time point is determined; and intercepting a video segment corresponding to the target time period from the first video, and taking the video segment as a second video. For example, a video of 3 seconds before and after the center of the failure time point in the first video is taken as the second video.
205: and determining the test event with the execution time closest to the fault time point from the test events contained in the second video as a target test event which leads to the fault of the test object.
In one embodiment, the most recent test event occurring before the time of execution at the point of failure is determined from at least one test event obtained during the test.
In one implementation manner, the terminal device frames the second video according to the fault time point to obtain at least one frame of picture; performing image analysis on the at least one frame of picture to determine a picture closest to the fault time point and containing a track, and taking the picture closest to the fault time point and containing the track as a target picture; and acquiring a test event corresponding to the target picture as a target test event which leads to the fault of the test object.
206: and determining a region to be tested of the test object according to the position information of the target test event and a preset range, and testing the region to be tested.
The method of the present application is described in more detail in the embodiments of the present application compared to the embodiments of the previous application. It should be noted that, the foregoing descriptions of the various embodiments are intended to emphasize the differences between the various embodiments, and the same or similar features thereof may be referred to each other for brevity and will not be repeated herein.
The embodiment of the application also provides a terminal device, which is used for executing the unit of the test method of any one of the above. Specifically, referring to fig. 3, a schematic block diagram of a terminal device is provided in an embodiment of the present application. The terminal device of the present embodiment includes: an acquisition unit 310, a generation unit 320, and a determination unit 330. Specific:
an obtaining unit 310, configured to obtain, during a process of testing a test object, feature information of at least one test event generated for the test object, where the feature information includes location information and execution time; a generating unit 320, configured to generate a first video according to the feature information of the at least one test event; the acquiring unit 310 is further configured to acquire a fault time point of the test object recorded in a test log; the generating unit 320 is further configured to generate a second video according to the failure time point and the first video; and the determining unit 330 is configured to determine, according to the second video, a target test event that causes the test object to fail from the at least one test event.
In an embodiment, the generating unit 320 is specifically configured to determine a target time period including the failure time point; and intercepting a video segment corresponding to the target time period from the first video, and taking the video segment as a second video.
In an implementation manner, the determining unit 330 is specifically configured to determine, from test events included in the second video, a test event whose execution time is closest to the fault time point; and taking the test event with the execution time closest to the fault time point as a target test event which leads to the fault of the test object.
In an implementation manner, the determining unit 330 is specifically configured to frame the second video according to the failure time point to obtain at least one frame of picture; performing image analysis on the at least one frame of picture to determine a picture closest to the fault time point and containing a track, and taking the picture closest to the fault time point and containing the track as a target picture; and acquiring a test event corresponding to the target picture as a target test event which causes the test object to fail.
In an implementation manner, the determining unit 330 is further configured to determine, according to the location information of the target test event, a region to be tested of the test object according to a preset range; the terminal device further comprises a testing unit 340, configured to test the area to be tested.
In an implementation manner, the generating unit 320 is specifically configured to record a screen of a display interface of the test object in a process of testing the test object, so as to obtain a recorded screen video; and generating a first video according to the characteristic information of the at least one test event and the screen recording video.
In an implementation manner, the generating unit 320 is specifically configured to obtain an event type of each of the at least one test event; acquiring an animation effect corresponding to the event type of each test event; and generating a first video according to the position information of each test event and the animation effect corresponding to the event type of each test event according to the sequence of the execution time of each test event.
In one embodiment, the first video includes text information describing the at least one test event.
Referring to fig. 4, a structural block diagram of a terminal device according to another embodiment of the present application is provided. The terminal device in the present embodiment as shown in fig. 4 may include: one or more processors 410 and a memory 420. The processor 410 and the memory 420 are connected by a bus 430. The memory 420 is used for storing a computer program comprising program instructions, and the processor 410 is used for executing the program instructions stored in the memory 420. Specific:
The processor 410 is configured to perform a function of the acquiring unit 310, and is configured to acquire, during a test of a test object, feature information of at least one test event generated for the test object, where the feature information includes location information and execution time; the processor 410 is further configured to perform a function of the generating unit 320, and generate a first video according to the feature information of the at least one test event; the processor 410 is further configured to obtain a fault time point of the test object recorded in a test log; the processor 410 is further configured to generate a second video according to the failure time point and the first video; the processor 410 is further configured to perform a function of the determining unit 330, and determine, from the at least one test event, a target test event that causes the test object to fail according to the second video.
In one implementation, the processor 410 is specifically configured to determine a target time period including the failure time point; and intercepting a video segment corresponding to the target time period from the first video, and taking the video segment as a second video.
In one embodiment, the processor 410 is specifically configured to determine, from test events included in the second video, a test event whose execution time is closest to the fault time point; and taking the test event with the execution time closest to the fault time point as a target test event which leads to the fault of the test object.
In an embodiment, the processor 410 is specifically configured to frame the second video according to the failure time point to obtain at least one frame of picture; performing image analysis on the at least one frame of picture to determine a picture closest to the fault time point and containing a track, and taking the picture closest to the fault time point and containing the track as a target picture; and acquiring a test event corresponding to the target picture as a target test event which causes the test object to fail.
In an embodiment, the processor 410 is further configured to determine a region to be tested of the test object according to a preset range according to the position information of the target test event; the terminal device further comprises a testing unit 340, configured to test the area to be tested.
In an implementation manner, the processor 410 is specifically configured to record a screen of a display interface of the test object during a testing process of the test object, so as to obtain a recorded screen video; and generating a first video according to the characteristic information of the at least one test event and the screen recording video.
In one implementation, the processor 410 is specifically configured to obtain an event type of each of the at least one test event; acquiring an animation effect corresponding to the event type of each test event; and generating a first video according to the position information of each test event and the animation effect corresponding to the event type of each test event according to the sequence of the execution time of each test event.
In one embodiment, the first video includes text information describing the at least one test event.
It should be appreciated that in embodiments of the present application, the processor 410 may be a central processing unit (Central Processing Unit, CPU), which may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 420 may include read only memory and random access memory and provides instructions and data to the processor 410. A portion of memory 420 may also include non-volatile random access memory. For example, the memory 420 may also store information of the device type.
In a specific implementation, the processor 410 described in the embodiment of the present application may execute the implementation manners described in the first embodiment and the second embodiment of the test method provided in the embodiment of the present application, and may also execute the implementation manner of the terminal device described in the embodiment of the present application, which is not described herein again.
In another embodiment of the present application, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program comprising program instructions for execution by a processor.
The computer readable storage medium may be an internal storage unit of the terminal device of any of the foregoing embodiments, for example, a hard disk or a memory of the terminal device. The computer readable storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device. Further, the computer-readable storage medium may also include both an internal storage unit of the terminal device and an external storage device. The computer-readable storage medium is used to store a computer program and other programs and data required for the terminal device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. The skilled person may use different test methods for each specific application to implement the described functionality, but such implementation should not be considered beyond the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the terminal device and unit described above may refer to the corresponding process in the foregoing test method embodiment, which is not described herein again.
In several embodiments provided in the present application, it should be understood that the disclosed terminal device and testing method may be implemented in other manners. For example, the above-described terminal device embodiments are merely illustrative, e.g., the division of units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, terminal devices, or units, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purposes of the embodiments of the present application.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a computer-readable storage medium, including several instructions for causing a computer device (which may be a personal computer, a terminal device, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned computer-readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (8)

1. A method of testing, comprising:
in the process of testing a test object, acquiring characteristic information of at least one test event generated for the test object, wherein the characteristic information comprises position information and execution time;
generating a first video according to the characteristic information of the at least one test event;
acquiring a fault time point of the test object recorded in a test log;
generating a second video according to the fault time point and the first video;
determining a target test event which causes the test object to fail from the at least one test event according to the second video;
determining a region to be tested of the test object according to the position information of the target test event and a preset range, and testing the region to be tested;
wherein the generating a first video according to the characteristic information of the at least one test event includes:
drawing tracks of all the test events according to the position information and execution time of all the test events in the at least one test event;
generating a first video according to the track of each test event;
wherein the determining, according to the second video, a target test event that causes the test object to fail from the at least one test event includes:
Framing the second video according to the fault time point to obtain at least one frame of picture;
performing image analysis on the at least one frame of picture to determine a picture closest to the fault time point and containing a track, and taking the picture closest to the fault time point and containing the track as a target picture;
and acquiring a test event corresponding to the target picture as a target test event which causes the test object to fail.
2. The method of claim 1, wherein the generating a second video from the point in time of the failure and the first video comprises:
determining a target time period containing the fault time point;
and intercepting a video segment corresponding to the target time period from the first video, and taking the video segment as a second video.
3. The method of claim 2, wherein the determining, from the at least one test event, a target test event that causes the test object to fail according to the second video comprises:
determining a test event with the execution time closest to the fault time point from the test events contained in the second video;
And taking the test event with the execution time closest to the fault time point as a target test event which leads to the fault of the test object.
4. A method according to any one of claims 1 to 3, wherein generating a first video from the characteristic information of the at least one test event comprises:
in the process of testing the test object, recording a screen of a display interface of the test object to obtain a screen recording video;
and generating a first video according to the characteristic information of the at least one test event and the screen recording video.
5. A method according to any one of claims 1 to 3, wherein the characteristic information further comprises an event type, and wherein generating the first video from the characteristic information of the at least one test event comprises:
acquiring an event type of each test event in the at least one test event;
acquiring an animation effect corresponding to the event type of each test event;
and generating a first video according to the position information of each test event and the animation effect corresponding to the event type of each test event according to the sequence of the execution time of each test event.
6. A method according to any one of claims 1-3, characterized in that the first video comprises text information describing the at least one test event.
7. A terminal device, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring characteristic information of at least one test event generated for a test object in the process of testing the test object, and the characteristic information comprises position information and execution time;
the generating unit is used for generating a first video according to the characteristic information of the at least one test event;
the acquisition unit is further used for acquiring the fault time point of the test object recorded in the test log;
the generating unit is further used for generating a second video according to the fault time point and the first video;
the determining unit is used for determining a target test event which causes the test object to fail from the at least one test event according to the second video;
the determining unit is further used for determining a region to be tested of the test object according to the position information of the target test event and a preset range;
the test unit is used for testing the region to be tested;
The generating unit is specifically configured to:
drawing tracks of all the test events according to the position information and execution time of all the test events in the at least one test event;
generating a first video according to the track of each test event;
wherein, the determining unit is specifically configured to:
framing the second video according to the fault time point to obtain at least one frame of picture;
performing image analysis on the at least one frame of picture to determine a picture closest to the fault time point and containing a track, and taking the picture closest to the fault time point and containing the track as a target picture;
and acquiring a test event corresponding to the target picture as a target test event which causes the test object to fail.
8. A terminal device comprising a processor and a memory, the processor and the memory being interconnected, wherein the memory is adapted to store a computer program comprising program instructions, the processor being configured to invoke the program instructions for performing the method according to any of claims 1-6.
CN201910705205.2A 2019-07-31 2019-07-31 Test method and terminal equipment Active CN110569184B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910705205.2A CN110569184B (en) 2019-07-31 2019-07-31 Test method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910705205.2A CN110569184B (en) 2019-07-31 2019-07-31 Test method and terminal equipment

Publications (2)

Publication Number Publication Date
CN110569184A CN110569184A (en) 2019-12-13
CN110569184B true CN110569184B (en) 2023-06-16

Family

ID=68773908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910705205.2A Active CN110569184B (en) 2019-07-31 2019-07-31 Test method and terminal equipment

Country Status (1)

Country Link
CN (1) CN110569184B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111130888B (en) * 2019-12-26 2021-02-26 珠海格力电器股份有限公司 Fault information collection and prompt method, device, storage medium and mobile terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201301996D0 (en) * 2012-02-10 2013-03-20 Xerox Corp Traffic camera diagnostics via test targets
CN104657902A (en) * 2015-03-12 2015-05-27 四川航天系统工程研究所 Integrated support intelligent terminal system for equipment and implementation method of intelligent terminal system

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810089B (en) * 2012-11-12 2021-12-03 Sap欧洲公司 Automatically testing gesture-based applications
CN106294109B (en) * 2015-05-27 2021-03-19 腾讯科技(深圳)有限公司 Method and device for acquiring defect code
CN106354578A (en) * 2016-08-25 2017-01-25 深圳市金立通信设备有限公司 Terminal testing method and terminal
US10372600B2 (en) * 2017-03-01 2019-08-06 Salesforce.Com, Inc. Systems and methods for automated web performance testing for cloud apps in use-case scenarios
CN108804302B (en) * 2017-05-04 2023-04-18 腾讯科技(深圳)有限公司 Remote testing method, system and related equipment
CN109388556B (en) * 2017-08-11 2022-03-04 航天信息股份有限公司 Method and device for analyzing test process
CN107967214A (en) * 2017-08-15 2018-04-27 北京摩拜科技有限公司 The test method and test equipment of application program
CN108664392B (en) * 2018-03-19 2019-08-06 重庆小雨点小额贷款有限公司 A kind of application testing method, device, terminal and storage medium
CN108595343A (en) * 2018-06-04 2018-09-28 北京汉能光伏投资有限公司 The test method and device of application program
CN110007981B (en) * 2019-02-28 2021-12-24 Oppo广东移动通信有限公司 Method and device for starting application program, electronic equipment and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201301996D0 (en) * 2012-02-10 2013-03-20 Xerox Corp Traffic camera diagnostics via test targets
CN104657902A (en) * 2015-03-12 2015-05-27 四川航天系统工程研究所 Integrated support intelligent terminal system for equipment and implementation method of intelligent terminal system

Also Published As

Publication number Publication date
CN110569184A (en) 2019-12-13

Similar Documents

Publication Publication Date Title
US10926184B2 (en) Synchronized video with in game telemetry
TWI509409B (en) Methods and systems for viewing log data recorded during execution of a program
US10114733B1 (en) System and method for automated testing of user interface software for visual responsiveness
US8116179B2 (en) Simultaneous viewing of multiple tool execution results
EP2179583B1 (en) Method and apparatus for automated content marking
CN109960642B (en) Automatic test method and device
US8086904B2 (en) Event-based setting of process tracing scope
US10162742B2 (en) System and method for end to end performance response time measurement based on graphic recognition
WO2014044164A1 (en) Content recording method and device
US20130036330A1 (en) Execution difference identification tool
US11813538B2 (en) Videogame telemetry data and game asset tracker for session recordings
CN108595332B (en) Software testing method and device
CN110569184B (en) Test method and terminal equipment
Zyrianov et al. Automated recording and semantics-aware replaying of high-speed eye tracking and interaction data to support cognitive studies of software engineering tasks
CN113824987A (en) Method, medium, device and computing equipment for determining time consumption of first frame of live broadcast room
Wu et al. AppCheck: a crowdsourced testing service for android applications
WO2018205392A1 (en) Control response area display control method, electronic apparatus, and storage medium
CN110502416B (en) Application clamping detection method and device, computer equipment and readable medium
EP3273689B1 (en) Method of testing the operation of a video player embedded in an electronic display device
CN109582566A (en) A kind of script method for recording
US10691524B2 (en) Diagnostic system and method
CN114443453A (en) Test data recording method, device, equipment and computer storage medium
US11715494B2 (en) Diagnostic system and method
CN110471841B (en) Method, device, medium and electronic equipment for comparing drawing information
US11966320B1 (en) Techniques for capturing software application session replay data from devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant