Mobile terminal testing method and device

Through the full code traversal and buried point data analysis of the mobile terminal, combined with the preset link algorithm and UI execution framework, automated mobile terminal testing is realized, solving the efficiency and reliability problems of existing testing methods, and improving the testing efficiency and reporting quality.

CN119938476APending Publication Date: 2025-05-06SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510032979.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The existing mobile testing methods rely on manual experience and manual operations, resulting in low reliability, long time and high labor costs of test reports, making it difficult to cope with the demand for rapid iteration of products.

Method used

By traversing the full code of the mobile terminal, the page code and buried point data are obtained, the test scenario is determined based on the preset link algorithm, and the preset UI execution framework is used to automatically execute operations, obtain multi-dimensional performance indicators to generate a test report.

Benefits of technology

It realizes automated testing, improves testing efficiency and reporting reliability, reduces labor costs, and can respond to product iteration needs more quickly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938476A_ABST
    Figure CN119938476A_ABST
Patent Text Reader

Abstract

The invention discloses a mobile terminal testing method and device, and the method comprises the steps: carrying out the traversal of a total code of a mobile terminal, and obtaining a page code and burying point data according to a preset identifier; determining a test scene based on a preset link algorithm according to the page code and the burying point data; the test scene comprises an interaction page and a behavior link of the interaction page; and based on a preset UI execution framework, executing a corresponding operation according to the test scene, and obtaining a multi-dimensional performance index to generate a test report. According to the method, page codes and burying point data are automatically obtained based on traversal of full-amount codes of a mobile terminal, an actually used test scene is automatically fitted based on a preset link algorithm, manual operation is replaced by automatic operation, manual experience judgment is replaced by big data analysis, and the method is more efficient and convenient. Based on the preset UI execution framework, the corresponding operation is automatically executed, the multi-dimensional performance indexes are obtained, and the generated test report more intuitively reflects the performance fluctuation in the test scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automatic testing technology, and in particular to a mobile terminal testing method and device. Background Art

[0002] Competition in the Internet industry is intensifying, and the pace of technological innovation and product iteration is accelerating. However, the complexity of demand does not stop at the functional level, but also profoundly affects the high standards of software product performance and experience consistency of different hardware devices. In order to ensure the improvement of product performance quality in an ever-changing environment, the following methods are commonly used for testing:

[0003] 1) Manual experience to determine the software usage scenarios: Testers use their experience to determine the common scenarios of the software.

[0004] 2) Manually perform performance testing: Use mobile terminals of different systems (such as Android, IOS, Hongmeng, etc.) to perform manual operations and test different scenarios one by one to ensure that various scenarios maintain consistency in performance and experience on multiple system platforms.

[0005] However, the above methods have various problems: 1) When manually executing test tasks, many factors affect the performance indicators, resulting in a significant reduction in the reliability of the generated performance report. 2) Due to the limitations of manual operation, equipment fluency and other issues, it takes a long time and has high labor costs, making it difficult to cope with the increasingly accelerated product iteration rhythm. Summary of the invention

[0006] In view of the above problems, embodiments of the present application are proposed to provide a mobile terminal testing method and device that overcome the above problems or at least partially solve the above problems.

[0007] According to a first aspect of an embodiment of the present application, a mobile terminal testing method is provided, which includes:

[0008] Traverse the entire code of the mobile terminal and obtain the page code and embedded point data according to the preset identifier;

[0009] According to the page code and embedded data, the test scenario is determined based on the preset link algorithm; the test scenario includes the interactive page and the behavioral link of the interactive page;

[0010] Based on the preset UI execution framework, perform corresponding operations according to the test scenario, obtain multi-dimensional performance indicators, and generate a test report.

[0011] Optionally, determining the test scenario based on a preset link algorithm according to the page code and the embedded point data further includes:

[0012] Determine the corresponding interactive page based on the page code; the interactive page includes interactive behavior components;

[0013] According to the tracking data in the interactive page, determine the mapping relationship between the page tracking points and the interactive components of the interactive page;

[0014] Determine the operation link based on the timestamp and interaction behavior in each tracking point data, and match the page display in each tracking point data with the interaction page to obtain the behavior link of each interaction page;

[0015] Aggregate the behavior links of each interactive page to obtain the corresponding test scenarios.

[0016] Optionally, traversing the full amount of code on the mobile terminal and obtaining the page code and embedded point data according to the preset identifier further includes:

[0017] Traverse the entire code of the mobile terminal, obtain the page code according to different class files and / or annotations corresponding to different systems, and obtain the data of each tracking point according to the preset tracking points.

[0018] Optionally, based on a preset UI execution framework, executing corresponding operations according to the test scenario, obtaining multi-dimensional performance indicators, and generating a test report further includes:

