WO2018120720A1 - 客户端程序的测试错误定位方法、电子装置及存储介质 - Google Patents

客户端程序的测试错误定位方法、电子装置及存储介质 Download PDF

Info

Publication number
WO2018120720A1
WO2018120720A1 PCT/CN2017/091255 CN2017091255W WO2018120720A1 WO 2018120720 A1 WO2018120720 A1 WO 2018120720A1 CN 2017091255 W CN2017091255 W CN 2017091255W WO 2018120720 A1 WO2018120720 A1 WO 2018120720A1
Authority
WO
WIPO (PCT)
Prior art keywords
error
client program
screenshot
time point
time
Prior art date
Application number
PCT/CN2017/091255
Other languages
English (en)
French (fr)
Inventor
瞿庆
Original Assignee
上海壹账通金融科技有限公司
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 上海壹账通金融科技有限公司 filed Critical 上海壹账通金融科技有限公司
Publication of WO2018120720A1 publication Critical patent/WO2018120720A1/zh

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/3692Test management for test results analysis

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a test error positioning method for a client program, an electronic device, and a storage medium.
  • a software-like system usually before the go-live, usually needs to do the traversal test of the client program (the traversal test refers to the test of traversing all the controls) to generate a test report that can assist in locating the exception.
  • the main object of the present invention is to provide a test error location method, an electronic device and a storage medium for a client program, aiming at quickly and accurately locating client program errors in the traversal test.
  • a first aspect of the present invention provides a test error location method for a client program, which is applied to an electronic device, and the method includes the following steps:
  • the operation interface of the client program is screenshotd every first preset time, and each screenshot and its corresponding screenshot time point are associated and saved; A client program response error with a preset type occurs;
  • a second aspect of the present invention provides an electronic device, including a processing device, a storage device, and a test error location system of a client program, where the test error location system of the client program is stored in the storage
  • the device includes at least one computer readable instruction executable by the processing device to:
  • the operation interface of the client program is screenshotd every first preset time, and each screenshot and its corresponding screenshot time point are associated and saved; A client program response error with a preset type occurs;
  • a third aspect of the invention provides a computer readable storage medium having stored thereon at least one computer readable instruction executable by a processing device to:
  • the operation interface of the client program is screenshotd every first preset time, and each screenshot and its corresponding screenshot time point are associated and saved; A client program response error with a preset type occurs;
  • the operation interface of the client program is screenshotd every first preset time, and each screenshot and its corresponding screenshot time point are associated. Save; if there is a default type of client program response error, according to the saved associated data, find the screenshot corresponding to the error time point of the client program response error, and respond to the preset type of client program The error, the screenshot found, and the time point of the error are saved in association. Because the error time point of the client program error and its corresponding screenshot can be saved in association during the traversal test of the client program, the subsequent user can locate the stored program response error, according to the saved associated data. Quickly and accurately locate the error time point of the client program response error and its corresponding screenshots, without spending a lot of manpower and resources to locate, save cost, and locate more accurately.
  • FIG. 1 is a schematic diagram of an application environment of a preferred embodiment of a method for implementing a test error of a client program according to the present invention
  • FIG. 2 is a schematic flowchart of a first embodiment of a test error locating method for a client program according to the present invention
  • FIG. 3 is a schematic flowchart of a second embodiment of a test error locating method for a client program according to the present invention.
  • FIG. 4 is a schematic flowchart diagram of a third embodiment of a test error locating method for a client program according to the present invention.
  • FIG. 5 is a schematic flowchart of a fourth embodiment of a test error locating method for a client program according to the present invention.
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a test error location system of a client program according to the present invention.
  • FIG. 7 is a schematic diagram of functional modules of a second embodiment of a test error location system of a client program according to the present invention.
  • FIG. 1 it is a schematic diagram of an application environment of a preferred embodiment of a method for implementing a test error in a client program.
  • the application environment diagram includes an electronic device 1 and a terminal device 2.
  • the electronic device 1 can perform data interaction with the terminal device 2 through a suitable technology such as a network or a near field communication technology.
  • the terminal device 2 includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, or an individual.
  • PDA Personal Digital Assistant
  • game console Internet Protocol Television (IPTV)
  • smart wearable device etc.
  • the electronic device 1 is an apparatus capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance.
  • the electronic device 1 may be a computer, a single network server, a server group composed of multiple network servers, or a cloud-based cloud composed of a large number of hosts or network servers, where cloud computing is a type of distributed computing, A super virtual computer consisting of a loosely coupled set of computers.
  • the electronic device 1 includes, but is not limited to, a storage device 11, a processing device 12, and a network interface 13 that are communicably connected to each other through a system bus. It should be noted that FIG. 1 only shows the electronic device 1 having the components 11-13, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead.
  • the storage device 11 includes a memory and at least one type of readable storage medium.
  • the memory provides a cache for the operation of the electronic device 1;
  • the readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card type memory, or the like.
  • the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1; in other embodiments, the non-volatile storage medium may also be external to the electronic device 1.
  • a storage device such as a plug-in hard disk equipped with an electronic device 1, a smart memory card (SMC), a Secure Digital (SD) card, a flash card, or the like.
  • SMC smart memory card
  • SD Secure Digital
  • the readable storage medium of the storage device 11 is generally used to store an operating system installed on the electronic device 1 and various application software, for example, The program code of the test error locating system 10 of the client program in an embodiment of the present application. Further, the storage device 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • Processing device 12 may, in some embodiments, include one or more microprocessors, microcontrollers, digital processors, and the like.
  • the processing device 12 is generally used to control the operation of the electronic device 1, for example, to perform control and processing related to data interaction or communication with the terminal device 2.
  • the processing device 12 is configured to execute program code or processing data stored in the storage device 11, such as a test error location system 10 that runs a client program, and the like.
  • the network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 1 and other electronic devices.
  • the network interface 13 is mainly used to connect the electronic device 1 with one or more terminal devices 2, and establish a data transmission channel and a communication connection between the electronic device 1 and one or more terminal devices 2.
  • the test error location system 10 of the client program includes at least one computer readable instruction stored in the storage device 11, the at least one computer readable instruction being executable by the processing device 12 to implement the client program of various embodiments of the present application. Test the error location method. As described later, the at least one computer readable instruction can be classified into different logic modules depending on the functions implemented by its various parts.
  • the test error location system 10 of the client program when executed by the processing device 12, the following operations are performed: during the traversal test of the client program, the client program is performed every first preset time.
  • the operation interface performs screenshots, and saves each screenshot and its corresponding screenshot time points; analyzes whether a preset type of client program response error occurs; if a preset type of client program response error occurs, then Recording the error time point of the client program response error of the preset type; according to the saved screenshot and the associated data of the screenshot time point, finding a screenshot corresponding to the error time point, and setting the client program of the preset type
  • the response error, the found screenshot and the error time point are associated and saved, so that the user can find the corresponding screenshot and the error time point according to the client program response error, and perform error analysis.
  • FIG. 2 is a schematic flowchart diagram of a first embodiment of a test error locating method for a client program according to the present invention.
  • the test error locating method of the client program of this embodiment is not limited to the steps shown in the flow, and in addition, some of the steps shown in the flowchart may be omitted, and the order between the steps may be changed.
  • test error location method of the client program includes:
  • step S10 during the traversal test of the client program, the operation interface of the client program is screenshotd every first preset time, and each screenshot and its corresponding screenshot time point are associated and saved; Whether there is a preset type of client program response error occurs;
  • the operation interface of the client program is taken every first preset time (for example, 0.5 seconds), and the screenshot and its corresponding screenshot time point are taken. Save the association.
  • the first preset time may be fixed, that is, the operation interface of the client program is screenshotd every fixed first preset time during the entire traversal test, according to different precision requirements of the positioning error, Increase or decrease the first preset The size of the time; the first preset time can also be floating.
  • the part of the client program that is often erroneous or error-prone during the traversal test can be set to a lower first preset time to more accurately capture more screenshots with errors;
  • the client program is less error-prone or less error-prone during the traversal test, and can be set to a higher first preset time to reduce the frequency of interception, and reduce the operating load of the system without affecting the wrong positioning effect. .
  • client program response errors may occur, such as ANR (Application Not Responding), client program crash (Crash), client program. Error (Error), etc.
  • ANR Application Not Responding
  • client program crash Crash
  • client program. Error Error
  • the client program response error type that needs to be tested and located is selected according to the needs of the actual application, and the operation interface of the client program is screenshotd at the first preset time, and the real-time or timing analysis is performed. Is there a default type of client program response error? For example, in one embodiment, a keyword filtering analysis of the client program log may be performed to determine whether a preset type of client program response error occurs.
  • Step S20 if a response error occurs in a preset type of client program, recording an error time point at which the client program response error of the preset type occurs;
  • Step S30 Find a screenshot corresponding to the error time point according to the saved screenshot and the associated data of the screenshot time point, and perform the response of the preset type of the client program, the found screenshot, and the error time point.
  • the association is saved, so that the user can find the corresponding screenshot and the wrong time point according to the response of the client program, and perform error analysis.
  • a client program response error of a preset type occurs in real time or periodically, the error is detected according to the error time point of the client program that generates the preset type, and is stored every first preset time.
  • the screenshot of the operation interface of the client program is searched for in the associated data of the screenshot time point, and the screenshot corresponding to the error time point of the response of the client program of the preset type is found, and the preset type of the client is found.
  • the end program responds with an error, the time point of the error, and the corresponding screenshot found.
  • the user when the user needs to locate the problem of the client program response error of the preset type, the user can quickly and accurately find the error time point of the client program response error of the preset type from the saved associated data and the A screenshot of the operation interface of the client program corresponding to the error time point, realizing a fast and accurate positioning of the response error of the client program of the preset type.
  • the error analysis may be performed based on the saved preset type of client program response error, the found screenshot, and the associated data of the error time point. For example, the user can learn from the saved associated data that all preset types of client program response errors and their occurrences occur during the traversal test of the client program, and the user can also learn from the saved associated data.
  • the error time point of the default type of client program response error occurs, and the screenshot of the operation interface of the client program corresponding to the error time point, that is, the client type response error of the preset type occurs when the client A screenshot of the operation interface of the program, so that the user analyzes the reason for the response error of the client program at the time according to the screenshot of the operation interface of the client program when the error occurs, so as to make an error for each preset type of client program response error. analysis.
  • the operation interface of the client program is screenshotd every first preset time, and each screenshot and its corresponding screenshot time point are associated and saved; If the default type of client program response error occurs, the screenshot corresponding to the error time point of the client program response error is found according to the saved associated data, and the client program of the preset type responds incorrectly and finds The screenshot is saved in association with the error time point. Because the error time point of the client program error and its corresponding screenshot can be saved in association during the traversal test of the client program, the subsequent user can locate the stored program response error, according to the saved associated data. Quickly and accurately locate the error time point of the client program response error and its corresponding screenshots, without spending a lot of manpower and resources to locate, save cost, and locate more accurately.
  • a second embodiment of the present invention provides a test error location method for a client program.
  • the foregoing step S20 is replaced by:
  • step S40 if a response error of the client program of the preset type occurs, the error time point of the response error of the client program of the preset type is recorded, and the corresponding error time period is determined based on the preset rule and the error time point. ;
  • step S30 is replaced by:
  • Step S50 according to the saved screenshot and the associated data of the screenshot time point, find a screenshot of the screenshot time point belonging to the error time period, and respond to the error of the preset type of client program, find the screenshot, and the error time point. And the error time period is associated and saved, so that the user can find the corresponding screenshot, the error time point and the error time period according to the response error of the client program, and perform error analysis.
  • the preset time is based on the preset.
  • the rule and the time point of the error determine the corresponding error time period.
  • the corresponding error time period may be determined according to the previous time period of the error time point, and the corresponding error time period may also be determined according to the later time period of the error time point, and the like.
  • determining a corresponding error time period based on the preset rule and the error time point may include: advancing the error time point by a second preset time (for example, 2 seconds) to determine a time lower limit value.
  • the preset time (for example, 3 seconds) is used to determine the time upper limit value (for example, if the error time point is 9:30:50, the error time point is pushed back by 3 seconds, and the determined time upper limit is 9 Point 30 minutes 53 seconds), the second preset time is the same as or different from the third preset time; determining an error time period corresponding to the error time point based on the time lower limit value and the upper time limit value (for example, The error time period can be 9:30:48 to 9:30:53).
  • the determined error time period searching for the screenshot of the operation interface of the client program and the data of the screenshot time point at every first preset time saved, and finding out that the screenshot time point falls into the error time.
  • a screenshot of the segment range, and the client program of the preset type responds incorrectly
  • the corresponding screenshots, the time points of the errors, and the time segments of the errors are associated and saved.
  • the user can quickly and accurately find the error time point and error of the client program response error of the preset type from the saved associated data.
  • the time period, and the screenshot of the operation interface of the client program corresponding to the error time point and the error time period realize fast and accurate positioning of the response error of the client program of the preset type. Since it is possible to locate the error time period in which the client program response error of the preset type occurs, that is, to obtain a screenshot of the error of the client program response error of the preset type, it is more advantageous for the user to occur. A comprehensive analysis of the cause and effect of the type of client program response error is convenient for the user to perform accurate error analysis.
  • a third embodiment of the present invention provides a test error location method for a client program.
  • the foregoing step S50 is replaced by:
  • Step S60 according to the saved screenshot and the associated data of the screenshot time point, find a screenshot of the screenshot time point belonging to the error time period, and obtain a server log belonging to the error time period from the server end corresponding to the client program;
  • Step S70 the preset type of client program response error, the found screenshot, the obtained server log, the error time point, and/or the error time period are associated and saved, so that the user can find a corresponding response according to the client program response error. Screenshots, server logs, error time points and/or error time periods, and error analysis.
  • the server log belonging to the error time period is also obtained from the server end corresponding to the client program, and the client program response of the preset type is responded. Errors, screenshots found, server logs obtained, time points of the error, and/or error time periods are associated and saved.
  • the user when the user needs to locate the problem of the default type of client program response error, the user can quickly and accurately find the error time point of the client program response error of the preset type from the saved associated data and/or Or the error time period, the screenshot of the operation interface of the client program corresponding to the error time point and/or the error time period, and the corresponding server log.
  • the user can locate the client of the preset type because the error time period of the client program response error of the preset type can be located and the server log of the server end corresponding to the client program within the error time period
  • the program responds to the error in the continuation time of the corresponding server-side server log for problem location, which is more conducive to accurate error analysis of the client program response error in the case of a client-side program response error due to a server-side error.
  • the fourth embodiment of the present invention provides a method for locating a test error of a client program, and based on the foregoing embodiment, the method further includes:
  • Step S80 classifying the associated data of all client program response errors, screenshots, error time points, and/or error time periods according to the type of the client program response error, and the same type of client program response error corresponding to the The associated data is classified into one class, and the associated data corresponding to different types of client program response errors are classified into different classes, and a test report is generated according to the classified result. Report.
  • the client program may respond to different types of errors according to the client program.
  • the associated data corresponding to the client program response error of the same type is classified into one class, and the associated data corresponding to different types of client program response errors are classified into different classes, and a test report is generated according to the result of the classification.
  • the test report may include an error quantity statistical report of each category, a screenshot summary report of each category, and the like, and the user may perform error analysis on different types of client program response errors according to the generated test report.
  • the invention further provides a test error location system for a client program.
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a test error location system 10 of a client program according to the present invention.
  • test error location system 10 of the client program includes:
  • the screenshot analysis module 01 is configured to take a screenshot of the operation interface of the client program every first preset time during the traversal test of the client program, and perform each screenshot and its corresponding screenshot time point. Association save; analyze whether there is a preset type of client program response error occurs;
  • the operation interface of the client program is taken every first preset time (for example, 0.5 seconds), and the screenshot and its corresponding screenshot time point are taken. Save the association.
  • the first preset time may be fixed, that is, the operation interface of the client program is screenshotd every fixed first preset time during the entire traversal test, according to different precision requirements of the positioning error, The size of the first preset time is raised or lowered; the first preset time may also be floating.
  • the part of the client program that is often erroneous or error-prone during the traversal test can be set to a lower first preset time to more accurately capture more screenshots with errors;
  • the client program is less error-prone or less error-prone during the traversal test, and can be set to a higher first preset time to reduce the frequency of interception, and reduce the operating load of the system without affecting the wrong positioning effect. .
  • client program response errors may occur, such as ANR (Application Not Responding), client program crash (Crash), client program. Error (Error), etc.
  • ANR Application Not Responding
  • client program crash Crash
  • client program. Error Error
  • the client program response error type that needs to be tested and located is selected according to the needs of the actual application, and the operation interface of the client program is screenshotd at the first preset time, and the real-time or timing analysis is performed. Is there a default type of client program response error? For example, in one embodiment, a keyword filtering analysis of the client program log may be performed to determine whether a preset type of client program response error occurs.
  • the recording module 02 is configured to record, when a client program response error of a preset type occurs, an error time point at which the client program response error of the preset type occurs;
  • the association saving module 03 is configured to find a screenshot corresponding to the error time point according to the saved screenshot and the associated data of the screenshot time point, and respond to the error of the preset type of client program, the found screenshot, and the description.
  • the error time point is associated and saved, so that the user can find the corresponding screenshot and the error time point according to the response of the client program, and perform error analysis.
  • a client program response error of a preset type occurs in real time or periodically, the error is detected according to the error time point of the client program that generates the preset type, and is stored every first preset time.
  • the screenshot of the operation interface of the client program is searched for in the associated data of the screenshot time point, and the screenshot corresponding to the error time point of the response of the client program of the preset type is found, and the preset type of the client is found.
  • the end program responds with an error, the time point of the error, and the corresponding screenshot found.
  • the user when the user needs to locate the problem of the client program response error of the preset type, the user can quickly and accurately find the error time point of the client program response error of the preset type from the saved associated data and the A screenshot of the operation interface of the client program corresponding to the error time point, realizing a fast and accurate positioning of the response error of the client program of the preset type.
  • the error analysis may be performed based on the saved preset type of client program response error, the found screenshot, and the associated data of the error time point. For example, the user can learn from the saved associated data that all preset types of client program response errors and their occurrences occur during the traversal test of the client program, and the user can also learn from the saved associated data.
  • the error time point of the default type of client program response error occurs, and the screenshot of the operation interface of the client program corresponding to the error time point, that is, the client type response error of the preset type occurs when the client A screenshot of the operation interface of the program, so that the user analyzes the reason for the response error of the client program at the time according to the screenshot of the operation interface of the client program when the error occurs, so as to make an error for each preset type of client program response error. analysis.
  • the operation interface of the client program is screenshotd every first preset time, and each screenshot and its corresponding screenshot time point are associated and saved; If the default type of client program response error occurs, the screenshot corresponding to the error time point of the client program response error is found according to the saved associated data, and the client program of the preset type responds incorrectly and finds The screenshot is saved in association with the error time point. Because the error time point of the client program error and its corresponding screenshot can be saved in association during the traversal test of the client program, the subsequent user can locate the stored program response error, according to the saved associated data. Quickly and accurately locate the error time point of the client program response error and its corresponding screenshots, without spending a lot of manpower and resources to locate, save cost, and locate more accurately.
  • the foregoing recording module 02 is further configured to:
  • the error time point of the client program response error of the preset type is recorded, and the corresponding error time period is determined based on the preset rule and the error time point;
  • the association saving module 03 is further configured to:
  • the saved screenshot and the associated data of the screenshot time point find a screenshot of the screenshot time point belonging to the error time period, and respond to the error of the preset type of client program, the screenshot found, the error time point and the error time.
  • the segment is saved in association, so that the user can find the corresponding screenshot, the wrong time point and the error time period according to the response error of the client program, and perform error analysis.
  • the preset time is based on the preset.
  • the rule and the time point of the error determine the corresponding error time period.
  • the corresponding error time period may be determined according to the previous time period of the error time point, and the corresponding error time period may also be determined according to the later time period of the error time point, and the like.
  • determining a corresponding error time period based on the preset rule and the error time point may include: advancing the error time point by a second preset time (for example, 2 seconds) to determine a time lower limit value.
  • the preset time (for example, 3 seconds) is used to determine the time upper limit value (for example, if the error time point is 9:30:50, the error time point is pushed back by 3 seconds, and the determined time upper limit is 9 Point 30 minutes 53 seconds), the second preset time is the same as or different from the third preset time; determining an error time period corresponding to the error time point based on the time lower limit value and the upper time limit value (for example, The error time period can be 9:30:48 to 9:30:53).
  • the determined error time period searching for the screenshot of the operation interface of the client program and the data of the screenshot time point at every first preset time saved, and finding out that the screenshot time point falls into the error time.
  • a screenshot of the segment range, and the client program response error of the preset type, the corresponding screenshot found, the error time point, and the error time period are associated and saved.
  • the time period, and the screenshot of the operation interface of the client program corresponding to the error time point and the error time period realize fast and accurate positioning of the response error of the client program of the preset type.
  • association saving module 03 is further configured to:
  • the saved screenshot and the associated data of the screenshot time point find a screenshot of the screenshot time point belonging to the error time period, and obtain a server log belonging to the error time period from the server end corresponding to the client program;
  • the client program responds to the error, finds the screenshot, the obtained server log, the error time point and/or the error time period, and saves it for the user to find the corresponding screenshot, server log, error time according to the client program response error.
  • Point and/or error time period and perform error analysis.
  • the server log belonging to the error time period is also obtained from the server end corresponding to the client program, and the client program response of the preset type is responded. Errors, screenshots found, server logs obtained, time points of the error, and/or error time periods are associated and saved.
  • the user when the user needs to locate the problem of the default type of client program response error, the user can quickly and accurately find the error time point of the client program response error of the preset type from the saved associated data and/or Or the error time period, the screenshot of the operation interface of the client program corresponding to the error time point and/or the error time period, and the corresponding server log.
  • the user can locate the client of the preset type because the error time period of the client program response error of the preset type can be located and the server log of the server end corresponding to the client program within the error time period
  • the program responds to the error in the continuation time of the corresponding server-side server log for problem location, which is more conducive to accurate error analysis of the client program response error in the case of a client-side program response error due to a server-side error.
  • the second embodiment of the present invention provides a test error locating system 10 for a client program. Based on the foregoing embodiments, the method further includes:
  • the classification module 04 is configured to classify all the client program response errors, screenshots, error time points and/or associated data of the error time period according to the type of the client program response error, and respond to the same type of client program response error.
  • the associated data is classified into one class, and the associated data corresponding to different types of client program response errors are classified into different classes, and a test report is generated according to the classified result.
  • the client program may respond to different types of errors according to the client program.
  • the associated data corresponding to the client program response error of the same type is classified into one class, and the associated data corresponding to different types of client program response errors are classified into different classes, and a test report is generated according to the result of the classification.
  • the test report may include an error quantity statistical report of each category, a screenshot summary report of each category, and the like, and the user may perform error analysis on different types of client program response errors according to the generated test report.

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

