CN110806965A - Automatic test method, device, equipment and medium - Google Patents

Automatic test method, device, equipment and medium Download PDF

Info

Publication number
CN110806965A
CN110806965A CN201911046571.8A CN201911046571A CN110806965A CN 110806965 A CN110806965 A CN 110806965A CN 201911046571 A CN201911046571 A CN 201911046571A CN 110806965 A CN110806965 A CN 110806965A
Authority
CN
China
Prior art keywords
application
tested
starting
screen
time
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.)
Withdrawn
Application number
CN201911046571.8A
Other languages
Chinese (zh)
Inventor
成辰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Manyun Software Technology Co Ltd
Original Assignee
Jiangsu Manyun Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Manyun Software Technology Co Ltd filed Critical Jiangsu Manyun Software Technology Co Ltd
Priority to CN201911046571.8A priority Critical patent/CN110806965A/en
Publication of CN110806965A publication Critical patent/CN110806965A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis

Landscapes

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

Abstract

The embodiment of the invention discloses an automatic testing method, an automatic testing device, automatic testing equipment and an automatic testing medium, and relates to the field of performance testing of applications. The method comprises the following steps: after an application to be tested is installed on local equipment, starting screen recording of the local equipment; clicking a starting icon of the application to be tested in a screen, and triggering and generating characteristic points to be displayed on the screen by clicking operation; detecting the characteristic points of the recorded screen image, and determining the starting time of the application to be tested according to the detection result; comparing the recorded screen image with the first screen image of the application to be tested, and determining the starting end time of the application to be tested according to the comparison result; and determining the starting time of the application to be tested according to the starting time and the starting ending time. The embodiment of the invention provides an automatic testing method, device, equipment and medium, which realize accurate testing of application starting time and do not need to modify application codes.

Description