[0019] For mobile terminals of different systems, access the scheduling platform and determine different UI automation execution frameworks; different UI automation execution frameworks encapsulate the interaction behaviors corresponding to different systems;

[0020] Based on the UI automation execution framework, according to the mapping relationship, behavior link and test scenario, the operation corresponding to the interactive behavior in the test scenario is executed, and the corresponding first performance indicator is obtained based on the preset performance monitoring framework; the operation includes: click, slide and / or page jump; the first performance indicator includes: frame rate, memory, CPU and / or GPU;

[0021] Generate a test report based on the obtained performance indicators.

[0022] Optionally, performing corresponding operations according to the test scenario to obtain multi-dimensional performance indicators to generate a test report further includes:

[0023] Execute corresponding operations according to the test scenario to obtain a first performance indicator;

[0024] An indicator calculation is performed based on the first performance indicator to obtain a second performance indicator and generate a test report; the second performance indicator includes an indicator fluctuation variance, an indicator incremental difference and / or an indicator upward trend.

[0025] Optionally, performing corresponding operations according to the test scenario to obtain multi-dimensional performance indicators to generate a test report further includes:

[0026] Determine the type of test scenario based on the interactive components, interactive behavior tracking statistics, and / or page exposure tracking statistics contained in the interactive page;

[0027] Dynamically determine the third performance indicator of the test according to the type of test scenario, obtain the third performance indicator, and generate a test report.

[0028] Optionally, the method further comprises:

[0029] Based on the traversal of the full code of the mobile terminal, determine the difference information of the page component tree between the current traversal and the previous traversal;

[0030] Based on the difference information of the page component tree, the fluctuation range of multi-dimensional performance indicators is predicted;

[0031] Determine whether the difference between the multi-dimensional performance index of the test scenario corresponding to the current traversal and the multi-dimensional performance index of the test scenario corresponding to the previous traversal exceeds the fluctuation range;

[0032] If so, an alarm is processed based on the difference information of the page component tree.

[0033] According to a second aspect of an embodiment of the present application, a mobile terminal testing device is provided, comprising:

[0034] The traversal module is suitable for traversing the full amount of code on the mobile terminal and obtaining the page code and embedded point data according to the preset identifier;

[0035] The test scenario module is suitable for determining the test scenario based on the preset link algorithm according to the page code and embedded point data; the test scenario includes the interactive page and the behavioral link of the interactive page;

[0036] The test performance module is suitable for executing corresponding operations based on the preset UI execution framework according to the test scenario, obtaining multi-dimensional performance indicators, and generating a test report.

[0037] According to a third aspect of an embodiment of the present application, there is provided a computing device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0038] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned mobile terminal testing method.

[0039] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned mobile terminal testing method.

[0040] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the above-mentioned mobile terminal testing method.

[0041] According to the mobile terminal testing method and device provided by this application, based on the traversal of the full amount of mobile terminal code, the page code and embedded point data are automatically obtained, and the preset link algorithm is automatically adapted to the actual test scenario, so that automatic replacement of manual, big data analysis instead of manual experience judgment is realized, which is more efficient and convenient. Based on the preset UI execution framework, the corresponding operations are automatically executed, multi-dimensional performance indicators are obtained, and the generated test report more intuitively reflects the performance fluctuations in the test scenario.

[0042] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0044] Figure 1 A flow chart of a mobile terminal testing method according to an embodiment of the present application is shown;

[0045] Figure 2 A flowchart of a mobile terminal testing method according to another embodiment of the present application is shown;

[0046] Figure 3 A schematic diagram showing interactive page acquisition and generation of behavior links and test scenarios;

[0047] Figure 4 A schematic diagram of UI automation deployment and execution is shown;

[0048] Figure 5 A schematic diagram of the performance indicator collection process in the performance test report is shown;

[0049] Figure 6 A schematic diagram of the structure of a mobile terminal testing device according to an embodiment of the present application is shown;

[0050] Figure 7 A schematic diagram of the structure of a computing device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0051] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0052] First, the terms involved in one or more embodiments of the present application are explained.

[0053] FPS:Frames Per Second, frames per second / frame rate.

[0054] Memory: Memory.

[0055] CPU: Central Processing Unit.

[0056] GPU: Graphics Processing Unit.

[0057] IOS: Mobile operating system developed by Apple.

[0058] iPadOS: A series of mobile operating systems developed by Apple based on iOS.

[0059] Android: Android, a mobile operating system based on the Linux kernel.

[0060] HarmonyOS: Huawei's Hongmeng system.

[0061] Data collection: a data collection method in the Internet field.

[0062] UI Automation: The process of converting human-driven testing into machine execution.

[0063] Figure 1 A flow chart of a mobile terminal testing method according to an embodiment of the present application is shown. Figure 1 As shown, the method comprises the following steps:

