CN117435457A - Platform performance automatic test method, device, medium and equipment - Google Patents

Platform performance automatic test method, device, medium and equipment Download PDF

Info

Publication number
CN117435457A
CN117435457A CN202310186497.XA CN202310186497A CN117435457A CN 117435457 A CN117435457 A CN 117435457A CN 202310186497 A CN202310186497 A CN 202310186497A CN 117435457 A CN117435457 A CN 117435457A
Authority
CN
China
Prior art keywords
platform
view
tested
event
performance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310186497.XA
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.)
Shenzhen Tcl Yunchuang Technology Co ltd
Original Assignee
Shenzhen Tcl Yunchuang 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 Shenzhen Tcl Yunchuang Technology Co ltd filed Critical Shenzhen Tcl Yunchuang Technology Co ltd
Priority to CN202310186497.XA priority Critical patent/CN117435457A/en
Publication of CN117435457A publication Critical patent/CN117435457A/en
Pending legal-status Critical Current

Links

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
    • 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/3676Test management for coverage analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The embodiment of the application provides a platform performance automatic test method, a device, a medium and equipment, wherein the method comprises the following steps: acquiring all View information of a platform to be tested; compiling a monkey script based on the View respondable event area and the View respondable event type to generate a directional event stream capable of sending a target instruction to a target View; and testing the platform to be tested based on the directional event stream, and generating a test result for indicating the performance of the platform to be tested. According to the method, a monkey script is written through a View-responsive event area and a View-responsive event type based on View information, so that a directional event stream capable of sending a target instruction to a target View is generated, the platform to be tested is tested based on the directional event stream, and a test result for indicating the performance of the platform to be tested is generated. Because the View information in the platform to be tested is obtained in advance, the monkey tool can be directed to generate correct and effective event streams instead of randomly generating event streams, and generation of invalid event streams can be avoided.

Description

