Application testing method and device based on Kwan operating system and computing equipment
By building a test framework suitable for the Hongmeng operating system, executing test cases and collecting performance indicators, the problem of inapplicability of the test tools under the new version of the Hongmeng operating system is solved, and efficient application testing and quality assurance is achieved.
Patent Information
- Application Number
- CN202411239186.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-20
AI Technical Summary
The existing testing tools and frameworks are no longer suitable for the new version of the Hongmeng operating system, and application testing cannot be completed easily.
Using the test framework plug-in tool corresponding to the Hongmeng operating system, a target test framework is built for the application to be tested, a test case file is executed, a test report is output, and performance indicator data is collected to generate performance monitoring results, supporting UI automation testing, stability testing, Performance test.
It realizes automatic collection and performance testing of indicator data, improves testing efficiency, and ensures the online quality of application versions suitable for the Hongmeng operating system.
Smart Images

Figure CN119166515A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of Internet technology, and specifically to an application testing method, apparatus, and computing device based on the Hongmeng operating system. Background Art
[0002] Hongmeng OS is a distributed operating system that supports seamless collaboration of multiple devices and multiple scenarios, and aims to build a unified operating system ecosystem. With the increasing popularity and widespread application of Hongmeng OS, more and more application vendors are accelerating the development of application versions adapted to Hongmeng OS. After an application is developed, it needs to undergo a series of application tests. Only after the test results meet the application testing standards of Hongmeng OS can it be released on the application market for users to download and install on devices based on Hongmeng OS for use.
[0003] The new version of Hongmeng OS now uses a self-developed single-framework structure, which makes the test tools and frameworks used in traditional test solutions no longer applicable. It is necessary to re-explore and build an adaptive test solution. How to conveniently complete application testing based on Hongmeng OS has become an urgent problem to be solved. Summary of the invention
[0004] In view of the above problems, the present application proposes an application testing method, device and computing device based on the Hongmeng operating system to solve the following problems: the testing tools and frameworks used in the existing testing schemes are no longer applicable to the new version of the Hongmeng operating system, and it is impossible to conveniently complete application testing based on the Hongmeng operating system.
[0005] According to one aspect of an embodiment of the present application, a method for testing an application based on the Hongmeng operating system is provided, including:
[0006] Use the test framework plug-in tool corresponding to the Hongmeng operating system to build a target test framework for the application to be tested;
[0007] Store the test case files of multiple scenarios of the application to be tested into the test case folder in the target test framework;
[0008] Based on the target test framework, execute the test case files in the test case folder, output the test report, and collect the performance indicator data of the test equipment during the test process to generate performance monitoring results.
[0009] Furthermore, using the test framework plug-in tool corresponding to the Hongmeng operating system to build a target test framework for the application to be tested further includes:
[0010] Use the test framework plug-in tool corresponding to the Hongmeng operating system to create a test project;
[0011] In the test project, create a test project configuration folder, a test resource folder, a performance test folder, a custom module folder, a test case folder, and a test case execution entry;
[0012] Build a target test framework for the application to be tested based on the test project configuration folder, test resource folder, performance test folder, custom module folder, test case folder, and test case execution entry.
[0013] Furthermore, the test project configuration folder is used to store the test project configuration file, and the test project configuration file records the task configuration of the target test framework;
[0014] The test resource folder is used to store resource files used and generated during the test process;
[0015] The performance test folder is used to store performance test case scenarios and general performance test methods;
[0016] The custom module folder is used to store the preset path operations and common methods of the application under test;
[0017] The test case folder is used to store test case configuration files and test case files;
[0018] The test case execution entry is used to add test case related parameters.
[0019] Furthermore, test case related parameters include: running time, execution frequency, execution mode, execution device, performance parameters, report type, report directory, and business scope.
[0020] Furthermore, collecting performance indicator data of the test equipment during the test process and generating performance monitoring results further includes:
[0021] Using a preset performance and power consumption test tool to collect performance indicator data of a test device installed with the application to be tested during the test process;
[0022] The collected performance indicator data is processed to generate performance monitoring results in the form of charts, and the increase and decrease ratios of each performance indicator data are analyzed to determine the performance quality of the product.
[0023] Further, the test case files include stability test case files;
[0024] Based on the target test framework, the test case files in the test case folder are executed, and the output test report further includes:
[0025] Based on the target test framework, execute the stability test case file in the test case folder. During the test process, use the command line tool corresponding to the Hongmeng operating system to send test instructions to the test device where the application to be tested is installed. Perform stability tests according to the test instructions to obtain a stability report, and use the stability report as the test report.
[0026] According to another aspect of an embodiment of the present application, there is provided an application testing device based on the Hongmeng operating system, including:
[0027] A construction module, suitable for using a test framework plug-in tool corresponding to the Hongmeng operating system to build a target test framework for the application to be tested;
[0028] A test case storage module, adapted to store test case files of multiple scenarios of the application to be tested into a test case folder in the target test framework;
[0029] The test module is suitable for executing the test case files in the test case folder based on the target test framework, outputting the test report, and collecting the performance indicator data of the test equipment during the test process to generate performance monitoring results.
[0030] According to another aspect of the embodiment of the present application, there is provided a computing device, including: 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;
[0031] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned application testing method based on the Hongmeng operating system.
[0032] According to another aspect of an embodiment of the present application, a computer storage medium is provided, in which at least one executable instruction is stored, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned application testing method based on the Hongmeng operating system.
[0033] According to another 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 application testing method based on the Hongmeng operating system.
[0034] According to the application testing method, apparatus and computing device based on the Hongmeng operating system provided in the embodiments of the present application, a new target testing framework suitable for the Hongmeng operating system is constructed for the application to be tested through the test framework plug-in tool corresponding to the Hongmeng operating system, supporting UI automation testing, stability testing, performance testing, etc.; based on the target testing framework, the test case files in the test case folder are executed, the test report can be easily output, and the performance indicator data of the test equipment during the test process can be collected in real time, thereby realizing the automatic collection of indicator data and performance testing, effectively improving the testing efficiency, and helping to fully ensure the online quality of the application version suitable for the Hongmeng operating system.
[0035] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment 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 embodiment of the present application more obvious and easy to understand, the specific implementation method of the embodiment of the present application is listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] 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 used for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the embodiments of the present application. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0037] Figure 1 A schematic diagram showing the compilation, release and listing of an application;
[0038] Figure 2 A schematic diagram of a process of an application testing method based on the Hongmeng operating system according to an embodiment of the present application is shown;
[0039] Figure 3 A schematic diagram of a process of an application testing method based on the Hongmeng operating system according to another embodiment of the present application is shown;
[0040] Figure 4 A schematic diagram of the target test framework is shown;
[0041] Figure 5 A schematic diagram showing a test logic code in a test case file;
[0042] Figure 6 A schematic diagram of a running log is shown;
[0043] Figure 7 A schematic diagram showing a principle of an application testing method based on the Hongmeng operating system according to another embodiment of the present application is shown;
[0044] Figure 8 A schematic diagram showing the performance monitoring results corresponding to memory usage;
[0045] Fig. 9 A schematic diagram showing the performance monitoring results corresponding to the CPU occupancy rate;
[0046] Fig.10 A schematic diagram showing the performance monitoring results corresponding to FPS;
[0047] Fig.11 A schematic diagram showing the performance monitoring results corresponding to the GPU occupancy rate;
[0048] Fig.12 A schematic diagram of a stability test process is shown;
[0049] Fig.13 A structural block diagram of an application testing device based on Hongmeng operating system according to an embodiment of the present application is shown;
[0050] Fig.14 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 disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0052] First, the terms involved in one or more embodiments of the present application are explained.
[0053] HarmonyOS: It is a distributed operating system independently developed by Huawei. Its earlier version adopted a dual-frame structure, combining the main features of the Android operating system. Its new version now adopts a fully self-developed single-frame structure, and the framework language uses ArkTS, which has the characteristics of greater security and multi-terminal compatibility.
[0054] ArkTS: It is the application development language of HarmonyOS. It is an extension of the TypeScript (TS) language. While maintaining the basic syntax style of TS, it imposes stricter constraints on the dynamic type characteristics of TS, introduces static types, and strengthens static checking and analysis during the development period through standard definitions to improve program execution stability and performance. Due to the use of static type checking, ArkTS code will be compiled into Ark bytecode files instead of JS code. Therefore, ArkTS runs faster and is easier to be further optimized. At the same time, ArkTS provides corresponding capabilities such as declarative UI and state management, allowing developers to develop high-performance applications in a simpler and more natural way.
[0055] DevEco Testing Hypium (Hypium for short) is a UI automation testing framework based on the latest Harmony system provided by Huawei to developers. Its principle is to install plug-ins in Pycharm to generate third-party libraries, providing functions such as locating page elements and obtaining device information.
[0056] Python: is a widely used high-level programming language with a simple and clear syntax that is easy to understand and learn. Python supports multiple programming paradigms, including object-oriented, imperative, functional, and procedural programming.
[0057] SmartPerf: is a performance and power consumption test tool developed based on the system, which is easy to use. The tool can detect performance and power consumption related indicators, including FPS, CPU, GPU, RAM, etc., and understand the application performance status through quantitative indicators.
[0058] HarmonyOSDevice Connector (hdc for short): It is a command line tool for debugging provided by HarmonyOS for developers. Through this tool, you can interact with real devices or simulators on Windows / Linux / Mac systems.
[0059] In order to facilitate understanding of the technical solution of this application, the compilation, release and listing process of the application in this application is introduced below. The new version of the Hongmeng operating system now launched supports applications developed in a modular manner and also supports multi-device adaptation. Figure 1 The schematic diagram of the compilation, release and listing of the application is shown in FIG. Figure 1As shown in the figure, an application usually contains multiple functions. It is a good design method to divide and manage different functional features by modules. During the application development process, each functional module can be developed as an independent module (Module). The module can contain source code, resource files, third-party libraries, configuration files, etc. Each module can be compiled independently to achieve specific functions. This modular and loosely coupled application management method is conducive to the development, maintenance and expansion of applications.
[0060] Since an application often needs to adapt to multiple device types, in applications that use a multi-module design, each module will be marked with the device type it supports. Some modules support all types of devices, while some modules only support one or several types of devices (such as tablets). When distributing application packages in the application market, accurate screening and matching can also be done based on device types, so that different packages can be reasonably combined and deployed to the corresponding devices. Figure 1 As shown, the application with multi-Module design is compiled, packaged and signed before being put on the cloud application market. After the application is developed, it needs to undergo a series of application tests. Only after the test results meet the application testing standards of the Hongmeng operating system can it be put on the application market for users to download and install on devices based on the Hongmeng operating system for use. Specifically, the application market on the cloud side splits, re-signs and combines according to the supported device types marked by each Module in the application, so as to distribute the application package to the corresponding device according to the device type. Devices that need to install the application can download and install the corresponding application package through the application market on the device side.
[0061] Figure 2 A flow chart of an application testing method based on the Hongmeng operating system according to an embodiment of the present application is shown. Figure 2 As shown, the method comprises the following steps:
[0062] Step S201, use the test framework plug-in tool corresponding to the Hongmeng operating system to build a target test framework for the application to be tested.
[0063] The embodiment of the present application uses a test framework plug-in tool corresponding to the Hongmeng operating system to build a new target test framework for the application to be tested that is suitable for the Hongmeng operating system. Among them, the test framework plug-in tool may include DevEcoTesting Hypium, etc., which is a lightweight automated testing framework that supports developers to write test cases in Python. Specifically, the target test framework includes a test project configuration folder, a test resource folder, a performance test folder, a custom module folder, a test case folder, and a test case execution entry.
[0064] Step S202: Store the test case files of multiple scenarios of the application to be tested into a test case folder in the target test framework.
[0065] According to the test requirements of each scenario of the application to be tested, a corresponding test case file is written for each scenario, wherein the test logic code is recorded in the test case file. After the target test framework is constructed, the test case files of multiple scenarios written for the application to be tested can be stored in the test case folder in the target test framework, so as to perform automated testing on the application to be tested.
[0066] Step S203, based on the target test framework, execute the test case files in the test case folder, output the test report, and collect the performance indicator data of the test equipment during the test process to generate a performance monitoring result.
[0067] The target test framework constructed by the embodiment of the present application can support UI automation testing, stability testing, performance testing, etc. Based on the target test framework, the test case files in the test case folder can be easily executed and the test report can be output. The test report may include test results, program running results, stability reports, etc. Based on the target test framework, the performance indicator data of the test equipment during the test process can also be collected in real time, realizing the automatic collection of indicator data, and generating performance monitoring results based on the collected performance indicator data, so that developers can perform report analysis.
[0068] According to the application testing method based on the Hongmeng operating system provided in the embodiment of the present application, a new target testing framework suitable for the Hongmeng operating system is constructed for the application to be tested through the test framework plug-in tool corresponding to the Hongmeng operating system, which supports UI automation testing, stability testing, performance testing, etc.; based on the target testing framework, the test case files in the test case folder are executed, the test report can be easily output, and the performance indicator data of the test equipment during the test process can be collected in real time, which realizes the automatic collection of indicator data and performance testing, effectively improves the testing efficiency, and helps to fully ensure the online quality of the application version suitable for the Hongmeng operating system.
[0069] Figure 3 A flow chart of an application testing method based on the Hongmeng operating system according to another embodiment of the present application is shown. Figure 3 As shown, the method comprises the following steps:
[0070] Step S301, use the test framework plug-in tool corresponding to the Hongmeng operating system to create a test project, and in the test project, establish a test project configuration folder, test resource folder, performance test folder, custom module folder, test case folder and test case execution entry.
[0071] Taking DevEco Testing Hypium, a test framework plug-in tool, as an example, a new test project is created using Hypium. Then, in the test project, a test project configuration folder is established. The subordinate files of the test project configuration folder may include a test project configuration file. The test project configuration file records the task configuration of the target test framework, that is, the test project configuration folder is used to store the test project configuration file; a test resource folder is established. The test resource folder is used to store resource files used in the test process. The resource files required in the test process will be searched from this folder by default. The test resource folder is also used to store resource files generated during the test process, such as screenshots of the test device; a performance test folder is established. The subordinate files of the performance test folder may include performance test case scenarios and general performance test methods, that is, the performance test folder is used to store performance test case scenarios and general performance test methods, wherein the general performance test methods may include starting and stopping performance tools, processing reports, etc. ; Establish a custom module folder, the subordinate files of which may include the preset path operations and general methods of the application to be tested, that is, the custom module folder is used to store the preset path operations and general methods of the application to be tested, such as storing some commonly used path operations within the APP; establish a test case folder, the subordinate files of which may include test case configuration files and test case files, that is, the test case folder is used to store test case configuration files and test case files, and the test case files in the test process will be searched from the test case folder first, wherein the test case configuration file is used to record the configuration case device information, etc., and the test case file is used to record the actual test logic code; a test case execution entry is also established, and the test case execution entry can be used to add test case related parameters, etc., wherein the test case related parameters may include: running time, execution frequency, execution mode, execution device, performance parameters, report type, report directory, business scope, etc.
[0072] Step S302, building a target test framework for the application to be tested based on the test project configuration folder, the test resource folder, the performance test folder, the custom module folder, the test case folder and the test case execution entry.
[0073] The test project configuration folder, test resource folder, performance test folder, custom module folder, test case folder and test case execution entry that are established belong to the same level directory. Based on the test project configuration folder, test resource folder, performance test folder, custom module folder, test case folder and test case execution entry, the target test framework built for the application to be tested can be as follows: Figure 4 shown.
[0074] Step S303: store the test case files of multiple scenarios of the application to be tested into a test case folder in the target test framework.
[0075] The application to be tested can be divided into multiple scenes according to the application content, etc. For example, if the application to be tested is a video social application, its scenes may include playback, homepage, dynamics, space, etc. According to the test requirements of each scene of the application to be tested, a corresponding test case file is written for each scene, and the test case files of multiple scenes of the application to be tested are stored in the test case folder in the target test framework, so as to complete the automated testing of the application to be tested based on the target test framework.
[0076] Step S304, based on the target test framework, execute the test case files in the test case folder, output the test report, and collect the performance indicator data of the test equipment during the test process to generate a performance monitoring result.
[0077] For example, a test case is to test the access to the playback details page from the home page. The test logic code in the test case file can be as follows: Figure 5 Based on the target test framework, the test case file is automatically executed and a test report is output. The test report may include test results, program running results, stability report, etc., wherein the program running results include running logs, system crash logs, etc. By executing Figure 5 The corresponding test case file, the test results can be shown in Table 1, and the running log can be shown in Figure 6 shown.
[0078] Table 1 A test result
[0079]
[0080]
[0081] Figure 7 A schematic diagram of a method for testing an application based on the Hongmeng operating system according to another embodiment of the present application is shown. Figure 7As shown, based on the constructed target test framework, test case related parameters such as running time, execution frequency, execution mode, execution device, performance parameters, report type, report directory, business scope, etc. can be added through the test case execution entry; UI automation testing can be realized by setting the test case file, such as testing automated login to the application to be tested, logout of the application to be tested, and testing the operation of the application to be tested under different traffic characteristics, etc., and the design of test case files for different scenarios can also be conveniently realized by setting the pre-operation steps; the execution program completes the test of the application to be tested installed on the test machine (i.e., the test device), and specifically can execute: program execution environment installation script, whitelist routing monitoring process, performance monitoring preprocessing, stability testing program, etc.; in the embodiment of the present application, weak network environment simulation can also be performed; during the test process, real-time data collection is performed, and performance monitoring is performed based on the collected performance indicator data, etc., to generate performance monitoring results; a test report is output, and the test report includes test results, program running results, stability report, etc., wherein the program running results include running logs, system crash logs, etc., and the stability report can be notified to the developer through message notifications, email notifications, etc., so that they can view it in time, and the stability report can also be stored locally.
[0082] In the embodiment of the present application, a preset performance power consumption test tool can also be used to collect performance indicator data of the test device installed with the application to be tested during the test process. Specifically, the preset performance power consumption test tool may include a SmartPerf tool, which can collect performance indicator data of the test device in real time during the test process to achieve performance monitoring of the test device. Among them, the performance indicator data may include indicator data for reflecting the CPU, GPU, FPS, memory, and other operating conditions of the device, such as CPU occupancy, GPU occupancy, FPS, memory usage, memory occupancy, device temperature, etc.
[0083] After the performance indicator data is collected, the collected performance indicator data can be processed to generate performance monitoring results in the form of charts, and the rise and fall ratios of each performance indicator data can be analyzed to judge the performance quality of the product. The chart forms include tables, bar charts, line charts, bar charts, etc.
[0084] In an optional implementation, for each performance indicator data, the average value, minimum value, maximum value, total value, etc. during the test process are calculated to generate a performance monitoring result in the form of a chart. For example, the generated performance monitoring result in the form of a table may be shown in Table 2.
[0085] Table 2 A performance monitoring result
[0086]
[0087]
[0088] In another optional implementation, the collected performance indicator data may be sorted according to their collection time to generate performance monitoring results in the form of charts. For example, the performance monitoring results corresponding to the generated memory usage may be as follows: Figure 8 As shown, the performance monitoring results corresponding to the CPU usage can be as follows Fig. 9 As shown, the performance monitoring results corresponding to FPS can be Fig.10 As shown, the performance monitoring results corresponding to the GPU occupancy rate can be Fig.11 shown.
[0089] Among them, the test case file may include a stability test case file. Based on the target test framework, the stability test case file in the test case folder is executed. During the test process, the command line tool corresponding to the Hongmeng operating system is used to send test instructions to the test device installed with the application to be tested, and a stability test is performed according to the test instructions to obtain a stability report, and the stability report is used as a test report. Specifically, the command line tool may include HarmonyOSDevice Connector, etc., and the command line tool is used to conveniently send test instructions to the test device to perform a stability test. In the embodiment of the present application, the command line tool corresponding to the Hongmeng operating system is applied to the stability test. By secondary development and full use of the command line tool corresponding to the Hongmeng operating system, it is possible to conveniently implement customized scenario deep stability testing to meet specific business needs.
[0090] Fig.12 A schematic diagram of a stability test process is shown, such as Fig.12 As shown, the command line tool hdc is used to send test instructions in the form of command lines to the test device. Stability testing is performed through command line parsing, operating environment management, system interface management, random event generation and injection, etc., to monitor whether the application to be tested is running stably, whether there are problems such as flash back and crash, whether there are memory leak anomalies, whether there are resource overload anomalies, etc., and generate a stability report based on the stability monitoring situation.
[0091] According to the application testing method based on the Hongmeng operating system provided in the embodiment of the present application, based on the test framework plug-in tool corresponding to the Hongmeng operating system, the construction of the target test framework of the application to be tested under the Hongmeng operating system is realized, and it can support UI automation testing, stability testing, performance testing, etc.; and it can collect the performance indicator data of the test equipment during the test in real time, and realize the automatic collection and performance testing of the indicator data; in addition, the command line tool corresponding to the Hongmeng operating system is applied to the stability test, and through the secondary development and full utilization of the command line tool corresponding to the Hongmeng operating system, it is possible to conveniently implement customized scenario in-depth stability testing to meet specific business needs; this solution conveniently completes the application testing based on the Hongmeng operating system, effectively improves the testing efficiency, helps to fully ensure the online quality of the application version suitable for the Hongmeng operating system, lays a good foundation for application testing based on the Hongmeng operating system, and provides more testing value.
[0092] Fig.13 A structural block diagram of an application testing device based on Hongmeng operating system according to an embodiment of the present application is shown. Fig.13 As shown, the apparatus includes: a construction module 1310 , a use case storage module 1320 and a testing module 1330 .
[0093] Construction module 1310 is suitable for: using the test framework plug-in tool corresponding to the Hongmeng operating system to build a target test framework for the application to be tested.
[0094] The use case storage module 1320 is adapted to store test case files of multiple scenarios of the application to be tested into a test case folder in the target test framework.
[0095] The test module 1330 is adapted to: execute the test case files in the test case folder based on the target test framework, output the test report, and collect the performance indicator data of the test equipment during the test process to generate the performance monitoring results.
[0096] Optionally, construction module 1310 is further suitable for: creating a test project using a test framework plug-in tool corresponding to the Hongmeng operating system; establishing a test project configuration folder, a test resource folder, a performance test folder, a custom module folder, a test case folder, and a test case execution entry in the test project; and building a target test framework for the application to be tested based on the test project configuration folder, the test resource folder, the performance test folder, the custom module folder, the test case folder, and the test case execution entry.
[0097] Optionally, the test project configuration folder is used to store the test project configuration file, which records the task configuration of the target test framework; the test resource folder is used to store the resource files used and generated during the test process; the performance test folder is used to store performance test case scenarios and general performance test methods; the custom module folder is used to store preset path operations and general methods of the application to be tested; the test case folder is used to store test case configuration files and test case files; the test case execution entry is used to add test case related parameters.
[0098] Optionally, test case related parameters include: running time, execution frequency, execution mode, execution device, performance parameters, report type, report directory, and business scope.
[0099] Optionally, the test module 1330 is further suitable for: using a preset performance power consumption test tool to collect performance indicator data of a test device installed with an application to be tested during the test process; processing the collected performance indicator data, generating performance monitoring results in the form of charts, and analyzing the rise and fall ratios of each performance indicator data to determine the performance quality of the product.
[0100] Optionally, the test case file includes a stability test case file; the test module 1330 is further suitable for: based on the target test framework, executing the stability test case file in the test case folder, using the command line tool corresponding to the Hongmeng operating system to send test instructions to the test device installed with the application to be tested during the test process, performing a stability test according to the test instructions to obtain a stability report, and using the stability report as a test report.
[0101] The description of each module above refers to the corresponding description in the method embodiment and will not be repeated here.
[0102] According to the application testing device based on the Hongmeng operating system provided in the embodiment of the present application, based on the test framework plug-in tool corresponding to the Hongmeng operating system, the construction of the target test framework of the application to be tested under the Hongmeng operating system is realized, and it can support UI automation testing, stability testing, performance testing, etc.; and it can collect the performance indicator data of the test equipment during the test in real time, and realize the automatic collection and performance testing of the indicator data; in addition, the command line tool corresponding to the Hongmeng operating system is applied to the stability test, and through the secondary development and full utilization of the command line tool corresponding to the Hongmeng operating system, it is possible to conveniently implement customized scenario in-depth stability testing to meet specific business needs; this solution conveniently completes the application test based on the Hongmeng operating system, effectively improves the test efficiency, helps to fully ensure the online quality of the application version suitable for the Hongmeng operating system, lays a good foundation for application testing based on the Hongmeng operating system, and provides more testing value.
[0103] An embodiment of the present application provides a non-volatile computer storage medium, which stores at least one executable instruction or computer program, which enables a processor to perform operations corresponding to the application testing method based on the Hongmeng operating system in any of the above-mentioned method embodiments.
[0104] An embodiment of the present application provides a computer program product, which includes at least one executable instruction or computer program, which enables a processor to perform operations corresponding to the application testing method based on the Hongmeng operating system in any of the above-mentioned method embodiments.
[0105] Fig.14 A 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.
[0106] like Fig.14 As shown, the computing device may include: a processor (processor) 1402 , a communication interface (Communications Interface) 1404 , a memory (memory) 1406 , and a communication bus 1408 .
[0107] Among them: the processor 1402, the communication interface 1404, and the memory 1406 communicate with each other through the communication bus 1408. The communication interface 1404 is used to communicate with network elements of other devices such as clients or other servers. The processor 1402 is used to execute the program 1410, which can specifically execute the relevant steps in the embodiment of the application testing method based on the Hongmeng operating system for computing devices.
[0108] Specifically, the program 1410 may include program codes, which include computer operation instructions.
[0109] The processor 1402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of 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 may be processors of different types, such as one or more CPUs and one or more ASICs.
[0110] The memory 1406 is used to store the program 1410. The memory 1406 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.
[0111] Program 1410 can be specifically used to enable processor 1402 to execute the application testing method based on Hongmeng operating system in any of the above-mentioned method embodiments. The specific implementation of each step in program 1410 can refer to the corresponding descriptions in the corresponding steps and units in the above-mentioned application testing embodiment based on Hongmeng operating system, 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 aforementioned method embodiment, which will not be repeated here.
[0112] The algorithm and display provided herein are not inherently related to any specific computer, virtual system or other equipment. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the present application embodiment is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present application embodiment described herein, and the above description of specific languages is to disclose the best mode of implementation of the present application embodiment.
[0113] 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.
[0114] Similarly, it should be understood that in order to streamline the present disclosure 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 embodiments 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 embodiments of the present application require 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 explicitly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the embodiment of the present application.
[0115] 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.
[0116] In addition, those skilled in the art will appreciate that, although some embodiments described 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 embodiments of the present application and to form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0117] The various component embodiments of the 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 according to the embodiments of the present application. The embodiments of the present application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the embodiments of 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.
[0118] It should be noted that the above embodiments illustrate rather than limit the embodiments of 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 should not be constructed as a limitation to 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 embodiments of the present application may be implemented by means of hardware including several different elements and by means of appropriately programmed computers. 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.
Claims
1. An application testing method based on Hongmeng operating system, comprising: Using the test framework plug-in tool corresponding to the Hongmeng operating system, build a target test framework for the application to be tested; Storing the test case files of the multiple scenarios of the application to be tested in the test case folder in the target test framework; Based on the target test framework, the test case files in the test case folder are executed, a test report is output, and performance indicator data of the test equipment during the test process is collected to generate performance monitoring results.
2. According to the method of claim 1, the step of using a test framework plug-in tool corresponding to the Hongmeng operating system to construct a target test framework for the application to be tested further comprises: Create a test project using a test framework plug-in tool corresponding to the Hongmeng operating system; In the test project, a test project configuration folder, a test resource folder, a performance test folder, a custom module folder, a test case folder and a test case execution entry are established; Based on the test project configuration folder, the test resource folder, the performance test folder, the custom module folder, the test case folder and the test case execution entry, a target test framework is constructed for the application to be tested.
3. The method according to claim 2, wherein the test project configuration folder is used to store a test project configuration file, and the test project configuration file records the task configuration of the target test framework; The test resource folder is used to store resource files used and generated during the test process; The performance test folder is used to store performance test case scenarios and performance test general methods; The custom module folder is used to store the preset path operations and general methods of the application to be tested; The test case folder is used to store test case configuration files and test case files; The test case execution entry is used to add test case related parameters.
4. According to the method of claim 3, the test case related parameters include: Running time, execution frequency, execution mode, execution equipment, performance parameters, report type, report directory, and business scope.
5. According to the method according to any one of claims 1 to 4, collecting performance indicator data of the test equipment during the test process and generating performance monitoring results further comprises: Using a preset performance and power consumption test tool to collect performance indicator data of a test device installed with the application to be tested during the test process; The collected performance indicator data are processed to generate performance monitoring results in the form of charts, and the rise and fall ratios of each performance indicator data are analyzed to determine the performance quality of the product.
6. The method according to any one of claims 1 to 5, wherein the test case file comprises a stability test case file; The executing the test case files in the test case folder based on the target test framework and outputting the test report further comprises: Based on the target test framework, execute the stability test case file in the test case folder, and during the test process, use the command line tool corresponding to the Hongmeng operating system to send test instructions to the test device on which the application to be tested is installed, perform a stability test according to the test instructions to obtain a stability report, and use the stability report as the test report.
7. An application testing device based on Hongmeng operating system, comprising: A construction module, adapted to construct a target test framework for the application to be tested using a test framework plug-in tool corresponding to the Hongmeng operating system; A test case storage module, adapted to store the test case files of multiple scenarios of the application to be tested into a test case folder in the target test framework; The test module is suitable for executing the test case files in the test case folder based on the target test framework, outputting a test report, and collecting performance indicator data of the test equipment during the test process to generate performance monitoring results.
8. 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 operations corresponding to the application testing method based on the Hongmeng operating system as described in any one of claims 1-6.
9. 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 application testing method based on the Hongmeng operating system as described in any one of claims 1-6.
10. A computer program product, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the application testing method based on the Hongmeng operating system as described in any one of claims 1-6.