[0064] Step S101, traverse the full code of the mobile terminal, and obtain the page code and embedded point data according to the preset identifier.

[0065] The mobile terminal of this embodiment may include mobile terminals of different systems, such as IOS, Android, Hongmeng system, etc. Mobile terminals of different systems use the same set of mobile terminal codes to implement the same functions in different systems.

[0066] When testing the code on the mobile terminal, most of the existing tests are based on manual experience, which is highly dependent on manual work and has high labor and time costs. This embodiment scans and traverses the entire code of the mobile terminal to obtain page-related code and pre-embedded point-related embedded point data. The page code can be obtained by scanning the code with a preset mark. The mobile terminal page code implementation of different systems is different. For example, the parent class used by the page code in IOS is "UIViewController" and the subclass is "UIView". The parent class used by the Android page code is "Activity" and the subclass is "Fragment". The Hongmeng terminal page code uses annotations such as "@Entry" and "@ComponentV2". The page code can be identified and determined based on the above preset marks during scanning, and the pre-embedded code in the code can be obtained to obtain the embedded point data.

[0067] Step S102, determining the test scenario based on the preset link algorithm according to the page code and the embedded point data.

[0068] Based on the scanned page code, the interactive pages corresponding to the page code can be determined. The test scenario may include one or more interactive pages, including the behavioral links of the interactive pages, that is, the execution order of the interactive component operations in the interactive page, the interactive page jump relationship, etc.

[0069] The test scenario can be obtained by analyzing the page code and the buried data. Specifically, the buried data includes the buried data of the page display and the buried data of the specific interactive behavior. The buried data of the interactive behavior is related to the specific interactive component in the specific interactive page, and has a unique mapping relationship with the interactive component in the interactive page. For example, the buried data of the interactive behavior in the page involves the click operation of the submit button component of a certain page, and the buried data of the page interactive behavior has a mapping relationship with the submit button component. The buried data of the page display corresponds to the page code, and the exposure and display behavior in the interactive page is determined. The buried data has a timestamp attribute, and the operation link, such as the operation sequence of the interactive behavior, can be determined based on the timestamp attribute of the buried data and the interactive behavior. According to the matching of the page exposure buried data with the interactive page corresponding to the page code, the matching of the operation link with the interactive page and the jump matching between the interactive pages can be determined, so that the behavior link of each interactive page can be obtained, and the behavior link of each interactive page can be aggregated to obtain each test scenario.

[0070] Step S103, based on the preset UI execution framework, perform corresponding operations according to the test scenario, obtain multi-dimensional performance indicators, and generate a test report.

[0071] After obtaining the test scenario, considering the mobile terminals of different systems, a unified scheduling platform is needed to dynamically access different mobile terminals in real time to execute the test scenario. The scheduling platform can use frameworks such as TiDevice and ADB to facilitate the access to mobile terminals of different systems. When automating the execution of test scenarios, the mobile terminals of different systems have different architectures and ecosystems. When testing interactive pages, different UI automation technologies need to be used. Here, the preset UI execution framework can set different UI execution frameworks for mobile terminals of different systems. For example, IOS can use WebDriverAgent, and Android can use UI execution frameworks such as uiautomator2. The common interactive behaviors of the page are encapsulated in each UI execution framework to achieve the same interactive operation, generate corresponding test cases based on the test scenario, and perform corresponding operations.

[0072] When executing the corresponding operations, in order to understand the performance of the mobile terminal, you can use a performance monitoring framework to monitor the performance changes during the automated execution of test cases and store multi-dimensional performance indicators. For the display and interaction performance of the page, you can obtain performance indicators of various dimensions such as FPS (frame rate), Memory (memory resource usage), CPU usage, GPU usage, etc., so that you can generate a test report based on the performance indicators of each dimension, which is convenient for intuitively understanding the performance of the test scenario.

[0073] Furthermore, when automating the test cases of the test scenarios, multi-threaded concurrent execution methods can be used to greatly reduce manual input, reduce execution time, and increase the coverage of model fragmentation.

[0074] According to the mobile terminal testing method provided by this application, based on the traversal of the full amount of mobile terminal code, the page code and embedded point data are automatically obtained, and the preset link algorithm is automatically adapted to the actual test scenario, so that automatic replacement of manual work is achieved, and big data analysis replaces manual experience judgment, which is more efficient and convenient. Based on the preset UI execution framework, the corresponding operations are automatically executed, multi-dimensional performance indicators are obtained, and the generated test report more intuitively reflects the performance fluctuations in the test scenario.

[0075] Figure 2 A flow chart of a mobile terminal testing method according to an embodiment of the present application is shown. Figure 2 As shown, the method comprises the following steps:

