Test method and device and electronic equipment

By automatically acquiring and processing performance-related information through electronic devices, the problem of the complexity of manually configuring performance indicators is solved, enabling efficient and accurate performance testing and improving the user experience.

CN122072610APending Publication Date: 2026-05-22BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-11-20
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

In existing technologies, manually configuring performance indicators is highly complex, resulting in low efficiency and accuracy in performance testing.

Method used

Electronic devices automatically acquire performance-related information generated during the test task, determine the primary performance indicators, and store and display the test results, reducing manual configuration steps.

Benefits of technology

It improves the efficiency and accuracy of performance testing, reduces complexity, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122072610A_ABST
    Figure CN122072610A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a test method and device and electronic device.The method comprises the steps that in response to running of a test task, first information is obtained, and the first information comprises information generated in the running process of the test task and associated with performance; based on the first information, determining a first performance index in the running process of the test task, and storing the first performance index; and in response to the end of the test task, displaying a result of the test task, the result of the test task including a test result of the first performance index.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of software testing technology, and more particularly to a testing method, apparatus, and electronic device. Background Technology

[0002] Performing performance testing on an application during development can prevent performance degradation caused by the development process.

[0003] Currently, users can pre-configure multiple performance metrics for a test task and associate the test task with these pre-configured metrics. During test task execution, the electronic device can collect the results corresponding to the pre-configured performance metrics, thereby achieving performance testing. However, manually configuring performance metrics is complex, resulting in low efficiency for performance testing. Summary of the Invention

[0004] This disclosure provides a testing method, apparatus, and electronic device to address technical problems in the prior art.

[0005] In a first aspect, embodiments of this disclosure provide a testing method, the testing method comprising:

[0006] In response to the execution of a test task, first information is acquired, the first information including performance-related information generated during the execution of the test task;

[0007] Based on the first information, a first performance indicator is determined during the operation of the test task, and the first performance indicator is stored.

[0008] In response to the completion of the test task, the results of the test task are displayed, including the test results of the first performance metric.

[0009] Secondly, embodiments of this disclosure provide a testing apparatus, which includes an acquisition module, a determination module, a storage module, and a display module, wherein:

[0010] The acquisition module is used to acquire first information in response to the execution of the test task, the first information including performance-related information generated during the execution of the test task;

[0011] The determining module is used to determine a first performance indicator during the operation of the test task based on the first information.

[0012] The storage module is used to store the first performance metric;

[0013] The display module is used to display the results of the test task in response to the end of the test task, the results of the test task including the test results of the first performance index.

[0014] Thirdly, this disclosure provides an electronic device comprising: a processor and a memory;

[0015] The memory stores computer-executed instructions;

[0016] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the test methods described in the first aspect above and various possible aspects of the first aspect.

[0017] Fourthly, this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the test methods described in the first aspect above and various possible aspects of the first aspect.

[0018] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the test methods described in the first aspect above and various possible aspects of the first aspect.

[0019] This disclosure provides a testing method, apparatus, and electronic device. In response to the execution of a test task, the electronic device can acquire first information, which includes performance-related information generated during the test task's execution. Based on the first information, the electronic device determines and stores a first performance indicator during the test task's execution. Upon completion of the test task, the electronic device displays the test result, which may include the test result of the first performance indicator. In this method, since the electronic device can automatically acquire the first information and determine the first performance indicator from it, the user does not need to pre-configure multiple performance indicators for the test task. Furthermore, since the first information comprises all performance-related information generated during the test task's execution, the first performance indicator has good comprehensiveness, thus improving the efficiency and accuracy of performance testing. Finally, since the electronic device can display the test result of each first performance indicator related to the test task, the user experience is improved. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0022] Figure 2 A flowchart illustrating a testing method provided in an embodiment of this disclosure;

[0023] Figure 3 A schematic diagram of a first piece of information provided in an embodiment of this disclosure;

[0024] Figure 4 A schematic diagram illustrating a process for determining a first performance index provided in an embodiment of this disclosure;

[0025] Figure 5 A schematic diagram illustrating the result of a test task provided in an embodiment of this disclosure;

[0026] Figure 6 This is a schematic diagram of a method for storing a first performance index provided in an embodiment of the present disclosure;

[0027] Figure 7 A schematic diagram illustrating a process for storing a second performance metric provided in an embodiment of this disclosure;

[0028] Figure 8 This is a schematic diagram illustrating a method for storing multiple sets of fourth information provided in an embodiment of this disclosure;