一种客户端程序的测试错误定位方法、电子装置及存储介质。该方法包括:在对客户端程序进行遍历测试过程中,每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;分析是否有预设类型的客户端程序响应错误发生(S10);若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点(S20);根据保存的截图与截图时间点的关联数据,找出所述错误时间点对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及所述错误时间点进行关联保存,以供用户根据客户端程序响应错误找到对应的截图及错误时间点,并进行错误分析(S30)。该方法能快速准确地定位遍历测试中的客户端程序错误。

Description

客户端程序的测试错误定位方法、电子装置及存储介质
优先权申明
本申请基于巴黎公约申明享有2016年12月30日递交的申请号为CN201611265752.6、名称为“客户端程序的测试错误定位方法及装置”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本发明涉及计算机技术领域,尤其涉及一种客户端程序的测试错误定位方法、电子装置及存储介质。
背景技术
目前,对于基于CS运行架构(即:客户端—服务器端运行架构)的软件系统(该软件系统包括客户端程序和服务器端程序)而言,为了防止在上线后出现严重的系统错误,针对这类软件系统,在上线之前,通常需要做客户端程序的遍历测试(所述遍历测试指的是遍历所有控件的测试),以生成能辅助定位异常的测试报告。
然而,现有传统的遍历测试及其报告,只能给出发现的问题,之后还需要开发人员和测试人员花费大量的时间和精力去定位发现的问题,如遇到偶发性、很难重现的问题,可能会耗费更多地资源去定位,浪费人力物力,且容易出错。
发明内容
本发明的主要目的在于提供一种客户端程序的测试错误定位方法、电子装置及存储介质,旨在快速准确地定位遍历测试中的客户端程序错误。
本发明第一方面提供一种客户端程序的测试错误定位方法,应用于电子装置中,所述方法包括以下步骤:
A、在对客户端程序进行遍历测试过程中,每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;分析是否有预设类型的客户端程序响应错误发生;
B、若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点;
C、根据保存的截图与截图时间点的关联数据,找出所述错误时间点对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及所述错误时间点进行关联保存,以供用户根据客户端程序响应错误找到对应的截图及错误时间点,并进行错误分析。
本发明第二方面提供一种电子装置,包括处理设备、存储设备及客户端程序的测试错误定位系统,该客户端程序的测试错误定位系统存储于该存储 设备中,包括至少一个计算机可读指令,该至少一个计算机可读指令可被所述处理设备执行,以实现以下操作:
A、在对客户端程序进行遍历测试过程中,每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;分析是否有预设类型的客户端程序响应错误发生;
B、若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点;
C、根据保存的截图与截图时间点的关联数据,找出所述错误时间点对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及所述错误时间点进行关联保存,以供用户根据客户端程序响应错误找到对应的截图及错误时间点,并进行错误分析。
本发明第三方面提供一种计算机可读存储介质,其上存储有至少一个可被处理设备执行以实现以下操作的计算机可读指令:
A、在对客户端程序进行遍历测试过程中,每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;分析是否有预设类型的客户端程序响应错误发生;
B、若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点;
C、根据保存的截图与截图时间点的关联数据,找出所述错误时间点对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及所述错误时间点进行关联保存,以供用户根据客户端程序响应错误找到对应的截图及错误时间点,并进行错误分析。
本发明提出的技术方案,在对客户端程序进行遍历测试过程中每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;若有预设类型的客户端程序响应错误发生,则根据保存的关联数据,找出该客户端程序响应错误的错误时间点所对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及该错误时间点进行关联保存。由于在对客户端程序进行遍历测试过程中能将客户端程序发生错误的错误时间点及其对应的截图进行关联保存,后续用户在定位该客户端程序响应错误时,即可根据保存的关联数据快速准确地定位该客户端程序响应错误的错误时间点及其对应的截图,而无需耗费大量的人力物力来进行定位,节约了成本,且定位更加准确。
附图说明
图1是本发明实现客户端程序的测试错误定位方法的较佳实施例的应用环境示意图;
图2为本发明客户端程序的测试错误定位方法第一实施例的流程示意图;
图3为本发明客户端程序的测试错误定位方法第二实施例的流程示意图;
图4为本发明客户端程序的测试错误定位方法第三实施例的流程示意图;
图5为本发明客户端程序的测试错误定位方法第四实施例的流程示意图;
图6为本发明客户端程序的测试错误定位系统第一实施例的功能模块示意图;
图7为本发明客户端程序的测试错误定位系统第二实施例的功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
为了使本发明所要解决的技术问题、技术方案及有益效果更加清楚、明白,以下结合附图和实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
参阅图1所示,是本发明实现客户端程序的测试错误定位方法的较佳实施例的应用环境示意图。所述应用环境示意图包括电子装置1、终端设备2。所述电子装置1可以通过网络、近场通信技术等适合的技术与所述终端设备2进行数据交互。
终端设备2包括,但不限于,任何一种可与用户通过键盘、鼠标、遥控器、触摸板或者声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA),游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴设备等。
电子装置1是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。电子装置1可以是计算机、也可以是单个网络服务器、多个网络服务器组成的服务器组或者基于云计算的由大量主机或者网络服务器构成的云,其中云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。
在本实施例中,电子装置1包括,但不仅限于,可通过系统总线相互通信连接的存储设备11、处理设备12、及网络接口13。需要指出的是,图1仅示出了具有组件11-13的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
其中,存储设备11包括内存及至少一种类型的可读存储介质。内存为电子装置1的运行提供缓存;可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器等的非易失性存储介质。在一些实施例中,可读存储介质可以是电子装置1的内部存储单元,例如该电子装置1的硬盘;在另一些实施例中,该非易失性存储介质也可以是电子装置1的外部存储设备,例如电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。本实施例中,存储设备11的可读存储介质通常用于存储安装于电子装置1的操作系统和各类应用软件,例如 本申请一实施例中的客户端程序的测试错误定位系统10的程序代码等。此外,存储设备11还可以用于暂时地存储已经输出或者将要输出的各类数据。
处理设备12在一些实施例中可以包括一个或者多个微处理器、微控制器、数字处理器等。该处理设备12通常用于控制电子装置1的运行,例如执行与终端设备2进行数据交互或者通信相关的控制和处理等。在本实施例中,处理设备12用于运行存储设备11中存储的程序代码或者处理数据,例如运行客户端程序的测试错误定位系统10等。
网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在电子装置1与其他电子设备之间建立通信连接。本实施例中,网络接口13主要用于将电子装置1与一个或多个终端设备2相连,在电子装置1与一个或多个终端设备2之间建立数据传输通道和通信连接。
客户端程序的测试错误定位系统10包括至少一个存储在存储设备11中的计算机可读指令,该至少一个计算机可读指令可被处理设备12执行,以实现本申请各实施例的客户端程序的测试错误定位方法。如后续所述,该至少一个计算机可读指令依据其各部分所实现的功能不同,可被划为不同的逻辑模块。
在一实施例中,客户端程序的测试错误定位系统10被处理设备12执行时,实现以下操作:在对客户端程序进行遍历测试过程中,每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;分析是否有预设类型的客户端程序响应错误发生;若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点;根据保存的截图与截图时间点的关联数据,找出所述错误时间点对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及所述错误时间点进行关联保存,以供用户根据客户端程序响应错误找到对应的截图及错误时间点,并进行错误分析。
参照图2,图2为本发明客户端程序的测试错误定位方法第一实施例的流程示意图。本实施例客户端程序的测试错误定位方法并不限于流程中所示的步骤,此外流程图中所示步骤中,某些步骤可以省略、步骤之间的顺序可以改变。
在第一实施例中,该客户端程序的测试错误定位方法包括:
步骤S10,在对客户端程序进行遍历测试过程中,每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;分析是否有预设类型的客户端程序响应错误发生;
在客户端程序上线之前,通常需要做客户端程序的遍历测试,即遍历所有控件的测试。本实施例中,在对客户端程序进行遍历测试过程中,每隔第一预设时间(例如,0.5秒)对该客户端程序的操作界面进行截图,并将截图及其对应的截图时间点进行关联保存。该第一预设时间可以是固定不变的,即在整个遍历测试过程中每隔固定的第一预设时间对该客户端程序的操作界面进行截图,根据定位错误的不同精度要求,可适当调高或调低该第一预设 时间的大小;该第一预设时间也可以是浮动的。例如,根据历史数据或经验,针对客户端程序在遍历测试过程中经常出错或容易出错的环节,可设置成较低的第一预设时间,以更加精确地截取更多出现错误的截图;针对客户端程序在遍历测试过程中较少出错或不易出错的环节,可设置成较高的第一预设时间,以减少截取的频率,在不影响错误定位效果的情况下,减轻系统的运行负担。
在对客户端程序进行遍历测试过程中,可能会出现各种不同类型的客户端程序响应错误,如客户端程序无响应(ANR:Application Not Responding)、客户端程序崩溃(Crash)、客户端程序错误(Error)等。本实施例中可根据实际应用的需要选择需测试和定位错误的客户端程序响应错误类型,在每隔第一预设时间对所述客户端程序的操作界面进行截图的同时,实时或者定时分析是否有预设类型的客户端程序响应错误发生。例如,在一种实施方式中,可以通过对客户端程序日志进行关键字过滤分析,确定是否有预设类型的客户端程序响应错误发生。
步骤S20,若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点;
步骤S30,根据保存的截图与截图时间点的关联数据,找出所述错误时间点对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及所述错误时间点进行关联保存,以供用户根据客户端程序响应错误找到对应的截图及错误时间点,并进行错误分析。
当实时或者定时的分析出有预设类型的客户端程序响应错误发生时,根据发生该预设类型的客户端程序响应错误的错误时间点,在保存的每隔第一预设时间对所述客户端程序的操作界面的截图与其截图时间点的关联数据中进行查找,找出与发生该预设类型的客户端程序响应错误的错误时间点相对应的截图,并将该预设类型的客户端程序响应错误、该错误时间点及找出的对应截图进行关联保存。这样,用户在后续需要对预设类型的客户端程序响应错误进行问题定位时,即可从保存的关联数据中快速准确地找到发生该预设类型的客户端程序响应错误的错误时间点以及该错误时间点下对应的该客户端程序的操作界面的截图,实现对该预设类型的客户端程序响应错误的快速准确定位。用户在对该客户端程序进行错误分析时,可基于保存的预设类型的客户端程序响应错误、找出的截图及所述错误时间点的关联数据来进行错误分析。例如,用户可从保存的关联数据中获知在对该客户端程序进行遍历测试过程中发生的所有预设类型的客户端程序响应错误及其发生次数,用户还可从保存的关联数据中获知每一次发生预设类型的客户端程序响应错误的错误时间点,以及该错误时间点下对应的该客户端程序的操作界面的截图,也即发生预设类型的客户端程序响应错误时该客户端程序的操作界面的截图,以便用户根据发生错误时该客户端程序的操作界面的截图来分析当时发生该客户端程序响应错误的原因,以对每一预设类型的客户端程序响应错误进行错误分析。
本实施例在对客户端程序进行遍历测试过程中每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;若有预设类型的客户端程序响应错误发生,则根据保存的关联数据,找出该客户端程序响应错误的错误时间点所对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及该错误时间点进行关联保存。由于在对客户端程序进行遍历测试过程中能将客户端程序发生错误的错误时间点及其对应的截图进行关联保存,后续用户在定位该客户端程序响应错误时,即可根据保存的关联数据快速准确地定位该客户端程序响应错误的错误时间点及其对应的截图,而无需耗费大量的人力物力来进行定位,节约了成本,且定位更加准确。
如图3所示,本发明第二实施例提出一种客户端程序的测试错误定位方法,在上述实施例的基础上,上述步骤S20替换为:
步骤S40,若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点,并基于预设规则及该错误时间点确定对应的错误时间段;
上述步骤S30替换为:
步骤S50,根据保存的截图与截图时间点的关联数据,找出截图时间点属于该错误时间段的截图,并将该预设类型的客户端程序响应错误、找出的截图、该错误时间点及错误时间段进行关联保存,以供用户根据客户端程序响应错误找到对应的截图、错误时间点及错误时间段,并进行错误分析。
本实施例中,当实时或者定时的分析出有预设类型的客户端程序响应错误发生时,在记录发生该预设类型的客户端程序响应错误的错误时间点的基础上,还基于预设规则及该错误时间点确定对应的错误时间段。例如,可根据该错误时间点的前一段时间来确定对应的错误时间段,还可根据该错误时间点的后一段时间来确定对应的错误时间段,等等。在一种实施方式中,基于预设规则及该错误时间点确定对应的错误时间段的方式可以包括:将该错误时间点提前第二预设时间(例如,2秒)以确定时间下限值(例如,若该错误时间点为9点30分50秒,则将该错误时间点提前2秒,确定的时间下限值为9点30分48秒);将该错误时间点推后第三预设时间(例如,3秒)以确定时间上限值(例如,若该错误时间点为9点30分50秒,则将该错误时间点推后3秒,确定的时间上限值为9点30分53秒),所述第二预设时间与第三预设时间相同或者不同;基于所述时间下限值和时间上限值确定出该错误时间点对应的错误时间段(例如,该错误时间段可以为9点30分48秒至9点30分53秒)。
根据确定出的错误时间段,在保存的每隔第一预设时间对所述客户端程序的操作界面的截图与其截图时间点的关联数据中进行查找,找出截图时间点落入该错误时间段范围的截图,并将该预设类型的客户端程序响应错误、 找出的对应截图、该错误时间点及错误时间段进行关联保存。这样,用户在后续需要对预设类型的客户端程序响应错误进行问题定位时,即可从保存的关联数据中快速准确地找到发生该预设类型的客户端程序响应错误的错误时间点及错误时间段,以及该错误时间点及错误时间段下对应的该客户端程序的操作界面的截图,实现对该预设类型的客户端程序响应错误的快速准确定位。由于能定位到发生该预设类型的客户端程序响应错误的错误时间段,即获取发生该预设类型的客户端程序响应错误的错误前后延续时间内的截图,更加有利于用户对发生该预设类型的客户端程序响应错误的前因后果进行综合分析,便于用户进行准确地错误分析。
如图4所示,本发明第三实施例提出一种客户端程序的测试错误定位方法,在上述实施例的基础上,上述步骤S50替换为:
步骤S60,根据保存的截图与截图时间点的关联数据,找出截图时间点属于该错误时间段的截图,并从该客户端程序对应的服务器端获取属于该错误时间段的服务器日志;
步骤S70,将该预设类型的客户端程序响应错误、找出的截图、获取的服务器日志、该错误时间点及/或错误时间段进行关联保存,以供用户根据客户端程序响应错误找到对应的截图、服务器日志、错误时间点及/或错误时间段,并进行错误分析。
本实施例中,找出截图时间点属于该错误时间段的截图之后,还从该客户端程序对应的服务器端获取属于该错误时间段的服务器日志,并将该预设类型的客户端程序响应错误、找出的截图、获取的服务器日志、该错误时间点及/或错误时间段进行关联保存。
这样,用户在后续需要对预设类型的客户端程序响应错误进行问题定位时,即可从保存的关联数据中快速准确地找到发生该预设类型的客户端程序响应错误的错误时间点及/或错误时间段,该错误时间点及/或错误时间段下对应的该客户端程序的操作界面的截图,以及相对应的服务器日志。由于能定位到发生该预设类型的客户端程序响应错误的错误时间段以及在该错误时间段内与该客户端程序相对应的服务器端的服务器日志,用户可针对发生该预设类型的客户端程序响应错误的错误前后延续时间内对应的服务器端的服务器日志进行问题定位,更加有利于在因服务器端的错误导致客户端程序响应错误的情况下,用户对客户端程序响应错误进行准确地错误分析。
如图5所示,本发明第四实施例提出一种客户端程序的测试错误定位方法,在上述实施例的基础上,还包括:
步骤S80,对所有客户端程序响应错误、截图、错误时间点及/或错误时间段的关联数据,按照客户端程序响应错误的类型进行分类,将同一类型的客户端程序响应错误对应的所述关联数据归为一类,将不同类型的客户端程序响应错误对应的所述关联数据归为不同类,并根据分类的结果生成测试报 告。
本实施例中,在获取到整个遍历测试过程中发生的客户端程序响应错误及其对应的截图、错误时间点及/或错误时间段的关联数据后,可按照客户端程序响应错误的不同类型进行分类,同一类型的客户端程序响应错误对应的所述关联数据归为一类,不同类型的客户端程序响应错误对应的所述关联数据归为不同类,并根据分类的结果生成测试报告。例如,所述测试报告中可包括各个分类的错误数量统计报表、各个分类的截图汇总报表等,用户即可根据生成的测试报告从整体上对不同类型的客户端程序响应错误进行错误分析。
本发明进一步提供一种客户端程序的测试错误定位系统。
参照图6,图6为本发明客户端程序的测试错误定位系统10第一实施例的功能模块示意图。
在第一实施例中,该客户端程序的测试错误定位系统10包括:
截图分析模块01,用于在对客户端程序进行遍历测试过程中,每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;分析是否有预设类型的客户端程序响应错误发生;
在客户端程序上线之前,通常需要做客户端程序的遍历测试,即遍历所有控件的测试。本实施例中,在对客户端程序进行遍历测试过程中,每隔第一预设时间(例如,0.5秒)对该客户端程序的操作界面进行截图,并将截图及其对应的截图时间点进行关联保存。该第一预设时间可以是固定不变的,即在整个遍历测试过程中每隔固定的第一预设时间对该客户端程序的操作界面进行截图,根据定位错误的不同精度要求,可适当调高或调低该第一预设时间的大小;该第一预设时间也可以是浮动的。例如,根据历史数据或经验,针对客户端程序在遍历测试过程中经常出错或容易出错的环节,可设置成较低的第一预设时间,以更加精确地截取更多出现错误的截图;针对客户端程序在遍历测试过程中较少出错或不易出错的环节,可设置成较高的第一预设时间,以减少截取的频率,在不影响错误定位效果的情况下,减轻系统的运行负担。
在对客户端程序进行遍历测试过程中,可能会出现各种不同类型的客户端程序响应错误,如客户端程序无响应(ANR:Application Not Responding)、客户端程序崩溃(Crash)、客户端程序错误(Error)等。本实施例中可根据实际应用的需要选择需测试和定位错误的客户端程序响应错误类型,在每隔第一预设时间对所述客户端程序的操作界面进行截图的同时,实时或者定时分析是否有预设类型的客户端程序响应错误发生。例如,在一种实施方式中,可以通过对客户端程序日志进行关键字过滤分析,确定是否有预设类型的客户端程序响应错误发生。
记录模块02,用于若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点;
关联保存模块03,用于根据保存的截图与截图时间点的关联数据,找出所述错误时间点对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及所述错误时间点进行关联保存,以供用户根据客户端程序响应错误找到对应的截图及错误时间点,并进行错误分析。
当实时或者定时的分析出有预设类型的客户端程序响应错误发生时,根据发生该预设类型的客户端程序响应错误的错误时间点,在保存的每隔第一预设时间对所述客户端程序的操作界面的截图与其截图时间点的关联数据中进行查找,找出与发生该预设类型的客户端程序响应错误的错误时间点相对应的截图,并将该预设类型的客户端程序响应错误、该错误时间点及找出的对应截图进行关联保存。这样,用户在后续需要对预设类型的客户端程序响应错误进行问题定位时,即可从保存的关联数据中快速准确地找到发生该预设类型的客户端程序响应错误的错误时间点以及该错误时间点下对应的该客户端程序的操作界面的截图,实现对该预设类型的客户端程序响应错误的快速准确定位。用户在对该客户端程序进行错误分析时,可基于保存的预设类型的客户端程序响应错误、找出的截图及所述错误时间点的关联数据来进行错误分析。例如,用户可从保存的关联数据中获知在对该客户端程序进行遍历测试过程中发生的所有预设类型的客户端程序响应错误及其发生次数,用户还可从保存的关联数据中获知每一次发生预设类型的客户端程序响应错误的错误时间点,以及该错误时间点下对应的该客户端程序的操作界面的截图,也即发生预设类型的客户端程序响应错误时该客户端程序的操作界面的截图,以便用户根据发生错误时该客户端程序的操作界面的截图来分析当时发生该客户端程序响应错误的原因,以对每一预设类型的客户端程序响应错误进行错误分析。
本实施例在对客户端程序进行遍历测试过程中每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;若有预设类型的客户端程序响应错误发生,则根据保存的关联数据,找出该客户端程序响应错误的错误时间点所对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及该错误时间点进行关联保存。由于在对客户端程序进行遍历测试过程中能将客户端程序发生错误的错误时间点及其对应的截图进行关联保存,后续用户在定位该客户端程序响应错误时,即可根据保存的关联数据快速准确地定位该客户端程序响应错误的错误时间点及其对应的截图,而无需耗费大量的人力物力来进行定位,节约了成本,且定位更加准确。
进一步地,在其他实施例中,上述记录模块02还用于:
若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点,并基于预设规则及该错误时间点确定对应的错误时间段;
所述关联保存模块03还用于:
根据保存的截图与截图时间点的关联数据,找出截图时间点属于该错误时间段的截图,并将该预设类型的客户端程序响应错误、找出的截图、该错误时间点及错误时间段进行关联保存,以供用户根据客户端程序响应错误找到对应的截图、错误时间点及错误时间段,并进行错误分析。
本实施例中,当实时或者定时的分析出有预设类型的客户端程序响应错误发生时,在记录发生该预设类型的客户端程序响应错误的错误时间点的基础上,还基于预设规则及该错误时间点确定对应的错误时间段。例如,可根据该错误时间点的前一段时间来确定对应的错误时间段,还可根据该错误时间点的后一段时间来确定对应的错误时间段,等等。在一种实施方式中,基于预设规则及该错误时间点确定对应的错误时间段的方式可以包括:将该错误时间点提前第二预设时间(例如,2秒)以确定时间下限值(例如,若该错误时间点为9点30分50秒,则将该错误时间点提前2秒,确定的时间下限值为9点30分48秒);将该错误时间点推后第三预设时间(例如,3秒)以确定时间上限值(例如,若该错误时间点为9点30分50秒,则将该错误时间点推后3秒,确定的时间上限值为9点30分53秒),所述第二预设时间与第三预设时间相同或者不同;基于所述时间下限值和时间上限值确定出该错误时间点对应的错误时间段(例如,该错误时间段可以为9点30分48秒至9点30分53秒)。
根据确定出的错误时间段,在保存的每隔第一预设时间对所述客户端程序的操作界面的截图与其截图时间点的关联数据中进行查找,找出截图时间点落入该错误时间段范围的截图,并将该预设类型的客户端程序响应错误、找出的对应截图、该错误时间点及错误时间段进行关联保存。这样,用户在后续需要对预设类型的客户端程序响应错误进行问题定位时,即可从保存的关联数据中快速准确地找到发生该预设类型的客户端程序响应错误的错误时间点及错误时间段,以及该错误时间点及错误时间段下对应的该客户端程序的操作界面的截图,实现对该预设类型的客户端程序响应错误的快速准确定位。由于能定位到发生该预设类型的客户端程序响应错误的错误时间段,即获取发生该预设类型的客户端程序响应错误的错误前后延续时间内的截图,更加有利于用户对发生该预设类型的客户端程序响应错误的前因后果进行综合分析,便于用户进行准确地错误分析。
进一步地,在其他实施例中,上述关联保存模块03还用于:
根据保存的截图与截图时间点的关联数据,找出截图时间点属于该错误时间段的截图,并从该客户端程序对应的服务器端获取属于该错误时间段的服务器日志;将该预设类型的客户端程序响应错误、找出的截图、获取的服务器日志、该错误时间点及/或错误时间段进行关联保存,以供用户根据客户端程序响应错误找到对应的截图、服务器日志、错误时间点及/或错误时间段,并进行错误分析。
本实施例中,找出截图时间点属于该错误时间段的截图之后,还从该客户端程序对应的服务器端获取属于该错误时间段的服务器日志,并将该预设类型的客户端程序响应错误、找出的截图、获取的服务器日志、该错误时间点及/或错误时间段进行关联保存。
这样,用户在后续需要对预设类型的客户端程序响应错误进行问题定位时,即可从保存的关联数据中快速准确地找到发生该预设类型的客户端程序响应错误的错误时间点及/或错误时间段,该错误时间点及/或错误时间段下对应的该客户端程序的操作界面的截图,以及相对应的服务器日志。由于能定位到发生该预设类型的客户端程序响应错误的错误时间段以及在该错误时间段内与该客户端程序相对应的服务器端的服务器日志,用户可针对发生该预设类型的客户端程序响应错误的错误前后延续时间内对应的服务器端的服务器日志进行问题定位,更加有利于在因服务器端的错误导致客户端程序响应错误的情况下,用户对客户端程序响应错误进行准确地错误分析。
如图7所示,本发明第二实施例提出一种客户端程序的测试错误定位系统10,在上述实施例的基础上,还包括:
分类模块04,用于对所有客户端程序响应错误、截图、错误时间点及/或错误时间段的关联数据,按照客户端程序响应错误的类型进行分类,将同一类型的客户端程序响应错误对应的所述关联数据归为一类,将不同类型的客户端程序响应错误对应的所述关联数据归为不同类,并根据分类的结果生成测试报告。
本实施例中,在获取到整个遍历测试过程中发生的客户端程序响应错误及其对应的截图、错误时间点及/或错误时间段的关联数据后,可按照客户端程序响应错误的不同类型进行分类,同一类型的客户端程序响应错误对应的所述关联数据归为一类,不同类型的客户端程序响应错误对应的所述关联数据归为不同类,并根据分类的结果生成测试报告。例如,所述测试报告中可包括各个分类的错误数量统计报表、各个分类的截图汇总报表等,用户即可根据生成的测试报告从整体上对不同类型的客户端程序响应错误进行错误分析。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
以上参照附图说明了本发明的优选实施例,并非因此局限本发明的权利范围。上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。另外,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的 顺序执行所示出或描述的步骤。
本领域技术人员不脱离本发明的范围和实质,可以有多种变型方案实现本发明,比如作为一个实施例的特征可用于另一实施例而得到又一实施例。凡在运用本发明的技术构思之内所作的任何修改、等同替换和改进,均应在本发明的权利范围之内。