Automatic test method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the field of performance test of applications, in particular to an automatic test method, an automatic test device, automatic test equipment and an automatic test medium.
Background
Testing of the application may expose the problem to the laboratory environment in advance rather than waiting until the application is brought online for discovery and resolution. Therefore, the application test can better and earlier solve the performance problem of the application and improve the online quality of the application.
Currently, most internet companies monitor the starting time of the application in a log printing or Hook mode, but this mode needs to insert monitoring logic into the source code of the application, so that the method cannot test the starting time of the application of the competitive products because the source code of the application of the competitive products cannot be obtained.
In addition, the application start end time determined based on the method may be different from the time perceived by the user, because the perceived time of the user is the time when the user sees the application top page completely rendered, and the start end time detected by the background may be the time when the content of the top page is completely loaded, and the rendering time of the content may be different in the middle.
Disclosure of Invention
The embodiment of the invention provides an automatic testing method, device, equipment and medium, which are used for accurately testing the application starting time without modifying an application code.
In a first aspect, an embodiment of the present invention provides an automatic test method, where the method includes:
after an application to be tested is installed on local equipment, starting screen recording of the local equipment;
clicking a starting icon of the application to be tested in a screen, and triggering and generating characteristic points to be displayed on the screen by clicking operation;
detecting the characteristic points of the recorded screen image, and determining the starting time of the application to be tested according to the detection result;
comparing the recorded screen image with the first screen image of the application to be tested, and determining the starting end time of the application to be tested according to the comparison result;
and determining the starting time of the application to be tested according to the starting time and the starting ending time.
In a second aspect, an embodiment of the present invention further provides an automatic testing apparatus, where the apparatus includes:
the screen recording module is used for starting screen recording of the local equipment after the application to be tested is installed on the local equipment;
the icon clicking module is used for clicking a starting icon of the application to be tested in a screen, and the clicking operation triggers generation of characteristic points to be displayed on the screen;
the starting time determining module is used for detecting the characteristic points of the recorded screen image and determining the starting time of the application to be tested according to the detection result;
the end time determining module is used for comparing the recorded screen image with the first screen image of the application to be tested and determining the start end time of the application to be tested according to the comparison result;
and the starting time determining module is used for determining the starting time of the application to be tested according to the starting time and the starting ending time.
In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement an automatic test method as described in any of the embodiments of the present application.
In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements an automatic testing method according to any one of the embodiments of the present application.
The embodiment of the invention realizes the determination of the starting time of the application to be tested by recording the screen in the starting process of the application to be tested of the local terminal, identifying the recorded screen image and determining the starting time and the starting ending time of the application to be tested according to the identification result.
The starting start time and the starting end time are determined according to the recognition result of the recorded screen image, and the user perceives the application process through the screen image, so that the determination of the time is the same as the time perceived by the user, and the accurate test of the application starting time is realized.
Because the test logic of the starting time does not need to use the source code logic of the application, that is, the test logic of the starting time and the source code logic of the application are independent from each other, the technical scheme of the embodiment of the application does not need to modify the source code of the application, and further, the test on the application of the competitive products can be realized.
Existing automated test solutions are generally implemented through UI automation frameworks, which test methods implement testing by simulating human operations with a fixed sequence of operations.
Drawings
Fig. 1 is a flowchart of an automatic testing method according to an embodiment of the present invention;
fig. 2 is a flowchart of an automatic testing method according to a second embodiment of the present application;
fig. 3 is a flowchart of an automatic testing method provided in the third embodiment of the present application;
fig. 4 is a schematic structural diagram of an automatic test apparatus according to a fourth embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of an automatic testing method according to an embodiment of the present invention. The embodiment can be applied to the situation of measuring the starting time of the application to be tested. The method may be performed by an automatic test apparatus, which may be implemented in software and/or hardware. Typically, the automatic testing apparatus may be configured at a computer end for controlling the application to be tested to perform the test, or may be configured at a local device installed with the application to be tested. Referring to fig. 1, the automatic testing method provided in this embodiment includes:
s110, after the application to be tested is installed on the local equipment, screen recording of the local equipment is started.
The application to be tested refers to an application that needs to be tested, and the application may be any application, which is not limited in this embodiment.
The local device refers to a device running an application to be tested, and the device may be any device. Specifically, the device may be a mobile phone, a computer or other intelligent terminal.
And S120, clicking a starting icon of the application to be tested in the screen, and triggering and generating characteristic points to be displayed on the screen by clicking operation.
Wherein, the screen refers to the screen of the local device.
In particular, clicking on the launch icon may be a manual click
In order to improve the automation of the test, the click operation on the start icon can also be automatically generated by simulating a click event.
Typically, the simulated click event may be implemented by an event occurrence function sendent () based on an adb (Android Debug Bridge) tool. The adb tool is a command line window for interacting with a simulator or real device through a computer.
The coordinates of the start icon in the screen need to be known in the simulated click event, and the determination of the coordinates comprises the following steps:
screenshot is conducted on a screen desktop of the local equipment, and coordinates of the application starting icon in the screen are obtained through an image matching algorithm.
The feature point refers to an image feature point displayed on the screen triggered by the clicking operation.
Typically, when an application icon in the screen of an android device is clicked, a white dot is generated if a touch operation on is displayed in a developer option of the android device. The above-mentioned characteristic point may be the white point.
S130, the characteristic point detection is carried out on the recorded screen image, and the starting time of the application to be tested is determined according to the detection result.
Specifically, the determining the start time of the application to be tested according to the detection result includes:
taking the first detected screen image with the characteristic points as a starting image;
and taking the recording time of the starting image as the starting time of the application to be tested.
S140, comparing the recorded screen image with the first screen image of the application to be tested, and determining the starting end time of the application to be tested according to the comparison result.
Specifically, the determining the start ending time of the application to be tested according to the comparison result includes:
taking the screen image which is consistent with the comparison as a starting ending image;
and taking the recording time of the starting ending image as the starting ending time of the application to be tested.
S150, determining the starting time of the application to be tested according to the starting time and the starting ending time.
Specifically, the difference between the starting time and the starting end time is used as the starting time of the application to be tested.
In order to improve the determination accuracy of the starting time, the average value of the difference values obtained by multiple times of calculation is used as the starting time of the application to be tested.
According to the technical scheme of the embodiment of the invention, the start time and the start end time of the application to be tested are determined according to the identification result by recording the screen in the start process of the application to be tested of the local terminal, identifying the recorded screen image, and determining the start time and the start end time of the application to be tested, so that the start time of the application to be tested is determined.
The starting start time and the starting end time are determined according to the recognition result of the recorded screen image, and the user perceives the application process through the screen image, so that the determination of the time is the same as the time perceived by the user, and the accurate test of the application starting time is realized.
Because the test logic of the starting time does not need to use the source code logic of the application, that is, the test logic of the starting time and the source code logic of the application are independent from each other, the technical scheme of the embodiment of the application does not need to modify the source code of the application, and further, the test on the application of the competitive products can be realized.
In order to implement the black screen detection of the device, after the screen recording of the local device is started, the method further includes:
identifying black screen image characteristics of the recorded screen image;
and if the screen image is identified to include the black screen image characteristic, determining that the local equipment generates a black screen in the screen image.
In order to realize the memory leak detection of the equipment, after the application to be detected is started, the memory leak detection is carried out on the application to be detected, the detected memory leak information is written into a designated log file, and whether the memory leak occurs or not is determined according to the content of the designated log file after the memory leak detection is finished.
In order to realize the improvement of the application to be tested by the relevant personnel, the test result is sent to the relevant personnel, and the relevant personnel can improve the application to be tested according to the test result.
Wherein the test result comprises at least one of the determined boot time, the crash log, and the operation image and the memory leak log.
Example two
Fig. 2 is a flowchart of an automatic testing method according to a second embodiment of the present application. The present embodiment is an alternative proposed on the basis of the above-described embodiments. Referring to fig. 2, the automatic testing method provided in this embodiment includes:
s210, after the application to be tested is installed on the local equipment, screen recording of the local equipment is started.
S220, clicking a starting icon of the application to be tested in the screen, and triggering and generating characteristic points to be displayed on the screen by clicking operation.
And S230, detecting the characteristic points of the recorded screen image, and determining the starting time of the application to be tested according to the detection result.
S240, comparing the recorded screen image with the first screen image of the application to be tested, and determining the starting end time of the application to be tested according to the comparison result.
And S250, determining the starting time of the application to be tested according to the starting time and the starting ending time.
And S260, after the application to be tested is started, randomly clicking the screen of the local equipment according to the set click times and the set click time interval.
And S270, screenshot is conducted on the randomly clicked screen image, and an operation image is generated.
And S280, drawing the randomly clicked coordinate in the operation image.
According to the technical scheme of the embodiment of the application, the screen of the local equipment is randomly clicked according to the set click times and the set click time interval, so that the random test of the application to be tested is realized, and the test comprehensiveness is improved.
The randomly clicked screen image is subjected to screenshot to generate an operation image, and the randomly clicked coordinate is drawn in the operation image, so that the operation is recorded, and the problem tracking at the later stage is facilitated.
Further, after randomly clicking the screen of the local device, the method further includes:
performing crash detection and/or no-response detection on the application to be tested;
and associating the detected collapse information and/or no-response information with an operation image before collapse or no-response occurs, wherein random click coordinates are drawn in the operation image.
Based on the technical characteristics, the detected collapse information and/or no-response information are/is associated with the operation image before collapse or no-response occurs, and the random click coordinates are drawn in the operation image, so that relevant personnel can conveniently track and search problems according to the operation image.
Further, after randomly clicking the screen of the local device, the method further includes:
accumulating the random click times, if the accumulated click times is equal to or greater than a set time threshold, detecting whether the local equipment is connected with the Internet, and resetting an accumulated result;
and if the local equipment is not connected with the Internet, connecting the local equipment with the Internet.
The accumulated click frequency refers to the accumulated frequency of continuous random click operations.
The set time threshold can be set according to actual needs.
Based on the technical characteristics, the embodiment of the application can perform network connection detection once after clicking operation every set clicking times, and perform networking of the local equipment when the local equipment is not connected with the internet, so that the local equipment is always connected with the network, and data interaction between the local equipment and other equipment is facilitated. The interaction may specifically include the reception of a test command by the local device, the transmission of a test result by the local device, and the like.
EXAMPLE III
Fig. 3 is a flowchart of an automatic testing method according to a third embodiment of the present application. The embodiment is an alternative proposed based on the above embodiment, taking the local device as a mobile phone with an android operating system as an example. Referring to fig. 3, the automatic testing method provided in this embodiment includes:
1. installing and applying:
1.1, constructing a packed file of an application to be tested based on jenkins on a computer, and connecting a mobile phone to the computer;
1.2, implementing unlocking logic of the mobile phone by using a Python script, and unlocking the mobile phone;
and 1.3, installing the application to be tested on the mobile phone by using an adb command, wherein the adb command refers to a command generated based on an adb tool.
2. Starting time detection:
2.1, starting a timed screen recording function of the mobile phone by using an adb command;
2.2, starting the application, namely, capturing a screen of a desktop of the mobile phone, and acquiring the coordinate of a starting icon of the application to be tested in the current screen by using an image matching algorithm; and simulating and clicking the coordinate by using a sendevent () function based on the adb tool so as to start the application to be tested. Wherein, before the simulated click operation, the display touch operation of the developer option in the mobile phone needs to be opened, and by the method, white dots can be generated on the mobile phone screen after the simulated click operation.
And 2.3, framing, namely framing the recorded video into at least one frame of screen image according to a set interval after the screen recording is finished.
And 2.4, detecting the starting time, namely taking the generation time of the first screen image with white spots as the starting time by identifying the white spots in the screen images.
2.5, detecting the first screen time (namely starting end time), manually predefining the first screen image to be tested and applied, comparing the Hamming distance of the image characteristic parameters between the first screen image and the screen images, and judging whether the images are the same or not; and taking the generation time of the screen image successfully matched with the first screen image as the first screen time.
And 2.6, calculating starting time, wherein the starting time is equal to the difference between the first screen time and the starting time. And removing abnormal starting time after multiple tests, and taking the average value of the remaining multiple starting time as the finally determined starting time.
And 2.7, detecting a black screen, namely detecting whether the black screen appears when no response is given after the preset time length in the starting process, detecting whether the black screen exists in the screen image, and if so, storing the detection result of the black screen in a specified directory.
3. And (3) random detection:
and 3.1, setting a random click parameter, and randomly clicking the home page of the application to be tested, wherein the random click parameter comprises click times and click intervals.
Typically, random clicking on the top page of the application to be tested can be realized based on the monkey script.
And 3.2, clicking to perform screenshot, namely, performing screenshot on the clicking operation, drawing a clicking coordinate during the operation into the screenshot, and storing the screenshot in the local area. The number of the local storage screenshots is set, and the excess parts are cleared according to a first-in first-out principle.
3.3, Wi-Fi automatic reconnection, namely in the process of random clicking, the Wi-Fi can be turned off by mistakenly clicking a tool class. Testing cannot be effectively performed for networking based applications to be tested. In order to solve the problem, after clicking events of a set frequency threshold value are carried out, a Wi-Fi monitoring event is inserted, whether the current Wi-Fi is connected or not is checked, when no connection is judged, the Wi-Fi is opened, a Wi-Fi list is obtained, the list is traversed to find the SSID corresponding to the Wi-Fi, and reconnection is carried out.
4. Crash monitoring:
and automatically detecting the crash and the non-response of the application to be tested. When the occurrence of a crash or the non-response is monitored, the log is saved in a designated folder, and the operation image of the set number of sheets before the occurrence of the abnormality is saved.
Typically, the automatic detection of crashes and non-responses for the application under test can be made based on customized monkey scripts.
5. Monitoring memory leakage:
and automatically detecting the memory leak of the application to be tested, writing related information into a specific log file after the memory leak is found, analyzing the file after the test is finished, and considering that the memory leak is generated if the file has contents.
Specifically, the memory leak of the application to be tested is automatically detected based on leak detection (leak detection). The leak notification is pushed by default when the memory is found to be leaked, so that automation is not convenient to realize. The aim is achieved by modifying the strategy of discovering memory leakage by LeakCanary: and writing the related information into a specific log file after the memory leak is found, analyzing the file after the test is finished, and if the content exists in the file, determining that the memory leak is generated.
6. E, sending a test report by the mail:
and sending the starting time test result, the application crash log, the operation screenshot and the application memory leakage log to related personnel by using an email.
According to the technical scheme of the embodiment of the application, the application is automatically constructed through a jenkins packaging platform and is installed on a mobile phone end, and automatic testing is executed through monkey; acquiring application starting time through modes of screen recording, framing, image matching and the like; acquiring information after application crash and screenshots of a series of prepositive operations through customizing monkey; and obtaining memory leakage information by modifying the LeakCanary, and storing the memory leakage information to a local log. And finally, sending the acquired information to related personnel through mails to perform problem positioning and quality optimization.
The technical effects of the scheme can be realized as follows:
the starting time sensed by a user can be automatically tested, and the problem of screen blackness in the starting process can be automatically detected;
the method can be used for automatically detecting the starting time of the competitive products;
the pain point that the automatic test can not reproduce the operation scene and can not automatically reconnect Wi-Fi is solved;
in the automatic test process, the crash log and the memory leakage log are automatically stored, so that the problem review is facilitated.
Example four
Fig. 4 is a schematic structural diagram of an automatic test apparatus according to a fourth embodiment of the present application. Referring to fig. 4, the automatic test apparatus provided in this embodiment includes: a screen recording module 10, an icon clicking module 20, a start time determining module 30, an end time determining module 40, and a start time determining module 50.
The screen recording module 10 is configured to start screen recording on a local device after an application to be tested is installed on the local device;
the icon clicking module 20 is configured to click a start icon of the application to be tested on a screen, and the clicking operation triggers generation of a feature point to be displayed on the screen;
the start time determining module 30 is configured to perform the feature point detection on the recorded screen image, and determine start time of the application to be tested according to a detection result;
the end time determining module 40 is configured to compare the recorded screen image with the first screen image of the application to be tested, and determine the start end time of the application to be tested according to the comparison result;
and the starting time determining module 50 is configured to determine the starting time of the application to be tested according to the starting start time and the starting end time.
According to the technical scheme of the embodiment of the invention, the start time and the start end time of the application to be tested are determined according to the identification result by recording the screen in the start process of the application to be tested of the local terminal, identifying the recorded screen image, and determining the start time and the start end time of the application to be tested, so that the start time of the application to be tested is determined.
The starting start time and the starting end time are determined according to the recognition result of the recorded screen image, and the user perceives the application process through the screen image, so that the determination of the time is the same as the time perceived by the user, and the accurate test of the application starting time is realized.
Because the test logic of the starting time does not need to use the source code logic of the application, that is, the test logic of the starting time and the source code logic of the application are independent from each other, the technical scheme of the embodiment of the application does not need to modify the source code of the application, and further, the test on the application of the competitive products can be realized.
Further, the start time determination module includes:
the image detection unit is used for taking the first detected screen image with the characteristic points as a starting image;
and the starting time determining unit is used for taking the recording time of the starting image as the starting time of the application to be tested.
Further, the end time determination module includes:
the end image determining unit is used for taking the screen images which are compared to be consistent as start end images;
and the end time determining unit is used for taking the recording time of the start end image as the start end time of the application to be tested.
Further, the apparatus further comprises:
the image recognition module is used for recognizing the black screen image characteristics of the recorded screen image after the screen recording of the local equipment is started;
and the black screen determining module is used for determining that the local equipment generates black screen in the screen image if the screen image is identified to include the black screen image characteristic.
Further, after the application to be tested is started, randomly clicking a screen of the local equipment according to a set click frequency and a set click time interval;
screenshot is carried out on the randomly clicked screen image to generate an operation image;
and drawing the randomly clicked coordinate in the operation image.
Further, the apparatus further comprises:
the number accumulation module is used for accumulating the random click number after the screen of the local equipment is clicked randomly, detecting whether the local equipment is connected with the internet or not if the accumulated click number is equal to or greater than a set number threshold, and resetting an accumulated result;
and the network connection module is used for connecting the local equipment with the internet if the local equipment is not connected with the internet.
Further, the apparatus further comprises:
the crash detection module is used for performing crash detection and/or no-response detection on the application to be tested after the screen of the local equipment is randomly clicked;
and the information association module is used for associating the detected collapse information and/or no-response information with an operation image before collapse or no-response occurs, and random click coordinates are drawn in the operation image.
Further, after the application to be tested is started, performing memory leak detection on the application to be tested.
Further, the apparatus further comprises:
and the result sending module is used for sending the test result to related personnel after the starting time of the application to be tested is determined, so that the related personnel can complete the application to be tested according to the test result.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention, as shown in fig. 5, the apparatus includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of processors 70 in the device may be one or more, and one processor 70 is taken as an example in fig. 5; the processor 70, the memory 71, the input device 72 and the output device 73 of the apparatus may be connected by a bus or other means, as exemplified by the bus connection in fig. 5.
The memory 71 serves as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the automatic test method in the embodiment of the present invention (for example, the automatic test apparatus includes a screen recording module 10, an icon clicking module 20, a start time determining module 30, an end time determining module 40, and a start time determining module 50). The processor 70 executes various functional applications of the device and data processing by executing software programs, instructions and modules stored in the memory 71, that is, implements the automatic test method described above.
The memory 71 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 71 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 71 may further include memory located remotely from the processor 70, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 72 may be used to receive entered numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 73 may include a display device such as a display screen.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform an automatic testing method, the method including:
after an application to be tested is installed on local equipment, starting screen recording of the local equipment;
clicking a starting icon of the application to be tested in a screen, and triggering and generating characteristic points to be displayed on the screen by clicking operation;
detecting the characteristic points of the recorded screen image, and determining the starting time of the application to be tested according to the detection result;
comparing the recorded screen image with the first screen image of the application to be tested, and determining the starting end time of the application to be tested according to the comparison result;
and determining the starting time of the application to be tested according to the starting time and the starting ending time.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the automatic test method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the automatic test apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (12)