[0076] Step S201, traverse the full amount of code of the mobile terminal, obtain the page code according to different class files and / or annotations corresponding to different systems, and obtain the data of each embedded point according to the preset embedded points.

[0077] The full code for the mobile terminal can be deeply traversed through scanning, and based on the functional implementation of each code in different systems, the page code of the interactive page visible to the user can be identified and obtained from the full code. The identification of the page code can be determined by the class files and annotations used by different systems to implement the page to determine whether the code is page code. For example, the parent class used by the page code in iOS is "UIViewController" and the subclass is "UIView", and the parent class used by the page code on the Android side is "Activity" and the subclass is "Fragment", etc. The page code on the Hongmeng side uses annotations such as "@Entry" and "@ComponentV2". By scanning the code and identifying the class name and annotation field of the code, the page code can be obtained from the full code. The obtained page code is the code of the interactive page visible to the user, so the interactive page can be determined based on the page code.

[0078] In addition to obtaining the page code of the interactive page, during the scanning and traversal, the corresponding embedded point data is also obtained according to the preset embedded points in the code. The embedded point data is used to subsequently build the behavior link, connect the various operations performed on the page according to the timestamp, and match them with the interactive page to determine the behavior link of each interactive page and build various test scenarios.

[0079] Step S202, determining the test scenario based on the preset link algorithm according to the page code and the embedded point data.

[0080] The corresponding interactive page can be determined according to the page code. The interactive page contains interactive behavior components, such as submission components, selection and display components, etc. Submission components include submit buttons, jump buttons, etc. Selection and display components include list components, radio button components, multi-select box components, etc. The above are examples for explanation. The specific settings are based on the implementation situation and are not limited here.

[0081] Based on the tracking data in the interactive page, you can first determine the mapping relationship between the page tracking and the interactive components of the interactive page. For example, based on the submission behavior in the tracking data, determine the mapping relationship with the submission class component in the interactive page. When the interactive page may contain multiple submission class components, determine the specific submission component based on the specific tracking data, and establish a one-to-one mapping relationship between the tracking data and the interactive component.

[0082] The buried data has a timestamp attribute, and the buried data can be divided into different buried data such as interactive behavior and page display. The interactive behavior is the interactive behavior between the user and the page in the interactive page, and the page display is the interactive page display, data display, etc. According to the timestamp and interactive behavior in each buried data, the operation link of the interactive behavior with a time sequence is determined. Combined with the page display in each buried data and the interactive page matching, the behavioral link of each interactive page can be obtained. The behavioral link includes such as interactive page initialization display, interactive page triggering / response to each interactive behavior, interactive page jump to another interactive page, etc. By aggregating the behavioral links of each interactive page, the corresponding test scenario is obtained. The test scenario may include one or more interactive pages, and there is a jump order between multiple interactive pages. The interactive page of the test scenario includes the behavioral link within the interactive page.

[0083] like Figure 3 As shown, a deep traversal algorithm is used to scan and traverse the entire code, and the page identifiers are screened to obtain the interactive page. The interactive behavior, page, timestamp, time consumption and other information are determined through the embedded point big data. The corresponding behavior link is calculated and generated based on the link algorithm, and the behavior link is filled with the corresponding interactive page to obtain the test scenario. Furthermore, by calculating the frequency of the behavior link, high-frequency behavior links can be obtained, core scenarios can be classified, and different types of test scenarios can be determined. Furthermore, the traversal can be scheduled, or when the total code changes, a scan can be automatically initiated to routinely perform a deep traversal of the total code, or a scan can be manually initiated based on new requirements to traverse the code corresponding to the special task, etc., which are not limited here.

[0084] For the test scenario, if the interactive page is the "home page" of the application, the behavior chain includes entering the "home page" (here includes page exposure points), the next behavior is: sliding on the "home page" (here includes sliding interaction behavior points), and the next behavior is: clicking on the "home page" to open the "video playback page" (here includes page exposure points). Build a behavior chain and determine that there can be two test scenarios, namely the "home page" and "video playback page" test scenarios. The "home page" test scenario includes entering the "home page" - sliding the "home page" - clicking the "home page", and leaving for a while; the "video playback page" test scenario includes entering the "video playback page" and staying for a long time. The above is an example, which is set according to the implementation situation and is not limited here.

[0085] Step S203: For mobile terminals of different systems, access the scheduling platform and determine different UI automation execution frameworks. Based on the UI automation execution framework, according to the mapping relationship, behavior link and test scenario, the operation corresponding to the interactive behavior in the test scenario is executed, and the corresponding first performance indicator is obtained based on the preset performance monitoring framework.