[0029] Figure 9 This is a schematic diagram of the structure of a testing device provided in an embodiment of the present disclosure;

[0030] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0031] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0032] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0033] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0034] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0035] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0036] For ease of understanding, the concepts involved in the embodiments of this disclosure will be explained below.

[0037] Electronic device: A device with wireless transceiver capabilities. Electronic devices can be deployed on land, including indoors or outdoors, handheld, wearable, or vehicle-mounted. These electronic devices can be mobile phones, tablet computers, computers with wireless transceiver capabilities, virtual reality (VR) electronic devices, augmented reality (AR) electronic devices, wireless terminals in industrial control, vehicle-mounted electronic devices, wireless terminals in self-driving vehicles, wireless electronic devices in remote medical care, wireless electronic devices in smart grids, wireless electronic devices in transportation safety, wireless electronic devices in smart cities, wireless electronic devices in smart homes, wearable electronic devices, etc. The electronic devices involved in the embodiments of this disclosure can also be referred to as terminals, user equipment (UE), access terminal equipment, vehicle-mounted terminals, industrial control terminals, UE units, UE stations, mobile stations, mobile stations, remote stations, remote terminal equipment, mobile devices, UE terminal equipment, wireless communication equipment, UE agents, or UE devices, etc. Electronic devices can also be fixed or mobile.

[0038] In related technologies, performance testing during application development can prevent performance degradation caused by the development process. For example, during application development, the first frame latency might increase. Therefore, performance testing can accurately determine whether the first frame latency has increased, thus effectively preventing performance degradation. Currently, application performance testing can be performed manually. For example, users can pre-configure multiple performance metrics for a test task and associate the test task with these pre-configured metrics. During the execution of the test task, the electronic device can collect relevant results based on the pre-configured performance metrics, thereby achieving application performance testing. However, manually configuring performance metrics is complex and may result in omissions, leading to low efficiency and accuracy in performance testing.

[0039] To address the technical problems in related technologies, this disclosure provides a testing method. An electronic device, in response to the execution of a test task, acquires first performance-related information generated during the test task's execution. Within this first information, multiple sets of second information are determined. Each set of second information includes an event identifier and event parameters. These multiple sets of second information are different. Based on these multiple sets of second information, the electronic device can determine and store a first performance indicator during the test task's execution. Upon the completion of the test task, the electronic device can display the test results, including the test results of the first performance indicator. In this method, since the electronic device can determine the first performance indicator from the first information, and the first information comprises all performance-related information generated during the test task's execution, there is no need for the user to pre-configure multiple performance indicators for the test task. The comprehensiveness of the first performance indicator is good, thus improving the efficiency and accuracy of performance testing.

[0040] Below, in conjunction with Figure 1 The application scenarios of the embodiments of this disclosure will be described.