1. An automatic test method, comprising:
after an application to be tested is installed on local equipment, starting screen recording of the local equipment;
clicking a starting icon of the application to be tested in a screen, and triggering and generating characteristic points to be displayed on the screen by clicking operation;
detecting the characteristic points of the recorded screen image, and determining the starting time of the application to be tested according to the detection result;
comparing the recorded screen image with the first screen image of the application to be tested, and determining the starting end time of the application to be tested according to the comparison result;
and determining the starting time of the application to be tested according to the starting time and the starting ending time.
2. The method of claim 1, wherein determining the start time of the application to be tested according to the detection result comprises:
taking the first detected screen image with the characteristic points as a starting image;
and taking the recording time of the starting image as the starting time of the application to be tested.
3. The method of claim 1, wherein determining the start ending time of the application to be tested according to the comparison result comprises:
taking the screen image which is consistent with the comparison as a starting ending image;
and taking the recording time of the starting ending image as the starting ending time of the application to be tested.
4. The method of claim 1, wherein after the initiating of the recording of the screen of the local device, the method further comprises:
identifying black screen image characteristics of the recorded screen image;
and if the screen image is identified to include the black screen image characteristic, determining that the local equipment generates a black screen in the screen image.
5. The method according to claim 1, characterized in that after the application to be tested is started, the screen of the local device is randomly clicked according to a set click number and a set click time interval;
screenshot is carried out on the randomly clicked screen image to generate an operation image;
and drawing the randomly clicked coordinate in the operation image.
6. The method of claim 5, wherein after randomly clicking the screen of the local device, further comprising:
accumulating the random click times, if the accumulated click times is equal to or greater than a set time threshold, detecting whether the local equipment is connected with the Internet, and resetting an accumulated result;
and if the local equipment is not connected with the Internet, connecting the local equipment with the Internet.
7. The method of claim 5, wherein after randomly clicking the screen of the local device, further comprising:
performing crash detection and/or no-response detection on the application to be tested;
and associating the detected collapse information and/or no-response information with an operation image before collapse or no-response occurs, wherein random click coordinates are drawn in the operation image.
8. The method according to claim 1, wherein after the application to be tested is started, performing memory leak detection on the application to be tested, writing detected memory leak information into a designated log file, and determining whether memory leak occurs according to the presence or absence of contents of the designated log file after the memory leak detection is finished.
9. The method of any of claims 1-8, wherein after determining a start time of the application to be tested, the method further comprises:
and sending the test result to relevant personnel for the relevant personnel to perfect the application to be tested according to the test result.
10. An automatic test apparatus, comprising:
the screen recording module is used for starting screen recording of the local equipment after the application to be tested is installed on the local equipment;
the icon clicking module is used for clicking a starting icon of the application to be tested in a screen, and the clicking operation triggers generation of characteristic points to be displayed on the screen;
the starting time determining module is used for detecting the characteristic points of the recorded screen image and determining the starting time of the application to be tested according to the detection result;
the end time determining module is used for comparing the recorded screen image with the first screen image of the application to be tested and determining the start end time of the application to be tested according to the comparison result;
and the starting time determining module is used for determining the starting time of the application to be tested according to the starting time and the starting ending time.
11. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the automatic test method of any one of claims 1-9.
12. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the automatic test method according to any one of claims 1 to 9.
CN201911046571.8A 2019-10-30 2019-10-30 Automatic test method, device, equipment and medium Withdrawn CN110806965A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911046571.8A CN110806965A (en) 2019-10-30 2019-10-30 Automatic test method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911046571.8A CN110806965A (en) 2019-10-30 2019-10-30 Automatic test method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN110806965A true CN110806965A (en) 2020-02-18