[0086] For mobile terminals of different systems, such as Figure 4 As shown, mobile terminals with different systems such as iOS, iPad OS, Android, and Harmony can use technical frameworks such as TiDevice, ADB, and Arkx Test to access the scheduling platform, dynamically access various types of devices, view the current status of the device, and iterate different versions under the same system to achieve multi-device, multi-system, and multi-version scheduling.

[0087] When using UI automation technology, you can use a variety of different UI automation execution frameworks, such as WebDriverAgent, uiautomator2, UiTest, etc., to encapsulate interactive behaviors, implement the same interactive operation, and UI automation executes test cases corresponding to the test scenarios. Among them, different UI automation execution frameworks encapsulate interactive behaviors corresponding to different systems. The operations performed by the UI automation execution framework include clicks, slides, page jumps, and other operations in interactive pages. Through the performance monitoring framework of PerfdogService, you can monitor performance changes during automation execution, capture performance data, and then store multiple first performance indicators. The first performance indicators may include frame rate, memory, CPU, GPU, etc., that is, Figure 5 The basic performance indicators shown in the figure can monitor multiple different first performance indicators to test possible problems on each interactive page. A test report can be generated based on the first performance indicators. For example, each item of the first performance indicator can be recorded at intervals of seconds, and respective fluctuation curves and percentage graphs can be generated to obtain a test report.

[0088] Step S204: perform an indicator calculation based on the first performance indicator to obtain a second performance indicator.

[0089] The existing technology can use tools to obtain performance indicators during testing, and measure performance optimization and degradation by making a one-to-one comparison of the absolute values ​​of the numerical values. However, it only compares a single value of the performance indicator, which is too weak for different types of test scenarios.

[0090] This embodiment not only obtains the first performance indicator, but also calculates based on the first performance indicator to obtain the second performance indicator, that is, Figure 5 The complex performance indicators shown in the figure include calculating the fluctuation variance of the indicator, the incremental difference of the indicator, the upward trend of the indicator, etc. The second performance indicator calculates the first performance indicator to determine the overall trend change during the test, rather than simply comparing the size of the performance indicator. A corresponding test report can also be generated based on the second performance indicator.

[0091] Step S205, determine the type of test scenario based on the interactive components, interactive behavior tracking statistics and / or page exposure tracking statistics contained in the interactive page, dynamically determine the third performance indicator of the test based on the type of test scenario, obtain the third performance indicator, and generate a test report.

[0092] The performance indicators that need to be focused on will be different depending on the type of test scenario. You can first determine the type of test scenario based on the interactive components contained in the interactive page, the visit frequency of the interactive page associated with the test scenario, the time it takes for the interactive page to display and jump, etc. Based on different types, dynamically determine the third performance indicator that needs to be focused on during testing.

[0093] Specifically, according to the interactive components contained in the interactive page, based on the type of interactive components, the statistics of interactive behavior points and sorting, the high frequency of interactive behavior can be determined. For example, if the interactive component is a frequent interactive component, such as a List component, it will select data refresh multiple times, or select a linkage component, refresh other results according to the selection result, etc., and the statistical number of interactive behavior points contained in the page is higher than the interactive threshold, etc., it can be determined that there is frequent interaction in the test scenario, and the type of the test scenario can be determined to be a frequent interaction scenario. The corresponding third performance indicator of core concern pays more attention to the smoothness of interaction, which includes frame rate, such as frame rate less than or equal to 16 (occurrence frequency). According to the access frequency of the interactive page associated with the test scenario, it can be determined that the interactive page may be visited multiple times. The high frequency of the interactive page can be determined by the statistical sorting of the page exposure points, and compared with the high frequency threshold, the interactive page is determined to be a high-frequency access page. There will be a large number of resources frequently generated and destroyed on the high-frequency access page. For the scenario where resources are repeatedly consumed / released, the third performance indicator of core concern pays more attention to the use of memory, pays attention to the difference between the first and last memory, and promptly discovers whether the difference is too large. According to the interactive components in the interactive page, such as the playback component, it can be determined whether the test scenario is a long-term residence scenario, and the long time can be determined by comparing the time threshold. For long-term residence scenarios, the core third performance indicators focus more on CPU, GPU volatility, etc. Alternatively, the long-term residence scenario can also be based on the timestamp attribute of the buried data in the behavior link, and the time for the interactive page display jump can be determined based on the time from entering the interactive page to starting to display to the time when the interactive page jumps to other interactive pages. The above can dynamically determine the third performance indicator of the test scenario according to the type of different test scenarios, and obtain the third performance indicator during the test to generate a test report. The above is an example, which is set according to the implementation situation and is not limited here.

[0094] By determining the high frequency of interactive behaviors and interactive pages, we can distinguish the priorities of different interactive pages, determine more core test scenarios, increase resource investment in more core test scenarios, and improve the test frequency. For relatively low-frequency scenarios, we can reduce the test frequency to save test resources.