[0041] Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of this disclosure. Please refer to [link / reference]. Figure 1 This includes test cases. Electronic devices ( Figure 1(Not shown) can run this test case. During the test case execution, the electronic device can acquire the performance metrics 1, 2, ..., n associated with the test case and store n performance metrics in the metric library. At the end of the test, the electronic device can display the test results, which may include performance metrics 1, 2, ..., n, and the test result corresponding to each performance metric. This reduces the complexity of performance testing, improves the comprehensiveness of performance testing, and enhances the efficiency and accuracy of performance testing.

[0042] It should be noted that, Figure 1 This is an example of an application scenario for the embodiments of this disclosure, and is not intended to limit the application scenarios of the embodiments of this disclosure.

[0043] The technical solutions of this disclosure and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this disclosure will now be described with reference to the accompanying drawings.

[0044] Figure 2 This is a flowchart illustrating a testing method provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 2 The method may include:

[0045] S201. In response to the execution of the test task, obtain the first information.

[0046] The execution subject of this disclosure can be an electronic device or a testing device installed in an electronic device. The testing device can be implemented based on software, or it can be implemented based on a combination of software and hardware; this disclosure does not limit this. Optionally, the electronic device can be any device with on-device computing capabilities. For example, the electronic device can be a computer, a server, etc.

[0047] Test tasks can be used to test the functionality and performance of an application. For example, a test task can be used to test whether the application functions as expected. Alternatively, a test task can be used to test the application's performance metrics.

[0048] Optionally, the test task may include any test-related information such as test cases and test environment. This embodiment of the present disclosure does not limit this. Furthermore, the electronic device may obtain the test task based on any feasible implementation method. This embodiment of the present disclosure does not limit this.

[0049] After the test task begins, the electronic device can acquire first information. This first information may include performance-related information generated during the test task's execution. For example, performance may include any performance parameters such as first frame time, frame rate, resolution, and first frame duration; this embodiment of the disclosure does not limit this. For instance, performance-related information may include code associated with first frame time (e.g., the duration of the first frame) and code associated with the frame rate.

[0050] Optionally, the first information may include application log information. For example, during the execution of a test task, the first information acquired by the electronic device may include the log information of the application corresponding to the test task.

[0051] Optionally, the first information may include event tracking information. For example, a user can pre-add event tracking points in the application corresponding to the test task. During the test task, the electronic device can obtain the event tracking information to obtain the first information.

[0052] The electronic device can obtain the first information by acquiring the first tracking point in the application associated with the test task, and then acquiring the first information based on the tracking point. In this way, the electronic device can accurately acquire the first information based on the tracking point, thereby improving the accuracy of performance testing.

[0053] The application can be a program associated with the test task. For example, if the test task is used to test the functionality of application 1, then the application associated with the test task is application 1; if the test task is used to test the performance of application 2, then the application associated with the test task is application 2.

[0054] The first tracking point can be a tracking point within the application. For example, tracking is a technique for inserting code into an application. Tracking points can be used to collect information about specific events. The first tracking point can be a tracking point that the user pre-inserts into multiple functions of the application. For example, the application may include a shooting function and a recording function, and the user can pre-insert the first tracking point into the shooting function and the recording function. For example, the first tracking point can be a tracking point inserted into every function of the application, or it can be a tracking point inserted into some functions of the application. This disclosure does not limit this.

[0055] Optionally, the electronic device may pre-insert the first embedded point into the application based on any feasible implementation method, and this disclosure embodiment does not limit this.

[0056] Specifically, the electronic device obtains first information based on the first embedded point, which can be done by: determining a second embedded point in the first embedded point, obtaining the information of the second embedded point, and determining the information of the second embedded point as the first information.

[0057] The identifier for the second tracking point is a preset identifier. For example, the identifier for the second tracking point can indicate the business line to which it belongs. For instance, during the development of an application, there may be multiple business lines. During the performance testing of the application, the user can test the performance of at least one of the multiple business lines. Therefore, the identifier for the second tracking point can be the identifier of the business line to which it belongs.

[0058] The preset identifier can be the identifier of the business line to which the function to be tested belongs. For example, the application may include a shooting function and a video playback function. The shooting function includes a tracking point 1, and the video playback function includes a tracking point 2. The identifier of tracking point 1 is the identifier of the business line to which the shooting function belongs, and the identifier of tracking point 2 is the identifier of the business line to which the video playback function belongs. If the electronic device tests the performance of the shooting function, the preset identifier can be the identifier of the business line to which the shooting function belongs. In this way, the electronic device can determine tracking point 1 as the second tracking point based on the preset identifier.

[0059] Optionally, the electronic device can determine the second tracking point from the first tracking point based on any feasible implementation method, and this embodiment of the present disclosure does not limit this. For example, the electronic device can determine whether the stack of the first tracking point comes from the target business line at the interception point of the first tracking point. If so, the electronic device can determine the first tracking point as the second tracking point; if not, the electronic device can determine that the first tracking point is not the second tracking point. In this way, the electronic device can filter the first tracking point, collect information of tracking points related to the business line, reduce interference data, improve the accuracy of the first information, and improve the efficiency of performance testing.

[0060] The second tracking point can be event information collected based on tracking technology. For example, the second tracking point information may include information generated when the user interacts with the application. For example, the second tracking point information may include information about the controls clicked by the user, the duration of the user's stay on the page, etc.

[0061] Optionally, the information of the second tracking point may include events and event parameters. For example, the second tracking point information may include an event that records the performance of the first frame, and the parameters of the event may include the original duration of the first frame (the duration of the first frame before the code change) and the new duration of the first frame (the duration of the first frame after the code change).

[0062] Optionally, the electronic device can obtain the information of the second tracking point at the entry point of the second tracking point. For example, the electronic device can use Aspect-Oriented Programming (AOP) (such as instrumentation) to uniformly intercept at the entry point of the second tracking point, extract the information of the second tracking point, and store it in a file.

[0063] Once the electronic device determines the information of the second embedded point, it can define the information of the second embedded point as the first information. In this way, the first information can include multiple performance indicators related to the performance of the application during the test task, thereby improving the accuracy of performance testing.

[0064] Optionally, when testing the functionality of an application, the electronic device can acquire first information, so that the data used for functional testing and performance testing are the same, thereby improving the reliability and accuracy of performance testing.

[0065] Below, in conjunction with Figure 3 The first piece of information will be explained.

[0066] Figure 3 This is a schematic diagram illustrating a first type of information provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 3 This includes: First Information. First Information may include information related to multiple events, such as event a and event b. Event a records the performance of the first frame, and event a may include parameter 1, parameter 2, and parameter 3. Parameter 1 can be the original duration of the first frame, which is 860 milliseconds; parameter 2 can be the duration of the new first frame, which is 880 milliseconds; and parameter 3 can be the first frame of the page (the page's first frame).

[0067] Please see Figure 3 Event b is the event for editing the performance of the first frame. Event b can include parameters 4, 5, and 6. Parameter 4 can be the duration of the first frame (1000 milliseconds), parameter 5 can be the duration of the first UI element (1200 milliseconds), and parameter 6 can be the first frame of the shooting page (the source of the input). In this way, the initial information can include all performance-related events and their parameters, thereby improving the accuracy of performance testing.

[0068] S202. Based on the first information, determine the first performance indicator during the test task execution process.

[0069] The first performance metric can be used to indicate the performance of the application corresponding to the test task. For example, the first performance metric can indicate the time taken to render the first frame, the duration of the first frame, and the duration of the first UI element.

[0070] The electronic device can determine the first performance index during the test task operation based on the following feasible implementation method: determine multiple sets of second information from the first information, and determine the first performance index based on the multiple sets of second information.

[0071] Each set of second information may include the event identifier and the event parameters. For example, in Figure 3 In the illustrated embodiment, event 'a' of the first information may include second information 1, second information 2, second information 3, and second information 4, wherein second information 1 is event 'a' + parameter 1, second information 2 is event 'a' + parameter 2, second information 3 is event 'a' + parameter 1 + parameter 3, and second information 4 is event 'a' + parameter 2 + parameter 3. In this way, the electronic device can accurately filter the second information from the first information, improving the accuracy of the second information.

[0072] Among these, multiple sets of second information differ. For example, event parameters can include performance-type parameters and condition-type parameters. Performance-type parameters can indicate the performance corresponding to the event, while condition-type parameters can indicate the location related to the event. For example, in Figure 3 In the illustrated embodiment, parameter 1 and parameter 2 can be performance-type parameters of event a, and parameter 3 can be a condition-type parameter of event a. Parameter 4 and parameter 5 can be performance-type parameters of event b, and parameter 6 can be a condition-type parameter of event b. For example, an electronic device can determine an event and a performance-type parameter as a set of second information, or an electronic device can determine an event, a performance-type parameter, and a condition-type parameter as a set of second information; this embodiment does not limit the scope of the invention.

[0073] Optionally, the electronic device may determine multiple sets of second information in the first information based on any feasible implementation method, and the embodiments of this disclosure do not limit this.

[0074] Optionally, the electronic device can determine each set of second information as the first performance indicator. For example, in Figure 3 In the illustrated embodiment, the second information 1 is event a + parameter 1, the second information 2 is event a + parameter 2, the second information 3 is event a + parameter 1 + parameter 3, and the second information 4 is event a + parameter 2 + parameter 3. The electronic device can determine event a + parameter 1 as the first performance indicator A, event a + parameter 2 as the first performance indicator B, event a + parameter 1 + parameter 3 as the first performance indicator C, and event a + parameter 2 + parameter 3 as the first performance indicator D.

[0075] Optionally, based on the above method for determining the second information, the electronic device can determine multiple sets of second information from the first information. In order to improve the accuracy and testing efficiency of the second information, the electronic device can filter the multiple sets of second information and determine the filtered second information as the first performance indicator.

[0076] Specifically, the electronic device determines a first performance indicator based on multiple sets of second information. This can be achieved by: obtaining a filtering strategy; determining multiple sets of third information from the multiple sets of second information based on the filtering strategy; and determining each set of third information as the first performance indicator.

[0077] The filtering strategy includes at least one identifier. For example, the filtering strategy can be a regular expression, which can include multiple identifiers. In this way, the electronic device can accurately filter the first performance indicator from multiple sets of second information based on the filtering strategy. This reduces interference information, lowers the pressure on data storage and computation, improves the accuracy of the first performance indicator, and enhances the accuracy and efficiency of performance testing.

[0078] Optionally, the electronic device can predetermine a filtering strategy based on performance metrics. For example, if duration is an identifier included in the performance metrics, the electronic device can determine that duration is included in the regular expression.

[0079] In each group of third information, the event identifier or event parameter identifier is the same as at least one identifier in the filtering strategy. For example, second information 1 includes event a + parameter A, second information 2 includes event a + parameter B, second information 3 includes event b + parameter C, and second information 4 includes event c + parameter D. If the filtering strategy includes the identifier of event a, the electronic device can identify second information 1 and second information 2 as third information. If the filtering strategy includes the identifier of parameter B and the identifier of event c, the electronic device can identify second information 3 and second information 4 as third information. If the filtering strategy includes the identifier of event a, the identifier of event b, and the identifier of parameter C, the electronic device can identify second information 1, second information 2, second information 3, and second information 4 as third information.

[0080] For example, if the filtering strategy is duration+sum+time, and the parameter identifier of the event of the second information 1 includes duration, the electronic device can identify the second information 1 as the third information. If the parameter identifier of the event of the second information 2 includes sum, the electronic device can identify the second information 2 as the third information. If the identifier of the event of the second information 3 includes time, the electronic device can identify the second information 3 as the third information.

[0081] Among them, electronic devices can determine each set of third information as the first performance indicator.

[0082] Below, in conjunction with Figure 4 The process of determining the first performance index is explained.

[0083] Figure 4This is a schematic diagram illustrating a process for determining a first performance index, provided as an embodiment of this disclosure. Please refer to [link / reference]. Figure 4 This includes: First information. The first information includes event a, parameter 1 of event a, parameter 2 of event a, event b, parameter 3 of event b, parameter 4 of event b, event c, parameter 5 of event c, and parameter 6 of event c. Electronic devices ( Figure 4 (Not shown) Multiple sets of second information can be determined from the first information. These multiple sets of second information may include second information A, second information B, second information C, second information D, second information E, and second information F.

[0084] Please see Figure 4 The second information A can include event a and parameter 1, the second information B can include event a and parameter 2, the second information C can include event b and parameter 3, the second information D can include event b and parameter 4, the second information E can include event c and parameter 5, and the second information F can include event c and parameter 6. Thus, multiple sets of second information are different.

[0085] Please see Figure 4 If the filtering strategy includes identifiers for event a, parameter 3, and parameter 6, then the second information, including event a, parameter 3, and parameter 6, constitutes the first performance indicator (third information). Therefore, the electronic device can determine four first performance indicators from the second information. These first performance indicators can include event a + parameter 1, event a + parameter 2, event b + parameter 3, and event c + parameter 6. In this way, the electronic device can accurately determine the first performance indicators based on the first information, thereby improving the accuracy of performance testing.

[0086] S203, the primary performance indicator for storage.

[0087] Optionally, the electronic device may store the first performance metric in a database. For example, the electronic device may include a metric library for storing performance metrics; once the first performance metric is determined, it can be stored in the metric library.

[0088] Optionally, performance metrics may also include basic information, metric definitions, and metric rules. For example, the basic information of the first performance metric may include a name (e.g., event-parameter, which can be automatically generated and has a fixed format), metric description (default is empty), platform, metric group (default is empty if not grouped), and custom tags (automatically entered); the metric definition of the first performance metric may include metric extraction (event and parameters, where parameters may include functional parameters and conditional parameters), metric unit (e.g., milliseconds, default is empty), and value retrieval method (e.g., default is minimum, maximum, or average); the metric rules of the first performance metric may include degradation judgment (used to determine whether the metric has degraded, default is off), degradation judgment rules (e.g., if the event parameter includes frame rate, then the larger the value of the first performance metric, the better the performance), threshold type (default, custom), and threshold (default is maximum).

[0089] Optionally, after the electronic device stores the first performance indicator, the user can also edit the first performance indicator. For example, the user can modify the basic information of the first performance indicator (e.g., add indicator descriptions), and the user can also set degradation judgment rules for the first performance indicator, etc. This disclosure embodiment does not limit this.

[0090] S204. In response to the end of the test task, display the results of the test task.

[0091] Optionally, after the test task is completed, the electronic device can display the test task results. For example, after the test task is completed, the electronic device can display a prompt message indicating that the test task has ended. After the user clicks on the prompt message, the electronic device can display the test task results. It should be noted that the electronic device can also display the test task results based on any feasible implementation method, and this embodiment of the present disclosure does not limit this.

[0092] The test task results include the test results of the first performance metric. For example, the test task results may include the value of the first performance metric. For instance, if the first performance metric includes the event recording the performance of the first frame and the duration of the first frame, then the test task results may display the value of the duration of the first frame (e.g., 800 milliseconds).

[0093] Optionally, after the test task is completed, the electronic device can display a test report, which may include multiple primary performance indicators. After the user clicks on any primary performance indicator, the electronic device can display the value of that primary performance indicator across multiple test tasks. For example, the primary performance indicators in the test report may include the event recording the performance of the first frame and the duration of the first frame. After the user clicks on that primary performance indicator, the test report may display the values ​​of the duration of the first frame over the past week.

[0094] Below, in conjunction with Figure 5 The results of the test task will be explained.

[0095] Figure 5 This is a schematic diagram illustrating the result of a test task provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 5 This includes electronic devices. These devices can display the results of a test task, which includes first performance metric 1, first performance metric 2, first performance metric 3, ..., first performance metric n. If the user clicks on first performance metric 1, the electronic device can display the test results for first performance metric 1 at test time A, test time B, and test time C. In this way, the electronic device can accurately display the test results of the first performance metrics, improving the user experience.

[0096] This disclosure provides a testing method that, in response to the execution of a test task, acquires first data points in an application associated with the test task, determines second data points within the first data points, acquires information from the second data points, identifies the information from the second data points as first information, identifies multiple sets of second information from the first information, and acquires a filtering strategy; based on the filtering strategy, identifies multiple sets of third information from the multiple sets of second information, and identifies each set of third information as a first performance indicator; and, in response to the end of the test task, displays the results of the test task. In this way, because the electronic device can filter the first data points and collect information from data points related to the business line, interference data is reduced, and the accuracy of the first information is improved. Furthermore, since the first information comprises all performance-related information generated during the test task execution, the first performance indicator has good comprehensiveness, thus improving the efficiency and accuracy of performance testing. Moreover, because the electronic device can display the test results of each first performance indicator related to the test task, the user experience is improved.

[0097] exist Figure 2 Based on the embodiments shown, the following, in conjunction with Figure 6 The method for storing the first performance index in the above test method will be explained.

[0098] Figure 6 This is a schematic diagram illustrating a method for storing a first performance metric provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 6 The method process includes:

[0099] S601, Obtain the indicator library.

[0100] The metrics library is used to store performance metrics.

[0101] S602. Determine the second performance indicator from the first performance indicator.

[0102] The second performance metric is a performance metric not stored in the metric library. For example, when an electronic device tests an application for the first time, it does not acquire the first performance metric, so the metric library can be empty. After the electronic device tests the application for the second time, it has acquired the first performance metric, so the metric library can include the first performance metric acquired during the first test. The electronic device can also acquire multiple first performance metrics during the second test. If the metric library does not include at least one of the multiple first performance metrics, the electronic device can identify at least one performance metric as the second performance metric.

[0103] For example, the indicator library may include performance indicator 1, performance indicator 2 and performance indicator 3. The first performance indicator may include performance indicator 1, performance indicator 2, performance indicator 3 and performance indicator 4. Since performance indicator 4 is not included in the indicator library, the electronic device may identify performance indicator 4 as the second performance indicator.

[0104] Optionally, the electronic device can determine the second performance indicator from the first performance indicator based on the identifier of the first performance indicator and the identifiers of performance indicators stored in the indicator library. For example, the electronic device can determine the second performance indicator based on the event + parameter identifier of the first performance indicator and the event + parameter identifiers of performance indicators stored in the indicator library. For example, if the first performance indicator includes event a + parameter 1 and event b + parameter 2, and if event a + parameter 1 is stored in the indicator library but event b + parameter 2 is not stored, then the electronic device can determine event b + parameter 2 as the second performance indicator.

[0105] S603. Store the second performance metric in the metric library.

[0106] Once the electronic device determines the second performance indicator, it can store the second performance indicator in the indicator library. This can avoid the electronic device storing the performance indicator repeatedly in the indicator library and can also increase the number of performance indicators in the indicator library.

[0107] Below, in conjunction with Figure 7 The process of defining the second performance metric for storage is explained.

[0108] Figure 7 This is a schematic diagram illustrating a process for storing a second performance metric, as provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 7 This includes: a first performance indicator and an indicator library. The first performance indicator includes event a + parameter 1, event a + parameter 2, event b + parameter 3, and event c + parameter 6. The indicator library includes event a + parameter 1, event a + parameter 2, and event d + parameter 7. Since the indicator library includes event a + parameter 1 and event a + parameter 2, therefore, the electronic device (… Figure 7(Not shown) It can be determined that the second performance metric includes event b + parameter 3 and event c + parameter 6. The electronic device can add the second performance metric to the metric library, which can include event a + parameter 1, event a + parameter 2, event b + parameter 3, event c + parameter 6, and event d + parameter 7.

[0109] This disclosure provides a method for storing a first performance indicator. An electronic device can access an indicator library, determine a second performance indicator from the first performance indicator, and store the second performance indicator in the indicator library. Since the second performance indicator is not stored in the indicator library, this avoids duplicate storage of performance indicators in the indicator library and increases the number of performance indicators in the library. This improves the comprehensiveness, reliability, and accuracy of performance testing.

[0110] Based on any of the above embodiments, after the electronic device stores the first performance indicator, the above testing method further includes storing fourth information. Below, in conjunction with... Figure 8 The method for storing multiple sets of fourth information is explained.

[0111] Figure 8 This is a schematic diagram illustrating a method for storing multiple sets of fourth information according to an embodiment of this disclosure. Please refer to [link / reference]. Figure 8 The method process includes:

[0112] S801, Obtain multiple sets of fourth information from the first information.

[0113] Each set of fourth information includes all parameters associated with the event. For example, each set of fourth information could be material for performance metrics, and electronic devices can obtain new performance metrics from each set of fourth information.

[0114] Among them, the events of multiple sets of fourth information are different. For example, in Figure 4 In the illustrated embodiment, the first information may include three sets of fourth information. One set of fourth information includes event a, parameter 1, and parameter 2; another set of fourth information includes event b, parameter 3, and parameter 4; and yet another set of event information may include event c, parameter 5, and parameter 6. In this way, each set of fourth information can serve as material for determining performance indicators, making it easier for users to customize performance indicators and improve user experience.

[0115] For example, in Figure 3 In the illustrated embodiment, the fourth information 1 includes recording the performance of the first frame, the original duration of the first frame, the duration of the new first frame, and the entry source. The fourth information 2 includes editing the performance of the first frame, the duration of the first frame, the duration of the first UI, and the entry source. In this way, when the electronic device stores multiple sets of fourth information, the required memory space is small, thereby saving memory resources.

[0116] S802, Store multiple sets of fourth information.

[0117] In this case, the storage location of the multiple sets of fourth information is different from the storage location of the first performance indicator. For example, the electronic device may include an indicator library and an indicator material library, wherein the electronic device may store the first performance indicator in the indicator library and store multiple sets of fourth information in the indicator material library.

[0118] This disclosure provides a method for storing multiple sets of fourth information. Multiple sets of fourth information are obtained from first information and then stored. Since each set of fourth information includes all parameters associated with an event, multiple sets of fourth information can serve as material for performance metrics. Furthermore, because the events in the multiple sets of fourth information are different, the memory required to store them is smaller, saving memory resources. Also, when an electronic device stores first performance metrics, it may miss some performance metrics; multiple sets of fourth information can include the missed information. Therefore, when a user re-edits performance metrics, they can quickly determine the performance metrics from the multiple sets of fourth information in the metric material library, improving the user experience.

[0119] Figure 9 This is a schematic diagram of a testing apparatus provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 9 The testing device 900 includes an acquisition module 901, a determination module 902, a storage module 903, and a display module 904, wherein:

[0120] The acquisition module 901 is used to acquire first information in response to the execution of the test task, the first information including performance-related information generated during the execution of the test task;

[0121] The determining module 902 is used to determine a first performance indicator during the operation of the test task based on the first information.

[0122] The storage module 903 is used to store the first performance index;

[0123] The display module 904 is used to display the results of the test task in response to the end of the test task, the results of the test task including the test results of the first performance index.

[0124] According to one or more embodiments of this disclosure, the acquisition module 901 is specifically used for:

[0125] Obtain the first tracking point in the application associated with the test task;

[0126] Based on the first embedded point, the first information is obtained.

[0127] According to one or more embodiments of this disclosure, the acquisition module 901 is specifically used for:

[0128] A second embedding point is determined from the first embedding point, and the information of the second embedding point is obtained. The identifier of the second embedding point is a preset identifier.

[0129] The information from the second embedded point is determined to be the first information.

[0130] According to one or more embodiments of this disclosure, the determining module 902 is specifically used for:

[0131] Multiple sets of second information are determined from the first information, each set of second information including the identifier of the event and the parameters of the event, and the multiple sets of second information are different;

[0132] Based on the multiple sets of second information, the first performance index is determined.

[0133] According to one or more embodiments of this disclosure, the determining module 902 is specifically used for:

[0134] Obtain a filtering strategy, wherein the filtering strategy includes at least one identifier;

[0135] Based on the filtering strategy, multiple sets of third information are determined from the multiple sets of second information, wherein the event identifier or event parameter identifier of each set of third information is the same as at least one identifier in the filtering strategy.

[0136] The third piece of information in each group is determined as the first performance indicator.

[0137] According to one or more embodiments of this disclosure, the storage module 903 is specifically used for:

[0138] Obtain the indicator library, which is used to store performance indicators;

[0139] In the first performance metric, a second performance metric is determined, wherein the second performance metric is a performance metric not stored in the metric library;

[0140] The second performance metric is stored in the metric library.

[0141] According to one or more embodiments of this disclosure, the storage module 903 is further configured to:

[0142] Multiple sets of fourth information are obtained from the first information, each set of fourth information includes all parameters associated with the event, and the events of the multiple sets of fourth information are different;

[0143] The storage location of the multiple sets of fourth information is different from the storage location of the first performance index.

[0144] The testing apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.

[0145] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Please refer to [link / reference]. Figure 10 The diagram illustrates a structural schematic of an electronic device 1000 suitable for implementing embodiments of the present disclosure. The electronic device may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 10 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0146] like Figure 10 As shown, the electronic device 1000 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the electronic device 1000. The processing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0147] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic device 1000 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 10An electronic device 1000 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0148] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1009, or installed from storage device 1008, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of embodiments of this disclosure.

[0149] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0150] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0151] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.