Platform performance automatic test method, device, medium and equipment
Technical Field
The present disclosure relates to the field of electronic communications technologies, and in particular, to a platform performance automatic testing method, device, medium, and apparatus.
Background
In an Android system-based intelligent terminal device, a developer or a tester usually performs a Monkey test in order to verify the stability of an application program. Efficiency can be low if the test is performed manually. The Monkey testing tool can replace manual work to finish the work, and a developer or a tester only needs to observe how long the tested program can be abnormal, and collect the abnormal information when the process is finished. After the Monkey program is run, the Monkey program randomly enters a certain interface of a designated application program, and then sends a random event stream (such as single click, double click, long press, sliding, gesture input, etc.) to simulate various user input events.
The following problems arise because the interface entered by the Monkey program, the generated event stream, and the response location of the event stream are all random:
a. the interface test coverage rate of high problem occurrence is low;
b. generating a plurality of invalid event streams, such as sending a plurality of single click event streams to controls that only respond to sliding events;
c. A large number of event streams are sent to areas where the event streams are not responsive.
Disclosure of Invention
The embodiment of the application provides a method, a device, a medium and equipment for automatically testing platform performance, by utilizing the method for automatically testing the platform performance, which are provided by the embodiment of the application, through acquiring all View information of a platform to be tested, writing a monkey script based on a View-responsive event area and a View-responsive event type of the View information so as to generate a directional event stream capable of sending a target instruction to a target View, testing the platform to be tested based on the directional event stream, and generating a test result for indicating the performance of the platform to be tested. Because the View information in the platform to be tested is obtained in advance, the monkey tool can be directed to generate correct and effective event streams instead of randomly generating event streams, and generation of invalid event streams can be avoided.
An aspect of the embodiments of the present application provides a platform performance automation test method, where the platform performance automation test method includes:
determining a platform to be tested;
acquiring all View information of the platform to be tested, wherein the View information comprises a View responsive event area and a View responsive event type;
Compiling a monkey script based on the View respondable event area and the View respondable event type to generate a directional event stream capable of sending a target instruction to a target View;
and testing the platform to be tested based on the directional event stream, and generating a test result for indicating the performance of the platform to be tested.
In the method for automatically testing platform performance according to the embodiment of the present application, the determining a platform to be tested includes:
the method comprises the steps of inputting a configuration file containing Activity component information into test equipment to load the configuration file to obtain a platform to be tested by pre-programming the configuration file; or (b)
Any application preloaded in the test equipment is selected as the platform to be tested.
In the method for automatically testing platform performance according to the embodiment of the present application, the obtaining all View information of the platform to be tested includes:
the method comprises the steps of obtaining the Activity component information in a configuration file of the Activity component information, and analyzing the Activity component information to obtain View information corresponding to all views.
In the method for automatically testing platform performance according to the embodiment of the application, the method further includes:
judging whether the Activity component information of all platforms to be tested comprises preset marks or not;
If a target platform to be tested comprising a preset mark exists, performing performance test on the target platform to be tested;
if all the platforms to be tested do not comprise the preset marks, traversing all the platforms to be tested to perform performance test.
In the method for automatically testing platform performance according to the embodiment of the application, the method further includes:
and if the test result is that the oriented event stream cannot be responded, generating record information indicating that the target View corresponding to the oriented event stream is abnormal.
In the method for automatically testing platform performance according to the embodiment of the present application, the target View obtains a View randomly or directionally.
In the method for automatically testing platform performance according to the embodiment of the present application, writing a monkey script based on the View-responsive event area and the View-responsive event type to generate a directional event stream capable of sending a target instruction to a target View, including:
inputting an ADB instruction;
running a Monkey script based on the View-responsive event area and the View-responsive event type through the ADB shell Monkey in the ADB instruction to start a Monkey process;
and generating a directional event stream capable of sending a target instruction to the target View through the Monkey process.
Correspondingly, another aspect of the embodiment of the application also provides a platform performance automation testing device, which comprises:
the platform determining module is used for determining a platform to be tested;
the information acquisition module is used for acquiring all View information of the platform to be tested, wherein the View information comprises a View responsive event area and a View responsive event type;
the event stream generation module is used for writing a monkey script based on the View-responsive event area and the View-responsive event type so as to generate a directional event stream capable of sending a target instruction to a target View;
and the performance testing module is used for testing the platform to be tested based on the directional event stream and generating a testing result for indicating the performance of the platform to be tested.
Accordingly, another aspect of the embodiments of the present application provides a storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the platform performance automation test method as described above.
Accordingly, another aspect of the embodiments of the present application further provides a terminal device, including a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions to perform the platform performance automation test method as described above.
The embodiment of the application provides a platform performance automatic test method, device, medium and equipment, wherein the method comprises the steps of determining a platform to be tested; acquiring all View information of the platform to be tested, wherein the View information comprises a View responsive event area and a View responsive event type; compiling a monkey script based on the View respondable event area and the View respondable event type to generate a directional event stream capable of sending a target instruction to a target View; and testing the platform to be tested based on the directional event stream, and generating a test result for indicating the performance of the platform to be tested. By using the platform performance automatic test method provided by the embodiment of the application, through obtaining all View information of the platform to be tested, a View-responsive event area based on the View information and a View-responsive event type write a monkey script to generate a directional event stream capable of sending a target instruction to a target View, test the platform to be tested based on the directional event stream, and generate a test result for indicating the performance of the platform to be tested. Because the View information in the platform to be tested is obtained in advance, the monkey tool can be directed to generate correct and effective event streams instead of randomly generating event streams, and generation of invalid event streams can be avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of an automated testing method for platform performance according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of an automated testing device for platform performance according to an embodiment of the present application.
Fig. 3 is another schematic structural diagram of an automated testing apparatus for platform performance according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by a person skilled in the art without any inventive effort, are intended to be within the scope of the present application based on the embodiments herein.
It should be noted that the following is a simple description of the background of the present solution:
it can be appreciated that in the intelligent terminal device based on the Android system, developers or testers typically perform a Monkey test in order to verify the stability of an application program. Efficiency can be low if the test is performed manually. The Monkey testing tool can replace manual work to finish the work, and a developer or a tester only needs to observe how long the tested program can be abnormal, and collect the abnormal information when the process is finished. After the Monkey program is run, the Monkey program randomly enters a certain interface of a designated application program, and then sends a random event stream (such as single click, double click, long press, sliding, gesture input, etc.) to simulate various user input events.
The following problems arise because the interface entered by the Monkey program, the generated event stream, and the response location of the event stream are all random:
a. the interface test coverage rate of high problem occurrence is low;
b. generating a plurality of invalid event streams, such as sending a plurality of single click event streams to controls that only respond to sliding events;
c. a large number of event streams are sent to areas where the event streams are not responsive.
In order to solve the technical problems, an embodiment of the application provides an automated testing method for platform performance. By using the platform performance automatic test method provided by the embodiment of the application, through obtaining all View information of the platform to be tested, a View-responsive event area based on the View information and a View-responsive event type write a monkey script to generate a directional event stream capable of sending a target instruction to a target View, test the platform to be tested based on the directional event stream, and generate a test result for indicating the performance of the platform to be tested. Because the View information in the platform to be tested is obtained in advance, the monkey tool can be directed to generate correct and effective event streams instead of randomly generating event streams, and generation of invalid event streams can be avoided.
Referring to fig. 1, fig. 1 is a flow chart of an automated testing method for platform performance according to an embodiment of the present application. The platform performance automatic test method is applied to terminal equipment. Optionally, the terminal device is a terminal or a server. Optionally, the server is an independent physical server, or a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and the like. Optionally, the terminal is a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, and the like, but is not limited thereto.
In an embodiment, the method may comprise the steps of:
step 101, determining a platform to be tested.
In this embodiment, the platform to be tested may be obtained by:
1. and inputting the configuration file into the test equipment to load to obtain the platform to be tested by pre-writing the configuration file containing the Activity component information. The Activity component is a basic component of the Android system and is responsible for interactive operation between the system and a user. The Activity component information consists of a package name and a Class name of the Activity, namely the platform to be tested can be a self-defined developed application program.
2. Any application preloaded in the test device is selected as the platform to be tested, i.e. the platform to be tested may be any application (e.g. app) already downloaded in the test device.
Step 102, obtaining all View information of the platform to be tested, wherein the View information comprises a View responsive event area and a View responsive event type.
It should be explained that one application may include a plurality of Activity components, and one Activity component may include a plurality of views. In Android, all visual controls are called views, and all controls inherit from views.
Wherein the following are more commonly used: view (TextView) processing text content; clicked View (Button); view (ImageView) of the processing of the picture content; view (EditText) receiving user information input; view (ProgressBar) of the progress bar class.
View may respond to event regions: rectangular region, x-axis range is [ view. Left, view. Left+view. Width ], y-axis range is [ view. Top, view. Height ].
View may respond to event types: single click, double click, long press, swipe, gesture input, etc.
In this embodiment, after determining the platform to be tested, the View information corresponding to all views in the platform to be tested needs to be obtained. Specifically, the Activity component information in the configuration file of the Activity component information is obtained, and the Activity component information is analyzed to obtain the View information corresponding to all views.
And step 103, writing a monkey script based on the View-responded event area and the View-responded event type to generate a directional event stream capable of sending a target instruction to the target View.
In this embodiment, by inputting an ADB instruction to the test apparatus; running a Monkey script based on a View-responsive event area and a View-responsive event type through an ADB shell Monkey in the ADB instruction to start a Monkey process; and generating a directional event stream capable of sending a target instruction to a target View (the target View is a randomly or directionally acquired View) through a Monkey process. The method has the advantages that the directional event stream is generated in a targeted mode, and acts on the correct control to perform performance test, so that the testing efficiency and accuracy of the Monkey tool are greatly improved.
The ADB is called Android Debug Bridge, and functions as a debug bridge, and is a client-server program. The client is a computer used for operation, and the server is Android equipment.
ADB is also a tool in the Android SDK, and can directly operate and manage an Android simulator or real Android equipment.
And 104, testing the platform to be tested based on the directional event stream, and generating a test result for indicating the performance of the platform to be tested.
If the test result is that the oriented event stream cannot be responded, record information indicating that the target View corresponding to the oriented event stream is abnormal is generated.
In some embodiments, the method further comprises the steps of:
judging whether the Activity component information of all platforms to be tested comprises preset marks or not;
if a target platform to be tested comprising a preset mark exists, performing performance test on the target platform to be tested;
if all the platforms to be tested do not comprise the preset marks, traversing all the platforms to be tested to perform performance test.
If the Activity component information includes a preset mark-p, an Activity component containing a < category android = "name =" android. Intent. Category. MONKEY "/> tag in the response packet name is started; if the Activity component information does not include the preset mark-p, all < category android in the device are searched for Activity components of name= "android.intent.category MONKEY"/> tag, and the device is started in a traversal mode.
By setting a tag "-p" for the important test points in the configuration file in advance, the monkey can orient the test target points after generating the event stream, for example, a mobile phone interface contains 10 apps, wherein only 1 app is marked, and the event stream generated by the monkey can only be tested for the marked app.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein in detail.
In particular, the present application is not limited by the order of execution of the steps described, and certain steps may be performed in other orders or concurrently without conflict.
From the above, the platform performance automatic test method provided by the embodiment of the application determines the platform to be tested; acquiring all View information of the platform to be tested, wherein the View information comprises a View responsive event area and a View responsive event type; compiling a monkey script based on the View respondable event area and the View respondable event type to generate a directional event stream capable of sending a target instruction to a target View; and testing the platform to be tested based on the directional event stream, and generating a test result for indicating the performance of the platform to be tested. By using the platform performance automatic test method provided by the embodiment of the application, through obtaining all View information of the platform to be tested, a View-responsive event area based on the View information and a View-responsive event type write a monkey script to generate a directional event stream capable of sending a target instruction to a target View, test the platform to be tested based on the directional event stream, and generate a test result for indicating the performance of the platform to be tested. Because the View information in the platform to be tested is obtained in advance, the monkey tool can be directed to generate correct and effective event streams instead of randomly generating event streams, and generation of invalid event streams can be avoided.
The embodiment of the application also provides a platform performance automatic testing device which can be integrated in the terminal equipment.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an automated testing apparatus for platform performance according to an embodiment of the present application. The platform performance automation test device 30 may include:
a platform determination module 31 for determining a platform to be tested;
the information obtaining module 32 is configured to obtain all View information of the platform to be tested, where the View information includes a View-responsive event area and a View-responsive event type;
the event stream generating module 33 is configured to write a monkey script based on the View-responsive event area and the View-responsive event type, so as to generate a directional event stream capable of sending a target instruction to a target View;
the performance testing module 34 is configured to test the platform to be tested based on the directional event stream, and generate a test result for indicating the performance of the platform to be tested.
In some embodiments, the platform determining module 31 is configured to pre-write a configuration file containing Activity component information, and input the configuration file into a testing device to load to obtain a platform to be tested; or any application preloaded in the test equipment is selected as the platform to be tested.
In some embodiments, the information obtaining module 32 is configured to obtain Activity component information in a configuration file of the Activity component information, and parse the Activity component information to obtain View information corresponding to all views.
In some embodiments, the device further includes a judging module, configured to judge whether the Activity component information of all the platforms to be tested includes a preset mark; if a target platform to be tested comprising a preset mark exists, performing performance test on the target platform to be tested; if all the platforms to be tested do not comprise the preset marks, traversing all the platforms to be tested to perform performance test.
In some embodiments, the apparatus further includes a recording module configured to generate recording information indicating that a target View corresponding to the directional event stream is abnormal if the test result indicates that the directional event stream cannot be responded.
In some embodiments, the target View obtains one View for random or directional.
In some embodiments, the event stream generation module 33 is configured to input ADB instructions; running a Monkey script based on the View-responsive event area and the View-responsive event type through the ADB shell Monkey in the ADB instruction to start a Monkey process; and generating a directional event stream capable of sending a target instruction to the target View through the Monkey process.
In specific implementation, each module may be implemented as a separate entity, or may be combined arbitrarily and implemented as the same entity or several entities.
As can be seen from the above, the platform performance automatic test device 30 provided in the embodiments of the present application, wherein the platform determination module 31 is configured to determine a platform to be tested; the information obtaining module 32 is configured to obtain all View information of the platform to be tested, where the View information includes a View-responsive event area and a View-responsive event type; the event stream generating module 33 is configured to write a monkey script based on the View-responsive event area and the View-responsive event type, so as to generate a directional event stream capable of sending a target instruction to a target View; the performance test module 34 is configured to test the platform to be tested based on the directional event stream, and generate a test result for indicating the performance of the platform to be tested.
In specific implementation, each module may be implemented as a separate entity, or may be combined arbitrarily and implemented as the same entity or several entities.
Referring to fig. 3, fig. 3 is another schematic structural diagram of a platform performance automation testing device according to an embodiment of the present application, where the platform performance automation testing device 30 includes a memory 120, one or more processors 180, and one or more application programs, and the one or more application programs are stored in the memory 120 and configured to be executed by the processors 180; the processor 180 may include a platform determination module 31, an information acquisition module 32, an event stream generation module 33, and a performance test module 34. For example, the structures and connection relationships of the above respective components may be as follows:
Memory 120 may be used to store applications and data. The memory 120 stores application programs including executable code. Applications may constitute various functional modules. The processor 180 executes various functional applications and data processing by running application programs stored in the memory 120. In addition, memory 120 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 volatile solid-state storage device. Accordingly, the memory 120 may also include a memory controller to provide access to the memory 120 by the processor 180.
The processor 180 is a control center of the device, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the device and processes data by running or executing application programs stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the device. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system, user interfaces, application programs, and the like.
In particular, in this embodiment, the processor 180 loads executable codes corresponding to the processes of one or more application programs into the memory 120 according to the following instructions, and the processor 180 executes the application programs stored in the memory 120, so as to implement various functions:
a determining instruction, configured to determine, when a drag operation acting on a target application window in a current display screen is detected, a reference boundary of the target application window according to a drag direction of the target application window relative to the current display screen;
a platform determining instruction for determining a platform to be tested;
the information acquisition instruction is used for acquiring all View information of the platform to be tested, wherein the View information comprises a View responsive event area and a View responsive event type;
an event stream generation instruction, which is used for writing a monkey script based on the View-responsive event area and the View-responsive event type so as to generate a directional event stream capable of sending a target instruction to a target View;
and the performance test instruction is used for testing the platform to be tested based on the directional event stream and generating a test result for indicating the performance of the platform to be tested.
In some embodiments, the platform determining instruction is configured to pre-write a configuration file containing Activity component information, and input the configuration file into a testing device to load to obtain a platform to be tested; or any application preloaded in the test equipment is selected as the platform to be tested.
In some embodiments, the information obtaining instruction is configured to obtain Activity component information in a configuration file of the Activity component information, and parse the Activity component information to obtain View information corresponding to all views.
In some embodiments, the program further includes a judging instruction, configured to judge whether the Activity component information of all the platforms to be tested includes a preset mark; if a target platform to be tested comprising a preset mark exists, performing performance test on the target platform to be tested; if all the platforms to be tested do not comprise the preset marks, traversing all the platforms to be tested to perform performance test.
In some embodiments, the program further includes a record instruction for generating record information indicating that the target View corresponding to the directed event stream is abnormal if the test result is that the directed event stream cannot be responded.
In some embodiments, the target View obtains one View for random or directional.
In some embodiments, the event stream generation instruction is for inputting an ADB instruction; running a Monkey script based on the View-responsive event area and the View-responsive event type through the ADB shell Monkey in the ADB instruction to start a Monkey process; and generating a directional event stream capable of sending a target instruction to the target View through the Monkey process.
The embodiment of the application also provides terminal equipment. The terminal equipment can be a server, a smart phone, a computer, a tablet personal computer and the like.
Referring to fig. 4, fig. 4 shows a schematic structural diagram of a terminal device provided in an embodiment of the present application, where the terminal device may be used to implement the platform performance automation test method provided in the foregoing embodiment. The terminal device 1200 may be a television or a smart phone or a tablet computer.
As shown in fig. 4, the terminal device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer readable storage mediums, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190. It will be appreciated by those skilled in the art that the configuration of the terminal device 1200 shown in fig. 4 does not constitute a limitation of the terminal device 1200, and may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components. Wherein:
The RF circuit 110 is configured to receive and transmit electromagnetic waves, and to perform mutual conversion between the electromagnetic waves and the electrical signals, so as to communicate with a communication network or other devices. RF circuitry 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and the like. The RF circuitry 110 may communicate with various networks such as the internet, intranets, wireless networks, or other devices via wireless networks.
The memory 120 may be used to store software programs and modules, such as program instructions/modules corresponding to the platform performance automation test method in the above embodiment, and the processor 180 executes various functional applications and data processing by running the software programs and modules stored in the memory 120, so that the vibration reminding mode can be automatically selected according to the current scene where the terminal device is located to perform the platform performance automation test, which not only can ensure that the scenes such as a conference are not disturbed, but also can ensure that the user can perceive an incoming call, and the intelligence of the terminal device is improved. Memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 120 may further include memory remotely located relative to processor 180, which may be connected to terminal device 1200 via 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 unit 130 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may comprise a touch sensitive surface 131 and other input devices 132. The touch sensitive surface 131, also referred to as a touch display screen or touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch sensitive surface 131 or thereabout by any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a pre-set program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection device and a touch controller. The touch control detection device detects the touch control direction of a user, detects signals brought by touch control operation and transmits the signals to the touch control controller; the touch controller receives touch information from the touch detection device, converts the touch information into touch coordinates, sends the touch coordinates to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch-sensitive surface 131 may be implemented in various types of resistive, capacitive, infrared, surface acoustic wave, and the like. In addition to the touch-sensitive surface 131, the input unit 130 may also comprise other input devices 132. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 140 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the terminal device 1200, which may be composed of graphics, text, icons, video, and any combination thereof. The display unit 140 may include a display panel 141, and alternatively, the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display ), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and after the touch-sensitive surface 131 detects a touch operation thereon or thereabout, the touch-sensitive surface is transferred to the processor 180 to determine a type of touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of touch event. Although in fig. 4 the touch-sensitive surface 131 and the display panel 141 are implemented as two separate components for input and output functions, in some embodiments the touch-sensitive surface 131 may be integrated with the display panel 141 to implement the input and output functions.
The terminal device 1200 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or the backlight when the terminal device 1200 moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile phone is stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the terminal device 1200 are not described in detail herein.
Audio circuitry 160, speaker 161, microphone 162 may provide an audio interface between a user and terminal device 1200. The audio circuit 160 may transmit the received electrical signal converted from audio data to the speaker 161, and the electrical signal is converted into a sound signal by the speaker 161 to be output; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, receives the electrical signal from the audio circuit 160, converts the electrical signal into audio data, outputs the audio data to the processor 180 for processing, transmits the audio data to, for example, another terminal via the RF circuit 110, or outputs the audio data to the memory 120 for further processing. Audio circuitry 160 may also include an ear bud jack to provide communication of the peripheral headphones with terminal device 1200.
Terminal device 1200 may facilitate user email, web browsing, streaming media access, etc. via a transmission module 170 (e.g., wi-Fi module) that provides wireless broadband internet access to the user. Although fig. 4 shows the transmission module 170, it is understood that it does not belong to the essential constitution of the terminal device 1200, and may be omitted entirely as needed within the scope of not changing the essence of the invention.
The processor 180 is a control center of the terminal device 1200, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal device 1200 and processes data by running or executing software programs and/or modules stored in the memory 120, and calling data stored in the memory 120, thereby performing overall monitoring of the mobile phone. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor that primarily processes operating systems, user interfaces, applications, etc., with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The terminal device 1200 also includes a power supply 190 that provides power to the various components, and in some embodiments, may be logically coupled to the processor 180 via a power management system to perform functions such as managing discharge, and managing power consumption via the power management system. The power supply 190 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal device 1200 may further include a camera (such as a front camera, a rear camera), a bluetooth module, etc., which will not be described herein. In particular, in the present embodiment, the display unit 140 of the terminal device 1200 is a touch screen display, the terminal device 1200 further includes a memory 120, and one or more programs, wherein the one or more programs are stored in the memory 120 and configured to be executed by the one or more processors 180, the one or more programs include instructions for:
a determining instruction, configured to determine, when a drag operation acting on a target application window in a current display screen is detected, a reference boundary of the target application window according to a drag direction of the target application window relative to the current display screen;
A determining instruction, configured to determine, when a drag operation acting on a target application window in a current display screen is detected, a reference boundary of the target application window according to a drag direction of the target application window relative to the current display screen;
a platform determining instruction for determining a platform to be tested;
the information acquisition instruction is used for acquiring all View information of the platform to be tested, wherein the View information comprises a View responsive event area and a View responsive event type;
an event stream generation instruction, which is used for writing a monkey script based on the View-responsive event area and the View-responsive event type so as to generate a directional event stream capable of sending a target instruction to a target View;
and the performance test instruction is used for testing the platform to be tested based on the directional event stream and generating a test result for indicating the performance of the platform to be tested.
In some embodiments, the platform determining instruction is configured to pre-write a configuration file containing Activity component information, and input the configuration file into a testing device to load to obtain a platform to be tested; or any application preloaded in the test equipment is selected as the platform to be tested.
In some embodiments, the information obtaining instruction is configured to obtain Activity component information in a configuration file of the Activity component information, and parse the Activity component information to obtain View information corresponding to all views.
In some embodiments, the program further includes a judging instruction, configured to judge whether the Activity component information of all the platforms to be tested includes a preset mark; if a target platform to be tested comprising a preset mark exists, performing performance test on the target platform to be tested; if all the platforms to be tested do not comprise the preset marks, traversing all the platforms to be tested to perform performance test.
In some embodiments, the program further includes a record instruction for generating record information indicating that the target View corresponding to the directed event stream is abnormal if the test result is that the directed event stream cannot be responded.
In some embodiments, the target View obtains one View for random or directional.
In some embodiments, the event stream generation instruction is for inputting an ADB instruction; running a Monkey script based on the View-responsive event area and the View-responsive event type through the ADB shell Monkey in the ADB instruction to start a Monkey process; and generating a directional event stream capable of sending a target instruction to the target View through the Monkey process.
The embodiment of the application also provides terminal equipment. The terminal equipment can be a smart phone, a computer and other equipment.
As can be seen from the above, the embodiments of the present application provide a terminal device 1200, where the terminal device 1200 performs the following steps:
determining a platform to be tested;
acquiring all View information of the platform to be tested, wherein the View information comprises a View responsive event area and a View responsive event type;
compiling a monkey script based on the View respondable event area and the View respondable event type to generate a directional event stream capable of sending a target instruction to a target View;
and testing the platform to be tested based on the directional event stream, and generating a test result for indicating the performance of the platform to be tested.
The embodiment of the application further provides a storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer executes the platform performance automation test method according to any one of the embodiments.
It should be noted that, for the platform performance automatic test method described in the present application, it will be understood by those skilled in the art that all or part of the flow of implementing the platform performance automatic test method described in the embodiments of the present application may be implemented by controlling related hardware through a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory of a terminal device, and executed by at least one processor in the terminal device, and the execution process may include the flow of the embodiment of the platform performance automatic test method. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a random access Memory (RAM, random Access Memory), or the like.
For the platform performance automatic testing device in the embodiment of the present application, each functional module may be integrated in one processing chip, or each module may exist separately and physically, or two or more modules may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated module, if implemented as a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium such as read-only memory, magnetic or optical disk, etc.
The method, the device, the medium and the equipment for automatically testing the platform performance provided by the embodiment of the application are described in detail. The principles and embodiments of the present application are described herein with specific examples, the above examples being provided only to assist in understanding the methods of the present application and their core ideas; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. An automated testing method for platform performance, comprising:
determining a platform to be tested;
acquiring all View information of the platform to be tested, wherein the View information comprises a View responsive event area and a View responsive event type;
compiling a monkey script based on the View respondable event area and the View respondable event type to generate a directional event stream capable of sending a target instruction to a target View;
and testing the platform to be tested based on the directional event stream, and generating a test result for indicating the performance of the platform to be tested.
2. The automated testing method of platform performance according to claim 1, wherein the determining the platform to be tested comprises:
the method comprises the steps of inputting a configuration file containing Activity component information into test equipment to load the configuration file to obtain a platform to be tested by pre-programming the configuration file; or (b)
Any application preloaded in the test equipment is selected as the platform to be tested.
3. The method for automatically testing platform performance according to claim 1, wherein the obtaining all View information of the platform to be tested comprises:
the method comprises the steps of obtaining the Activity component information in a configuration file of the Activity component information, and analyzing the Activity component information to obtain View information corresponding to all views.
4. The automated platform performance testing method of claim 1, wherein the method further comprises:
judging whether the Activity component information of all platforms to be tested comprises preset marks or not;
if a target platform to be tested comprising a preset mark exists, performing performance test on the target platform to be tested;
if all the platforms to be tested do not comprise the preset marks, traversing all the platforms to be tested to perform performance test.
5. The automated platform performance testing method of claim 1, wherein the method further comprises:
and if the test result is that the oriented event stream cannot be responded, generating record information indicating that the target View corresponding to the oriented event stream is abnormal.
6. The automated platform performance testing method of claim 1, wherein the target View is a random or directed acquisition View.
7. The method of claim 1, wherein the programming a monkey script based on the View-responsive event area and the View-responsive event type to generate a directed event stream capable of issuing a target instruction to a target View comprises:
Inputting an ADB instruction;
running a Monkey script based on the View-responsive event area and the View-responsive event type through the ADB shell Monkey in the ADB instruction to start a Monkey process;
and generating a directional event stream capable of sending a target instruction to the target View through the Monkey process.
8. An automated testing device for platform performance, comprising:
the platform determining module is used for determining a platform to be tested;
the information acquisition module is used for acquiring all View information of the platform to be tested, wherein the View information comprises a View responsive event area and a View responsive event type;
the event stream generation module is used for writing a monkey script based on the View-responsive event area and the View-responsive event type so as to generate a directional event stream capable of sending a target instruction to a target View;
and the performance testing module is used for testing the platform to be tested based on the directional event stream and generating a testing result for indicating the performance of the platform to be tested.
9. A computer readable storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor to perform the platform performance automation test method of any of claims 1-7.
10. A terminal device comprising a processor and a memory, the memory storing a plurality of instructions, the processor loading the instructions to perform the platform performance automation test method of any one of claims 1-7.
CN202310186497.XA 2023-02-21 2023-02-21 Platform performance automatic test method, device, medium and equipment Pending CN117435457A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310186497.XA CN117435457A (en) 2023-02-21 2023-02-21 Platform performance automatic test method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310186497.XA CN117435457A (en) 2023-02-21 2023-02-21 Platform performance automatic test method, device, medium and equipment