[0095] The above steps S204 and S205 are not limited in execution order and can be executed according to actual execution conditions.

[0096] Step S206, based on the traversal of the full code of the mobile terminal, determine the difference information of the page component tree during the current traversal and the previous traversal, and predict the fluctuation range of the multi-dimensional performance indicators according to the difference information of the page component tree.

[0097] In addition to the above performance indicators, this embodiment also predicts the fluctuation of performance indicators based on the changes in the interactive page components in the test scenario when the function is updated. Here, due to the introduction of new functions, the component tree changes the existing test scenarios, especially the core high-frequency test scenarios, and the fluctuation range is predicted to recalibrate the range. For new test scenarios where new functions occur on new interactive pages, there is no need to predict the fluctuation range.

[0098] Specifically, by traversing the full amount of code on the mobile terminal, timed traversal or traversal triggered by the addition of new functions, the difference information of the page component tree obtained during the current traversal and the previous traversal is determined. The page component tree contains various components in the interactive page. By comparing the page component tree obtained by the current traversal with the page component tree obtained by the previous traversal, the difference information between the two can be obtained. The difference information includes the addition of new components, the deletion of original components, the modification of the number of original components, etc. According to the difference information of the page component tree, the fluctuation range of multi-dimensional performance indicators can be predicted, and the fluctuation range of different performance indicators corresponding to different components can be predicted. Each component can preset a fluctuation threshold. For example, the memory overhead of the text component is relatively small, and the memory overhead of the image component is large. It can be preset that the increase of one text component will cause the memory to increase by 1MB, and the increase of one image component will cause the memory to increase by 5MB, etc. According to the difference information of the page component tree and the preset fluctuation threshold of each component, the fluctuation range of each performance indicator can be obtained.

[0099] Step S207, determining whether the difference between the multi-dimensional performance index of the test scenario corresponding to the current traversal and the multi-dimensional performance index of the test scenario corresponding to the previous traversal exceeds the fluctuation range.

[0100] For the test scenario obtained by the current traversal, obtain the corresponding multi-dimensional performance indicators, and determine whether the difference between the current multi-dimensional performance indicators and the multi-dimensional performance indicators of the test scenario corresponding to the previous traversal exceeds the predicted fluctuation range. If so, there is a possibility of test anomaly, and a component in the page component tree may have abnormal performance occupancy, and execute step S208.

[0101] Step S208: Perform alarm processing based on the difference information of the page component tree.

[0102] Based on the difference information of the page component tree, the currently changed components in the page component tree are determined, and alarm processing is performed on the components. The alarm processing can include the interactive components in the difference information, the current interactive page, etc., which facilitates timely troubleshooting based on alarms.

[0103] Furthermore, alarm processing can also generate test reports, such as Figure 5 As shown, after the scenario is created, when the traversal determines that there are differences in the component tree, predictions can be made based on the fluctuation ranges of different performance indicators corresponding to different components, and monitoring and alarms can be performed based on the predicted fluctuation ranges, and performance test reports can be generated. The performance test report can include the first performance indicator, the second performance indicator, the third performance indicator, and the alarm obtained from the above test, providing multi-dimensional and multi-faceted comprehensive test results, and more intuitively understanding the performance of the test scenario.

[0104] According to the mobile terminal testing method provided by the present application, the full amount of code is deeply traversed, and based on the acquired interactive pages and buried point data, a behavior link is constructed through a preset link algorithm, matched with the interactive page, and various test scenarios are obtained. Based on the statistics of interactive behavior buried points and page exposure buried points, the high-frequency concept is introduced to determine the core test scenario, which can be tested more accurately based on the core test scenario. For mobile terminals of different systems, based on the preset UI execution framework, different systems are automatically executed The same operation, based on the first performance indicator, the second performance indicator, and the third performance indicator, a multi-dimensional, multi-faceted comprehensive test result is obtained, and the obtained test report intuitively reflects the performance fluctuations under the test scenario. Further, after the introduction of a new function, by comparing the page component tree obtained by the traversal before and after the new function, based on the difference information of the page component tree, the fluctuation range of the performance indicator is predicted, and the performance fluctuation of the new function can be tested more accurately. It can also be based on the predicted fluctuation range of the performance indicator. Alarm processing is performed to correct the errors of the interactive components and interactive pages of the new function in time.

[0105] Figure 6 FIG. 1 is a schematic diagram showing the structure of a mobile terminal testing device provided by an embodiment of the present application. Figure 6 As shown, the device comprises:

[0106] The traversal module 610 is adapted to traverse the full amount of codes of the mobile terminal and obtain the page code and the embedded point data according to the preset identifier;

[0107] The test scenario module 620 is adapted to determine the test scenario based on the page code and the embedded point data and based on the preset link algorithm; the test scenario includes the interactive page and the behavior link of the interactive page;