Claims (20)

  1. 一种客户端程序的测试错误定位方法,应用于电子装置中,其特征在于,所述方法包括以下步骤:
    A、在对客户端程序进行遍历测试过程中,每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;分析是否有预设类型的客户端程序响应错误发生;
    B、若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点;
    C、根据保存的截图与截图时间点的关联数据,找出所述错误时间点对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及所述错误时间点进行关联保存,以供用户根据客户端程序响应错误找到对应的截图及错误时间点,并进行错误分析。
  2. 如权利要求1所述的客户端程序的测试错误定位方法,其特征在于,所述步骤B替换为:
    若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点,并基于预设规则及该错误时间点确定对应的错误时间段;
    所述步骤C替换为:
    根据保存的截图与截图时间点的关联数据,找出截图时间点属于该错误时间段的截图,并将该预设类型的客户端程序响应错误、找出的截图、该错误时间点及错误时间段进行关联保存,以供用户根据客户端程序响应错误找到对应的截图、错误时间点及错误时间段,并进行错误分析。
  3. 如权利要求2所述的客户端程序的测试错误定位方法,其特征在于,该方法还包括:
    对所有客户端程序响应错误、截图、错误时间点及/或错误时间段的关联数据,按照客户端程序响应错误的类型进行分类,将同一类型的客户端程序响应错误对应的所述关联数据归为一类,将不同类型的客户端程序响应错误对应的所述关联数据归为不同类,并根据分类的结果生成测试报告。
  4. 如权利要求2所述的客户端程序的测试错误定位方法,其特征在于,所述预设规则包括:
    将该错误时间点提前第二预设时间以确定时间下限值,将该错误时间点推后第三预设时间以确定时间上限值,基于所述时间下限值和时间上限值确定出该错误时间点对应的错误时间段。
  5. 如权利要求2所述的客户端程序的测试错误定位方法,其特征在于, 所述步骤C替换为:
    根据保存的截图与截图时间点的关联数据,找出截图时间点属于该错误时间段的截图,并从该客户端程序对应的服务器端获取属于该错误时间段的服务器日志;
    将该预设类型的客户端程序响应错误、找出的截图、获取的服务器日志、该错误时间点及/或错误时间段进行关联保存,以供用户根据客户端程序响应错误找到对应的截图、服务器日志、错误时间点及/或错误时间段,并进行错误分析。
  6. 如权利要求5所述的客户端程序的测试错误定位方法,其特征在于,该方法还包括:
    对所有客户端程序响应错误、截图、错误时间点及/或错误时间段的关联数据,按照客户端程序响应错误的类型进行分类,将同一类型的客户端程序响应错误对应的所述关联数据归为一类,将不同类型的客户端程序响应错误对应的所述关联数据归为不同类,并根据分类的结果生成测试报告。
  7. 如权利要求5所述的客户端程序的测试错误定位方法,其特征在于,所述预设规则包括:
    将该错误时间点提前第二预设时间以确定时间下限值,将该错误时间点推后第三预设时间以确定时间上限值,基于所述时间下限值和时间上限值确定出该错误时间点对应的错误时间段。
  8. 一种电子装置,其特征在于,包括处理设备、存储设备及客户端程序的测试错误定位系统,该客户端程序的测试错误定位系统存储于该存储设备中,包括至少一个计算机可读指令,该至少一个计算机可读指令可被所述处理设备执行,以实现以下操作:
    A、在对客户端程序进行遍历测试过程中,每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;分析是否有预设类型的客户端程序响应错误发生;
    B、若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点;
    C、根据保存的截图与截图时间点的关联数据,找出所述错误时间点对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及所述错误时间点进行关联保存,以供用户根据客户端程序响应错误找到对应的截图及错误时间点,并进行错误分析。
  9. 如权利要求8所述的电子装置,其特征在于,所述步骤B替换为:
    若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点,并基于预设规则及该错误时间点确定对应 的错误时间段;
    所述步骤C替换为:
    根据保存的截图与截图时间点的关联数据,找出截图时间点属于该错误时间段的截图,并将该预设类型的客户端程序响应错误、找出的截图、该错误时间点及错误时间段进行关联保存,以供用户根据客户端程序响应错误找到对应的截图、错误时间点及错误时间段,并进行错误分析。
  10. 如权利要求9所述的电子装置,其特征在于,所述至少一个计算机可读指令还可被所述处理设备执行,以实现如下操作:
    对所有客户端程序响应错误、截图、错误时间点及/或错误时间段的关联数据,按照客户端程序响应错误的类型进行分类,将同一类型的客户端程序响应错误对应的所述关联数据归为一类,将不同类型的客户端程序响应错误对应的所述关联数据归为不同类,并根据分类的结果生成测试报告。
  11. 如权利要求9所述的电子装置,其特征在于,所述预设规则包括:
    将该错误时间点提前第二预设时间以确定时间下限值,将该错误时间点推后第三预设时间以确定时间上限值,基于所述时间下限值和时间上限值确定出该错误时间点对应的错误时间段。
  12. 如权利要求9所述的电子装置,其特征在于,所述步骤C替换为:
    根据保存的截图与截图时间点的关联数据,找出截图时间点属于该错误时间段的截图,并从该客户端程序对应的服务器端获取属于该错误时间段的服务器日志;
    将该预设类型的客户端程序响应错误、找出的截图、获取的服务器日志、该错误时间点及/或错误时间段进行关联保存,以供用户根据客户端程序响应错误找到对应的截图、服务器日志、错误时间点及/或错误时间段,并进行错误分析。
  13. 如权利要求12所述的电子装置,其特征在于,所述至少一个计算机可读指令还可被所述处理设备执行,以实现如下操作:
    对所有客户端程序响应错误、截图、错误时间点及/或错误时间段的关联数据,按照客户端程序响应错误的类型进行分类,将同一类型的客户端程序响应错误对应的所述关联数据归为一类,将不同类型的客户端程序响应错误对应的所述关联数据归为不同类,并根据分类的结果生成测试报告。
  14. 如权利要求12所述的电子装置,其特征在于,所述预设规则包括:
    将该错误时间点提前第二预设时间以确定时间下限值,将该错误时间点推后第三预设时间以确定时间上限值,基于所述时间下限值和时间上限值确定出该错误时间点对应的错误时间段。
  15. 一种计算机可读存储介质,其特征在于,其上存储有至少一个可被处理设备执行以实现以下操作的计算机可读指令:
    A、在对客户端程序进行遍历测试过程中,每隔第一预设时间对所述客户端程序的操作界面进行截图,并将每一截图及其对应的截图时间点进行关联保存;分析是否有预设类型的客户端程序响应错误发生;
    B、若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点;
    C、根据保存的截图与截图时间点的关联数据,找出所述错误时间点对应的截图,并将该预设类型的客户端程序响应错误、找出的截图及所述错误时间点进行关联保存,以供用户根据客户端程序响应错误找到对应的截图及错误时间点,并进行错误分析。
  16. 如权利要求15所述的存储介质,其特征在于,所述步骤B替换为:
    若有预设类型的客户端程序响应错误发生,则记录发生该预设类型的客户端程序响应错误的错误时间点,并基于预设规则及该错误时间点确定对应的错误时间段;
    所述步骤C替换为:
    根据保存的截图与截图时间点的关联数据,找出截图时间点属于该错误时间段的截图,并将该预设类型的客户端程序响应错误、找出的截图、该错误时间点及错误时间段进行关联保存,以供用户根据客户端程序响应错误找到对应的截图、错误时间点及错误时间段,并进行错误分析。
  17. 如权利要求16所述的存储介质,其特征在于,所述至少一个计算机可读指令还可被所述处理设备执行,以实现如下操作:
    对所有客户端程序响应错误、截图、错误时间点及/或错误时间段的关联数据,按照客户端程序响应错误的类型进行分类,将同一类型的客户端程序响应错误对应的所述关联数据归为一类,将不同类型的客户端程序响应错误对应的所述关联数据归为不同类,并根据分类的结果生成测试报告。
  18. 如权利要求16所述的存储介质,其特征在于,所述预设规则包括:
    将该错误时间点提前第二预设时间以确定时间下限值,将该错误时间点推后第三预设时间以确定时间上限值,基于所述时间下限值和时间上限值确定出该错误时间点对应的错误时间段。
  19. 如权利要求16所述的存储介质,其特征在于,所述步骤C替换为:
    根据保存的截图与截图时间点的关联数据,找出截图时间点属于该错误时间段的截图,并从该客户端程序对应的服务器端获取属于该错误时间段的服务器日志;
    将该预设类型的客户端程序响应错误、找出的截图、获取的服务器日志、该错误时间点及/或错误时间段进行关联保存,以供用户根据客户端程序响应错误找到对应的截图、服务器日志、错误时间点及/或错误时间段,并进行错误分析。
  20. 如权利要求19所述的存储介质,其特征在于,所述至少一个计算机可读指令还可被所述处理设备执行,以实现如下操作:
    对所有客户端程序响应错误、截图、错误时间点及/或错误时间段的关联数据,按照客户端程序响应错误的类型进行分类,将同一类型的客户端程序响应错误对应的所述关联数据归为一类,将不同类型的客户端程序响应错误对应的所述关联数据归为不同类,并根据分类的结果生成测试报告。