[0152] This disclosure provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements various methods that may be involved in the above embodiments.

[0153] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements various methods that may be involved in the above embodiments.

[0154] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0155] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0156] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0157] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

[0158] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0159] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0160] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0161] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and provisions. The data may include information, parameters and messages, such as flow switching indication information.

[0162] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0163] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Multitasking and parallel processing may be advantageous in certain environments. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments. Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely exemplary forms of implementing the claims.

Claims

1. A testing method, characterized in that, include: In response to the execution of a test task, first information is acquired, the first information including performance-related information generated during the execution of the test task; Based on the first information, a first performance indicator is determined during the operation of the test task, and the first performance indicator is stored. In response to the completion of the test task, the results of the test task are displayed, including the test results of the first performance metric.

2. The method according to claim 1, characterized in that, The acquisition of the first information includes: Obtain the first tracking point in the application associated with the test task; Based on the first embedded point, the first information is obtained.

3. The method according to claim 2, characterized in that, The step of obtaining the first information based on the first embedded point includes: A second embedding point is determined from the first embedding point, and the information of the second embedding point is obtained. The identifier of the second embedding point is a preset identifier. The information from the second embedded point is determined to be the first information.

4. The method according to any one of claims 1-3, characterized in that, The step of determining the first performance indicator during the test task execution process based on the first information includes: Multiple sets of second information are determined from the first information, each set of second information including the identifier of the event and the parameters of the event, and the multiple sets of second information are different; Based on the multiple sets of second information, the first performance index is determined.