[0108] The test performance module 630 is adapted to execute corresponding operations according to the test scenario based on a preset UI execution framework, obtain multi-dimensional performance indicators, and generate a test report.

[0109] Optionally, the test scenario module 620 is further adapted to:

[0110] Determine the corresponding interactive page based on the page code; the interactive page includes interactive behavior components;

[0111] According to the tracking data in the interactive page, determine the mapping relationship between the page tracking points and the interactive components of the interactive page;

[0112] Determine the operation link based on the timestamp and interaction behavior in each tracking point data, and match the page display in each tracking point data with the interaction page to obtain the behavior link of each interaction page;

[0113] Aggregate the behavior links of each interactive page to obtain the corresponding test scenarios.

[0114] Optionally, the traversal module 610 is further adapted to:

[0115] Traverse the entire code of the mobile terminal, obtain the page code according to different class files and / or annotations corresponding to different systems, and obtain the data of each tracking point according to the preset tracking points.

[0116] Optionally, the test performance module 630 is further adapted to:

[0117] For mobile terminals of different systems, access the scheduling platform and determine different UI automation execution frameworks; different UI automation execution frameworks encapsulate the interaction behaviors corresponding to different systems;

[0118] Based on the UI automation execution framework, according to the mapping relationship, behavior link and test scenario, the operation corresponding to the interactive behavior in the test scenario is executed, and the corresponding first performance indicator is obtained based on the preset performance monitoring framework; the operation includes: click, slide and / or page jump; the first performance indicator includes: frame rate, memory, CPU and / or GPU;

[0119] Generate a test report based on the obtained performance indicators.

[0120] Optionally, the test performance module 630 is further adapted to:

[0121] Execute corresponding operations according to the test scenario to obtain a first performance indicator;

[0122] An indicator calculation is performed based on the first performance indicator to obtain a second performance indicator and generate a test report; the second performance indicator includes an indicator fluctuation variance, an indicator incremental difference and / or an indicator upward trend.

[0123] Optionally, the test performance module 630 is further adapted to:

[0124] Determine the type of test scenario based on the interactive components, interactive behavior tracking statistics, and / or page exposure tracking statistics contained in the interactive page;

[0125] Dynamically determine the third performance indicator of the test according to the type of test scenario, obtain the third performance indicator, and generate a test report.

[0126] Optionally, the device also includes: a fluctuation prediction module 640, which is suitable for determining the difference information of the page component tree during the current traversal and the previous traversal based on the traversal of the full code of the mobile terminal; predicting the fluctuation range of the multi-dimensional performance indicators based on the difference information of the page component tree; judging whether the difference between the multi-dimensional performance indicators of the test scenario corresponding to the current traversal and the multi-dimensional performance indicators of the test scenario corresponding to the previous traversal exceeds the fluctuation range; if so, performing alarm processing based on the difference information of the page component tree.

[0127] The description of each module above refers to the corresponding description in the method embodiment and will not be repeated here.

[0128] According to the mobile terminal test device provided by this application, based on the traversal of the full amount of code of the mobile terminal, the page code and the buried point data are automatically obtained, and the test scenario actually used is automatically adapted based on the preset link algorithm, so that automatic replacement of manual work is achieved, and big data analysis replaces manual experience judgment, which is more efficient and convenient. Based on the preset UI execution framework, the corresponding operations are automatically executed, multi-dimensional performance indicators are obtained, and the generated test report more intuitively reflects the performance fluctuations in the test scenario.

[0129] The present application also provides a non-volatile computer storage medium, which stores at least one executable instruction, and the executable instruction can execute the operation corresponding to the mobile terminal testing method in any of the above method embodiments.

[0130] The present application also provides a computer program product, which includes at least one executable instruction or computer program, and the executable instruction or computer program can enable a processor to perform operations corresponding to the mobile terminal testing method in any of the above method embodiments.

[0131] Figure 7A schematic diagram of the structure of a computing device according to an embodiment of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the computing device.

[0132] like Figure 7 As shown, the computing device may include: a processor (processor) 702 , a communications interface (Communications Interface) 704 , a memory (memory) 706 , and a communication bus 708 .

[0133] in:

[0134] The processor 702 , the communication interface 704 , and the memory 706 communicate with each other via a communication bus 708 .

[0135] The communication interface 704 is used to communicate with other devices such as clients or other servers.

[0136] The processor 702 is used to execute the program 710, and specifically can execute the relevant steps in the above-mentioned mobile terminal testing method embodiment.

[0137] Specifically, the program 710 may include program codes, which include computer operation instructions.