PCT/CN2017/091255 2016-12-30 2017-06-30 客户端程序的测试错误定位方法、电子装置及存储介质 WO2018120720A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611265752.6 2016-12-30
CN201611265752.6A CN106776341A (zh) 2016-12-30 2016-12-30 客户端程序的测试错误定位方法及装置

Publications (1)

Publication Number Publication Date
WO2018120720A1 true WO2018120720A1 (zh) 2018-07-05

Family

ID=58951550

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/091255 WO2018120720A1 (zh) 2016-12-30 2017-06-30 客户端程序的测试错误定位方法、电子装置及存储介质

Country Status (2)

Country Link
CN (1) CN106776341A (zh)
WO (1) WO2018120720A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475396A (zh) * 2019-01-24 2020-07-31 北京嘀嘀无限科技发展有限公司 程序检测方法、装置、电子设备及储存介质
CN115658545A (zh) * 2022-11-14 2023-01-31 广州掌动智能科技有限公司 软件错误上报方法和系统

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776341A (zh) * 2016-12-30 2017-05-31 上海亿账通互联网科技有限公司 客户端程序的测试错误定位方法及装置
CN107247637A (zh) * 2017-07-27 2017-10-13 广州云测信息技术有限公司 一种app故障确定方法及装置
CN107239404A (zh) * 2017-07-27 2017-10-10 广州云测信息技术有限公司 一种问题定位方法和设备
CN107391383B (zh) * 2017-08-11 2021-01-12 上海巍擎信息技术有限责任公司 一种应用程序界面的测试方法和测试系统
CN109408361A (zh) * 2018-08-15 2019-03-01 中国平安人寿保险股份有限公司 Monkey测试复原方法、装置、电子设备及计算机可读存储介质
CN109614278A (zh) * 2018-10-16 2019-04-12 深圳壹账通智能科技有限公司 自动化测试过程中问题定位的方法、装置和终端
CN110177153A (zh) * 2019-06-14 2019-08-27 郑州悉知信息科技股份有限公司 一种日志收集系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6249886B1 (en) * 1997-10-17 2001-06-19 Ramsesh S. Kalkunte Computer system and computer implemented process for performing user-defined tests of a client-server system with run time compilation of test results
CN101510172A (zh) * 2009-03-23 2009-08-19 金蝶软件(中国)有限公司 测试系统及方法
CN105183654A (zh) * 2015-09-18 2015-12-23 厦门美图移动科技有限公司 一种脱离PC的Android自动化测试录屏机制及录屏系统
CN105653451A (zh) * 2015-12-29 2016-06-08 北京金山安全软件有限公司 一种软件性能测试方法及装置
CN106776341A (zh) * 2016-12-30 2017-05-31 上海亿账通互联网科技有限公司 客户端程序的测试错误定位方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123219B (zh) * 2013-04-28 2017-05-24 国际商业机器公司 测试软件的方法和设备
CN104216828A (zh) * 2013-06-03 2014-12-17 刘伟 一种对被测应用程序进行功能遍历的测试方法
CN105068930A (zh) * 2015-08-07 2015-11-18 天津市康凯特软件科技有限公司 移动终端测试生成数据的智能分析方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6249886B1 (en) * 1997-10-17 2001-06-19 Ramsesh S. Kalkunte Computer system and computer implemented process for performing user-defined tests of a client-server system with run time compilation of test results
CN101510172A (zh) * 2009-03-23 2009-08-19 金蝶软件(中国)有限公司 测试系统及方法
CN105183654A (zh) * 2015-09-18 2015-12-23 厦门美图移动科技有限公司 一种脱离PC的Android自动化测试录屏机制及录屏系统
CN105653451A (zh) * 2015-12-29 2016-06-08 北京金山安全软件有限公司 一种软件性能测试方法及装置
CN106776341A (zh) * 2016-12-30 2017-05-31 上海亿账通互联网科技有限公司 客户端程序的测试错误定位方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475396A (zh) * 2019-01-24 2020-07-31 北京嘀嘀无限科技发展有限公司 程序检测方法、装置、电子设备及储存介质
CN115658545A (zh) * 2022-11-14 2023-01-31 广州掌动智能科技有限公司 软件错误上报方法和系统
CN115658545B (zh) * 2022-11-14 2023-05-05 广州掌动智能科技有限公司 软件错误上报方法和系统