5. The method according to claim 4, characterized in that, The step of determining the first performance indicator based on the multiple sets of second information includes: Obtain a filtering strategy, wherein the filtering strategy includes at least one identifier; Based on the filtering strategy, multiple sets of third information are determined from the multiple sets of second information, wherein the event identifier or event parameter identifier of each set of third information is the same as at least one identifier in the filtering strategy. The third piece of information in each group is determined as the first performance indicator.

6. The method according to any one of claims 1-3, characterized in that, Storing the first performance metric includes: Obtain the indicator library, which is used to store performance indicators; In the first performance metric, a second performance metric is determined, wherein the second performance metric is a performance metric not stored in the metric library; The second performance metric is stored in the metric library.

7. The method according to any one of claims 1-3, characterized in that, After storing the first performance metric, the method further includes: Multiple sets of fourth information are obtained from the first information, each set of fourth information includes all parameters associated with the event, and the events of the multiple sets of fourth information are different; The storage location of the multiple sets of fourth information is different from the storage location of the first performance index.

8. A testing device, characterized in that, It includes an acquisition module, a determination module, a storage module, and a display module, wherein: The acquisition module is used to acquire first information in response to the execution of the test task, the first information including performance-related information generated during the execution of the test task; The determining module is used to determine a first performance indicator during the operation of the test task based on the first information. The storage module is used to store the first performance metric; The display module is used to display the results of the test task in response to the end of the test task, the results of the test task including the test results of the first performance index.

9. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the test method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the test method as described in any one of claims 1-7.

11. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the test method as described in any one of claims 1-7.