[0138] The processor 702 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the present application. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0139] The memory 706 is used to store the program 710. The memory 706 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0140] Program 710 can be specifically used to enable processor 702 to execute the mobile terminal test method in any of the above-mentioned method embodiments. The specific implementation of each step in program 710 can refer to the corresponding description in the corresponding steps and units in the above-mentioned mobile terminal test embodiment, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.

[0141] The algorithm or display provided here is not inherently related to any specific computer, virtual system or other device. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the application is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the application described here, and the above description of specific languages ​​is to disclose the preferred embodiment of the application.

[0142] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0143] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the claims below, the inventive aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.

[0144] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0145] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0146] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components of the present application. The present application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing a part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0147] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

Claims

1. A mobile terminal testing method, comprising: Traverse the entire code of the mobile terminal and obtain the page code and embedded point data according to the preset identifier; According to the page code and the embedded point data, a test scenario is determined based on a preset link algorithm; The test scenario includes an interactive page and a behavior link of the interactive page; Based on the preset UI execution framework, corresponding operations are performed according to the test scenario to obtain multi-dimensional performance indicators to generate a test report.

2. The method according to claim 1, wherein: The step of determining the test scenario based on the page code and the embedded point data and based on a preset link algorithm further includes: Determine a corresponding interactive page based on the page code; the interactive page includes an interactive behavior component; Determine the mapping relationship between the page embedding points and the interactive components of the interactive page according to the embedding point data in the interactive page; Determine the operation link according to the timestamp and interaction behavior in each buried data, and match the page display in each buried data with the interaction page to obtain the behavior link of each interaction page; Aggregate the behavior links of each interactive page to obtain the corresponding test scenarios.

3. The method according to claim 1 or 2, wherein: The traversing of the full amount of codes of the mobile terminal and obtaining the page code and the embedded point data according to the preset identifier further includes: Traverse the entire code of the mobile terminal, obtain the page code according to different class files and / or annotations corresponding to different systems, and obtain the data of each tracking point according to the preset tracking points.

4. The method according to any one of claims 1 to 3, wherein: The method of executing the corresponding operation based on the preset UI execution framework according to the test scenario, obtaining multi-dimensional performance indicators, and generating a test report further includes: For mobile terminals of different systems, access the scheduling platform and determine different UI automation execution frameworks; different UI automation execution frameworks encapsulate the interaction behaviors corresponding to different systems; Based on the UI automation execution framework, according to the mapping relationship, the behavior link and the test scenario, the operation corresponding to the interactive behavior in the test scenario is executed, and the corresponding first performance indicator is obtained based on the preset performance monitoring framework; the operation includes: clicking, sliding and / or page jumping; the first performance indicator includes: frame rate, memory, CPU and / or GPU; Generate a test report based on the obtained performance indicators.

5. The method according to any one of claims 1 to 4, wherein: The performing corresponding operations according to the test scenario to obtain multi-dimensional performance indicators to generate a test report further includes: Execute a corresponding operation according to the test scenario to obtain a first performance indicator; An indicator calculation is performed based on the first performance indicator to obtain a second performance indicator and generate a test report; the second performance indicator includes an indicator fluctuation variance, an indicator incremental difference and / or an indicator upward trend.

6. The method according to any one of claims 1 to 5, wherein: The performing corresponding operations according to the test scenario to obtain multi-dimensional performance indicators to generate a test report further includes: Determine the type of test scenario according to the interactive components, interactive behavior tracking statistics and / or page exposure tracking statistics included in the interactive page; A third performance indicator of the test is dynamically determined according to the type of the test scenario, the third performance indicator is obtained, and a test report is generated.

7. The method according to any one of claims 1 to 6, wherein: The method further comprises: Based on the traversal of the full code of the mobile terminal, determine the difference information of the page component tree between the current traversal and the previous traversal; Predicting fluctuation ranges of multi-dimensional performance indicators based on difference information of the page component tree; Determine whether a difference between a multi-dimensional performance index of a test scenario corresponding to a current traversal and a multi-dimensional performance index of a test scenario corresponding to a previous traversal exceeds the fluctuation range; If so, an alarm is processed based on the difference information of the page component tree.

8. A mobile terminal testing device, comprising: The traversal module is suitable for traversing the full amount of code on the mobile terminal and obtaining the page code and embedded point data according to the preset identifier; A test scenario module, adapted to determine a test scenario based on a preset link algorithm according to the page code and the embedded point data; The test scenario includes an interactive page and a behavior link of the interactive page; The test performance module is suitable for executing corresponding operations according to the test scenario based on a preset UI execution framework, obtaining multi-dimensional performance indicators, and generating a test report.

9. A computing device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the mobile terminal testing method according to any one of claims 1-7.

10. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to perform operations corresponding to the mobile terminal testing method according to any one of claims 1 to 7.

11. A computer program product, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the mobile terminal testing method according to any one of claims 1 to 7.