Family

ID=69489609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911046571.8A Withdrawn CN110806965A (en) 2019-10-30 2019-10-30 Automatic test method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN110806965A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835758A (en) * 2021-03-22 2021-05-25 四川酷比通信设备有限公司 Method for self-starting and automatically running test software and terminal equipment
CN113419932A (en) * 2021-05-26 2021-09-21 荣耀终端有限公司 Equipment performance analysis method and device
CN114528199A (en) * 2020-11-23 2022-05-24 腾讯科技(深圳)有限公司 Software anomaly detection method and device and storage medium
CN114690988A (en) * 2022-03-08 2022-07-01 北京字跳网络技术有限公司 Test method and device and electronic equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114528199A (en) * 2020-11-23 2022-05-24 腾讯科技(深圳)有限公司 Software anomaly detection method and device and storage medium
CN112835758A (en) * 2021-03-22 2021-05-25 四川酷比通信设备有限公司 Method for self-starting and automatically running test software and terminal equipment
CN113419932A (en) * 2021-05-26 2021-09-21 荣耀终端有限公司 Equipment performance analysis method and device
CN113419932B (en) * 2021-05-26 2022-05-06 荣耀终端有限公司 Equipment performance analysis method and device
CN114690988A (en) * 2022-03-08 2022-07-01 北京字跳网络技术有限公司 Test method and device and electronic equipment
CN114690988B (en) * 2022-03-08 2024-01-23 北京字跳网络技术有限公司 Test method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN107562610B (en) Method, device, terminal and medium for acquiring page loading time
CN110806965A (en) Automatic test method, device, equipment and medium
CN107294808B (en) Interface test method, device and system
CN111026645B (en) User interface automatic test method and device, storage medium and electronic equipment
CN107547299B (en) Test method and system
CN111045952A (en) Software testing method, flow playback device, terminal equipment and readable storage medium
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
CN105260082A (en) Display method for test data and development terminal
CN111522749B (en) Page testing method and device, readable storage medium and electronic equipment
CN111554219A (en) Display equipment testing method and device, electronic product and storage medium
US20170132112A1 (en) Test method and device for business system
CN112866312A (en) Script generation method, remote operation method and related equipment
CN112153375A (en) Front-end performance testing method, device, equipment and medium based on video information
CN110543429A (en) Test case debugging method and device and storage medium
CN112416735B (en) Application program detection method and device, terminal equipment and storage medium
CN111258765A (en) Load balancing method and device, computing equipment and storage medium
CN111538994A (en) System security detection and repair method, device, storage medium and terminal
CN110752933A (en) Verification code input method and device, electronic equipment and storage medium
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN116166536A (en) Test method, test device, electronic equipment and storage medium
CN113590498B (en) Method and system for testing application starting time of desktop operating system
CN113672917A (en) Malicious code detection method and device, storage medium and electronic equipment
CN107656816A (en) Multi-terminal synchronous operation method and device
CN109522223B (en) Automatic test method and system for vehicle-mounted Android multimedia host
CN112948259A (en) Application testing method and device, electronic equipment and storage medium

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20200218

WW01 Invention patent application withdrawn after publication