Also Published As

Publication number Publication date
CN106776341A (zh) 2017-05-31

Similar Documents

Publication Publication Date Title
WO2018120720A1 (zh) 客户端程序的测试错误定位方法、电子装置及存储介质
US10733079B2 (en) Systems and methods for end-to-end testing of applications using dynamically simulated data
WO2019196274A1 (zh) 网页页面测试方法、装置、电子设备和介质
US11630762B2 (en) Method and apparatus for testing map service
WO2018166113A1 (zh) 随机森林模型训练的方法、电子装置及存储介质
WO2018120721A1 (zh) 用户界面的测试方法、系统、电子装置及计算机可读存储介质
US9612937B2 (en) Determining relevant events in source code analysis
US20130111011A1 (en) Server-side tracing of requests
WO2020215563A1 (zh) 用于文本分类的训练样本生成方法、装置和计算机设备
US8996925B2 (en) Managing error logs in a distributed network fabric
US20180165258A1 (en) Methods for improved auditing of web sites and devices thereof
US11119843B2 (en) Verifying application behavior based on distributed tracing
JP6564532B2 (ja) クライアント−サーバトランザクションをアノテーションするためのシステム及び方法
US20150242380A1 (en) Checking testing coverage
WO2016000546A1 (zh) 缓存文件删除影响的校验方法、装置及移动终端
WO2019161645A1 (zh) 基于Shell的数据表提取方法、终端、设备及存储介质
CN111177113A (zh) 数据迁移方法、装置、计算机设备和存储介质
WO2020140624A1 (zh) 从日志中提取数据的方法和相关设备
US9645873B2 (en) Integrated configuration management and monitoring for computer systems
US9286036B2 (en) Computer-readable recording medium storing program for managing scripts, script management device, and script management method
US20180217913A1 (en) Systems and methods for performance evaluation of input/output (i/o) intensive enterprise applications
US20230065492A1 (en) Method for obtaining browser running data, electronic device, and storage medium
CN105912467B (zh) 一种性能测试方法及装置
US10114951B2 (en) Virus signature matching method and apparatus
US10684896B2 (en) Method for processing asynchronous event by checking device and checking device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17885450

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17885450

Country of ref document: EP

Kind code of ref document: A1