Publications (1)

Publication Number Publication Date
CN117435457A true CN117435457A (en) 2024-01-23

Family

ID=89548641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310186497.XA Pending CN117435457A (en) 2023-02-21 2023-02-21 Platform performance automatic test method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN117435457A (en)

Similar Documents

Publication Publication Date Title
CN109582579B (en) Application program testing method and device, electronic equipment and storage medium
CN107038112B (en) Application interface debugging method and device
CN108536594B (en) Page testing method and device and storage equipment
CN109947650B (en) Script step processing method, device and system
CN109753425B (en) Popup window processing method and device
CN111078556B (en) Application testing method and device
CN107390923B (en) Screen false touch prevention method and device, storage medium and terminal
CN107450838B (en) Response method and device of black screen gesture, storage medium and mobile terminal
CN109451130B (en) Mobile terminal testing method and device, mobile terminal and storage medium
WO2019019818A1 (en) Method and apparatus for accelerating black screen gesture processing, storage medium, and mobile terminal
CN110069407B (en) Function test method and device for application program
CN112199246B (en) Terminal test method and device, storage medium and mobile terminal
CN111427644B (en) Target behavior identification method and electronic equipment
CN109739758B (en) Test case conversion method and device
CN109871324B (en) Control operation method and device
CN115600213A (en) Vulnerability management method, device, medium and equipment based on application program
CN115328770A (en) Application program testing method and device, electronic equipment and storage medium
CN111027406B (en) Picture identification method and device, storage medium and electronic equipment
CN117435457A (en) Platform performance automatic test method, device, medium and equipment
CN114510417A (en) Image rendering effect testing method and device, electronic equipment and storage medium
CN113392120A (en) Method and device for acquiring execution information of SQLite
CN115237317B (en) Data display method and device, electronic equipment and storage medium
CN105988801B (en) Method and device for displaying annotation information
CN113282472B (en) Performance test method and device
CN116662151A (en) Debugging method and device based on service orchestration, terminal 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