Application program processing method and related equipment
By obtaining the identity and resource package of multi-end applications, and directly conducting functional interface tests in the test application, the problem of cumbersome testing process of multi-end applications is solved and a more efficient testing process is achieved.
Patent Information
- Application Number
- CN202310691661.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2024-12-13
AI Technical Summary
The testing process of multi-end applications is cumbersome, which increases the complexity and inefficiency of development testing.
By obtaining the application's identity, obtaining multi-end resource packages, and performing functional interface tests in the test application, directly loading and running multi-end resource packages, the steps of building APK/IPA files are avoided.
Reduces the complexity of application testing, improves testing efficiency, and provides a faster testing experience.
Smart Images

Figure CN119127655A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and specifically to a method for processing an application, a device for processing an application, a computer equipment, a computer-readable storage medium, and a computer program product. Background Art
[0002] At present, when developers are developing multi-terminal applications, in order to be able to conduct real-machine experience testing of the developed multi-terminal applications in the device, they not only need to build the code of the multi-terminal application into a multi-terminal resource package and generate an APK (Android Package, Android installation package) installation package or an IPA (iPhone Application, Apple application) installation package, but also need to sign and install it in the corresponding operating system. For example, for IOS applications, developers also need to apply for a development account in advance, complete the relevant configuration of the development certificate, and then install it based on the IPA installation package before conducting a real-machine experience test. From the above process, it can be seen that the testing process of the entire multi-terminal application is a relatively cumbersome task, which undoubtedly increases the complexity of application development and testing, resulting in low efficiency in application testing. Summary of the invention
[0003] The embodiment of the present application provides a method for processing an application program, which can reduce the technical complexity of application program testing and improve the testing efficiency of the application program.
[0004] On the one hand, an embodiment of the present application provides a method for processing an application, the method comprising:
[0005] Obtaining an identifier of a first application under test to be tested;
[0006] According to the identifier of the first application under test, obtaining a multi-terminal resource package of the first application under test; the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems;
[0007] Based on the multi-terminal resource package of the first application under test, the functional interface of the first application under test is tested in the test application.
[0008] On the one hand, an embodiment of the present application provides a device for processing an application program, the device comprising:
[0009] An acquisition unit, used for acquiring an identifier of a first application program to be tested;
[0010] The acquisition unit is further used to acquire a multi-terminal resource package of the first application under test according to the identifier of the first application under test; the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems;
[0011] The processing unit is also used to test the functional interface of the first application under test in the test application based on the multi-terminal resource package of the first application under test.
[0012] In one embodiment, the processing unit is specifically configured to:
[0013] Loading and running the multi-terminal resource package of the first application under test in the test application;
[0014] Based on the operation of the multi-terminal resource package of the first application under test, a functional interface of the first application under test is demonstrated in the test application.
[0015] In one embodiment, the processing unit is further configured to:
[0016] In the process of demonstrating the functional interface of the first application under test in the test application, if an exit demonstration operation is received, the functional interface of the first application under test is switched to be displayed as the service interface of the test application;
[0017] The exit demonstration operation includes any of the following: a long press operation, a sliding operation along the target direction, a voice operation, and an operation of inputting a specific gesture.
[0018] In one embodiment, the processing unit is specifically configured to:
[0019] Loading a multi-terminal resource package of a first application under test in a test application;
[0020] Outputting loading progress prompt information, where the loading progress prompt information is used to prompt the loading progress of the multi-terminal resource package of the first application under test;
[0021] When the loading progress reaches a preset progress, the multi-terminal resource package of the first application under test is run in the test application.
[0022] In one embodiment, the acquisition unit is specifically configured to:
[0023] Displaying a list of applications to be tested in the test application, the list of applications to be tested including identifiers of one or more applications to be tested;
[0024] When the identifier of the first application under test in the list to be tested is triggered, obtaining the identifier of the first application under test from the list to be tested;
[0025] The display form of the identifier of the first application under test in the list to be tested includes at least one of the following: an icon, a card, and a button.
[0026] In one embodiment, the acquisition unit is specifically configured to:
[0027] Obtaining a preview graphic code of the first application under test;
[0028] The preview graphic code of the first application under test is scanned and parsed to obtain an identifier of the first application under test.
[0029] In one embodiment, the number of tested applications to be tested is N, N is a positive integer, and the first tested application is any one of the N tested applications; the N tested applications are tested according to preset test rules; the preset test rules include sequence rules and / or duration rules;
[0030] The sequence rule is used to indicate the test sequence of each of the N tested applications;
[0031] The duration rule is used to indicate a test duration threshold of each of the N tested applications.
[0032] In one embodiment, the preset test rule includes a sequence rule; the processing unit is further configured to:
[0033] determining a test sequence for the first application under test;
[0034] When the test sequence corresponding to the first application under test is reached, a step of testing the functional interface of the first application under test in the test application is executed based on the multi-terminal resource package of the first application under test.
[0035] In one embodiment, the preset test rule includes a duration rule; the processing unit is further configured to:
[0036] In a process of testing a functional interface of a first application under test in a multi-terminal resource package based on the first application under test in the test application, if the test duration of the first application under test reaches a test duration threshold of the first application under test indicated by the duration rule, the test of the functional interface of the first application under test is stopped, and a test process of the functional interface of a second application under test is started in the test application;
[0037] The second application under test is any one of the N applications under test except the first application under test.
[0038] In one embodiment, the processing unit is further configured to:
[0039] Obtaining a test log of a first application under test;
[0040] Analyze the test log of the first application under test to obtain analysis results;
[0041] If the analysis result indicates that the functional interface of the first application under test has not been tested completely when the test duration threshold is reached, the functional interface of the first application under test is retested in the test application.
[0042] In one embodiment, the processing unit is further configured to:
[0043] In response to the operation of setting the independent operation mode for the first application under test, obtaining a flag bit in the test application;
[0044] The value of the flag bit is set to the identifier of the first application under test.
[0045] In one embodiment, the processing unit is further configured to:
[0046] When the test application is closed and restarted, the value of the flag bit of the test application is read;
[0047] If the value of the flag bit is the identifier of the first application under test, then loading and running the multi-terminal resource package of the first application under test;
[0048] Based on the running of the multi-terminal resource package of the first application under test, the startup interface of the test application is switched and displayed as the functional interface of the first application under test.
[0049] In one embodiment, the processing unit is further configured to:
[0050] If the flag value is the default value, the multi-terminal resource package of the test application is loaded and run;
[0051] Based on the running of the multi-terminal resource package of the test application, the startup interface of the test application is displayed as the service interface of the test application.
[0052] In one embodiment, the test application is a multi-terminal application generated based on a multi-terminal framework; the generation process of the test application includes:
[0053] Get the source code of the test application;
[0054] Based on the multi-terminal framework, the developer tool is called to compile the source code of the test application to obtain the multi-terminal resource package of the test application;
[0055] The multi-terminal resource package of the test application, the multi-terminal software development toolkit in the multi-terminal framework, and the native engineering template are combined to form a test application.
[0056] In one embodiment, a multi-terminal resource package of a test application, a multi-terminal software development kit in a multi-terminal framework, and a native engineering template are combined to form a test application, including:
[0057] Obtain the multi-terminal software development kit in the multi-terminal framework as a carrier container;
[0058] Loading the test application's multi-client resource bundle into the hosting container; and,
[0059] Place the carrier container of the multi-terminal resource package loaded with the test application into the native project template to form a test application.
[0060] In one aspect, an embodiment of the present application provides a computer device, the computer device comprising:
[0061] a processor suitable for executing a computer program;
[0062] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processing method of the above-mentioned application program is implemented.
[0063] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is loaded by a processor and executes a processing method such as the above-mentioned application.
[0064] On the one hand, an embodiment of the present application provides a computer program product, which includes a computer program or computer instructions, and when the computer program or computer instructions are executed by a processor, the processing method of the above-mentioned application is implemented.
[0065] In an embodiment of the present application, an identifier of a first application under test to be tested is obtained, and based on the identifier of the first application under test, a multi-terminal resource package of the first application under test is obtained, wherein the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems; then, based on the multi-terminal resource package of the first application under test, the functional interface of the first application under test is tested in the test application. It can be seen that when testing the first application under test, the functional interface of the first application under test can be tested directly in the test application through the multi-terminal resource package of the first application under test, without the need to build an APK / IPA file based on the source code of the first application under test and then install it on the device for testing. In this way, the complexity of application testing is reduced, while the efficiency of application testing is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0067] Figure 1a An architectural diagram of a processing system for an application provided for an exemplary embodiment of the present application;
[0068] Figure 1b A schematic diagram of a processing flow of an application program provided for an exemplary embodiment of the present application;
[0069] Figure 1c A schematic diagram of a processing flow of an application provided for another exemplary embodiment of the present application;
[0070] Figure 2 A flowchart of a method for processing an application provided for an exemplary embodiment of the present application;
[0071] Figure 3a A schematic diagram of a list to be tested provided for an exemplary embodiment of the present application;
[0072] Figure 3b A schematic diagram of scanning a preview graphic code of a first application under test provided by an exemplary embodiment of the present application;
[0073] Figure 3c A schematic diagram of demonstrating a functional interface of a first application under test in a test application is provided as an exemplary embodiment of the present application;
[0074] Figure 4 A schematic diagram of a test application generation process provided for an exemplary embodiment of the present application;
[0075] Figure 5a A schematic diagram of a test application generation process provided for an exemplary embodiment of the present application;
[0076] Figure 5b A schematic diagram of a functional interface for exiting a demonstration of a first tested application provided by an exemplary embodiment of the present application;
[0077] Figure 5c A schematic diagram of a wake-up application menu provided for an exemplary embodiment of the present application;
[0078] Figure 6 A schematic diagram of testing the functional interfaces of multiple tested application programs provided by an exemplary embodiment of the present application;
[0079] Figure 7 A flowchart of a method for processing an application provided for another exemplary embodiment of the present application;
[0080] Figure 8 A schematic diagram of the structure of a processing device for an application provided as an exemplary embodiment of the present application;
[0081] Fig. 9 A schematic diagram of the structure of a computer device provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0082] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0083] First, the relevant technical terms involved in the embodiments of the present application are explained.
[0084] 1. Multi-terminal framework
[0085] A multi-terminal framework refers to a framework that can support the development of mobile applications using the native syntax of mini-programs. Schematically, the multi-terminal framework can be the Dount multi-terminal framework. Developers can compile mini-programs and multi-terminal applications separately by coding once in the multi-terminal framework, thereby realizing multi-terminal development. Among them, multi-terminal applications refer to applications compiled through the multi-terminal framework that can run on multiple operating systems; operating systems can include Android operating system, Apple (iOS) operating system, etc.
[0086] 2. Developer Tools
[0087] Developer tools refer to tools provided by the multi-terminal framework for application development and debugging. Schematically, developer tools can be used as tools for mini-program development and debugging. Through developer tools, mini-program code can be compiled into a multi-terminal resource package that can run on multi-terminal applications.
[0088] 3. Multi-terminal resource packages
[0089] A multi-terminal resource package refers to compiling source code (such as applet code) into a resource package that can run on multi-terminal applications through developer tools. In one implementation, when the developer tool is in multi-terminal mode, the source code can be built into a multi-terminal resource package in this mode. The so-called multi-terminal mode refers to a mode for developing multi-terminal applications on developer tools.
[0090] 4. Multi-terminal (Software Development Kit) SDK
[0091] Multi-terminal SDK refers to the core SDK of the multi-terminal framework. In the embodiment of the present application, a multi-terminal application is mainly composed of a multi-terminal SDK + a multi-terminal resource package.
[0092] 5. APK (Android Package) and IPA (iPhone Application)
[0093] APK is an application installation package format for the Android operating system. An APK file contains all the code, resources, manifest files, and other required files of an application, and can be installed and deployed on Android devices. IPA is an iOS application package file format. An IPA file contains all the code, resources, metadata, and signature of an application, and it is a standard format for installing and deploying applications on iOS devices.
[0094] 6. Application under test
[0095] The application under test refers to a multi-terminal application that needs to be tested. In other words, the application under test refers to an application that can run in multiple operating systems. In an embodiment of the present application, an identifier corresponds to the application under test, and the identifier of the application under test is used to uniquely identify the application under test. The application under test may be composed of a multi-terminal SDK and a corresponding multi-terminal resource package in a multi-terminal framework. In one implementation, the multi-terminal resource package of the application under test may be a resource package that enables the application under test to run in multiple operating systems by calling a developer tool in a multi-terminal framework to compile the source code of the application under test.
[0096] In one implementation, the source code of the application under test may be the applet code developed in the multi-terminal framework based on the applet native syntax. In another implementation, the source code of the application under test may be the applet code that is pre-written in a framework other than the multi-terminal framework and converted into a format that can be compiled in the multi-terminal framework.
[0097] 7. Test the application
[0098] A test application refers to an application used to test the application under test. The test application is a multi-terminal application proposed by the multi-terminal framework team. The test application is designed to help developers quickly test the multi-terminal application (i.e. the application under test) built by the mini-program during the development phase, so that developers can quickly test or experience the functions of the built multi-terminal application. Therefore, the test application can be called a mobile application assistant, or assistant APP (Application).
[0099] In an embodiment of the present application, a test application corresponds to an identifier, and the identifier of the test application is used to uniquely identify the test application. The test application may be composed of a multi-terminal SDK and a corresponding multi-terminal resource package in a multi-terminal framework, and the test application can be installed and run in multiple operating systems. In one implementation, the multi-terminal resource package of the test application may be a resource package that enables the test application to run in multiple operating systems by calling a developer tool in a multi-terminal framework to compile the source code of the test application. The source code of the test application may be the applet code developed based on the native syntax of the applet in the multi-terminal framework.
[0100] In an embodiment of the present application, a processing scheme for an application is provided, and the general principle of the scheme is as follows: when it is necessary to test a first application under test, an identifier of the first application under test to be tested can be obtained, and based on the identifier of the first application under test, a multi-terminal resource package of the first application under test can be obtained, and the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems; then, based on the multi-terminal resource package of the first application under test, the functional interface of the first application under test is tested in the test application. It can be seen that when testing the first application under test, the functional interface of the first test application can be tested directly in the test application through the multi-terminal resource package of the first test application, and there is no need to build an APK / IPA file based on the source code of the first application under test and then install it on the device for testing. In this way, the test complexity of the application test is reduced, and the efficiency of the application test is improved.
[0101] Next, an application processing system provided in an embodiment of the present application is introduced in detail.
[0102] See also Figure 1a, which is an architecture diagram of an application processing system provided by an exemplary embodiment of the present application. The system may include at least one terminal device 101 and a server 102. Among them, the terminal device 101 and the server 102 may communicate via wire or wirelessly. The terminal device 101 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like. The server 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, and the like. Among them:
[0103] The terminal device 101 may be a device used by a developer, and the terminal device 101 may run a test application, which is used to test the functional interface of the application under test based on the multi-terminal resource package of the application under test. In addition, the terminal device runs a developer tool provided by the multi-terminal framework, and the developer can call the developer tool to compile the mini-program code into a multi-terminal resource package that can run on the multi-terminal application.
[0104] The server 102 may correspond to the developer tool and may be a server that provides technical support for the services provided by the developer tool. Schematically, the server 102 may be used to store a multi-terminal resource package of a multi-terminal application compiled by the developer tool.
[0105] In one embodiment, Figure 1a The interaction process between the terminal device and the server shown can be combined with Figure 1b Detailed description. Figure 1b A schematic diagram of a processing flow of an application provided for an exemplary embodiment of the present application. Referring to 1b, the processing flow of the application between the terminal device 101 and the server 102 includes:
[0106] (1) When a developer needs to test an application (such as a first application under test), the test application in the terminal device 101 is triggered, and a list of applications to be tested is displayed in the test application. The list of applications to be tested includes the identifiers of one or more applications to be tested. The developer can trigger (such as clicking, double-clicking, etc.) the identifier of the first application under test to be tested. When the identifier of the first application under test in the list of applications to be tested is detected to be triggered, the test application can obtain the identifier of the first application under test. Schematically, in Figure 1bIn the test application, the developer can click on the identifier "XX Shop" of the first application under test in the list to be tested. The test application then detects that the identifier "XX Shop" of the first application under test is triggered, and obtains the identifier "XX Shop" of the first application under test.
[0107] (2) The test application sends a resource bundle request to the server 102, the resource bundle request includes an identifier of the first application under test, and the resource bundle request is used to request a multi-terminal resource bundle of the first application under test from the server 102. In one implementation, the test application may call an interface to send the resource bundle request to the server 102.
[0108] (3) In response to the received resource bundle request, server 102 reads the stored multi-terminal resource bundle of the first application under test based on the identifier of the first application under test, and returns the multi-terminal resource bundle of the first application under test to the test application.
[0109] (4) The test application receives the multi-terminal resource package of the first application under test, loads and runs the multi-terminal resource package of the first application under test, and then demonstrates the functional interface of the first test application in the test application based on the running of the first application under test. The functional interface of the first test application can be as follows: Figure 1b shown.
[0110] In another embodiment, Figure 1a The interaction process between the terminal device and the server shown can also be combined with Figure 1c Detailed description. Figure 1c A schematic diagram of a processing flow of an application provided for another exemplary embodiment of the present application. Referring to 1c, the processing flow of the application between the terminal device 101 and the server 102 includes:
[0111] (1) When the developer tool is in multi-terminal mode, the developer can trigger a preview operation for the first application under test. In response to the preview operation, a preview graphic code of the first application under test can be generated. The preview graphic code can be a QR code, a barcode, etc. The preview operation can be a click, a double-click operation, etc. of a preview button provided in the developer tool. Illustratively, the developer tool can be as follows: Figure 1c As shown, the developer tool includes a preview button 11, and the developer can click the preview button 11. In response to the click operation of the preview button, a preview graphic code of the first application under test can be displayed in the compilation interface of the developer tool.
[0112] (2) The test application in the terminal device 101 scans and parses the preview graphic code of the first application under test to obtain the identification of the first application under test. It should be understood that the developer tool and the test application can run on the same terminal device 101, the preview graphic code can be stored in the server 102, and the test application in the terminal device 101 can obtain the preview graphic code from the server 102, and then scan and parse the preview graphic code of the first application under test to obtain the identification of the first application under test. Alternatively, the developer tool and the test application can run on different terminal devices, such as the test application runs in the terminal device 101, and the developer tool runs in another terminal device. The terminal device 101 can communicate with the other terminal device based on the server 102. At this time, the test application in the terminal device 101 directly scans the preview graphic code of the first application under test on the other terminal device, and parses the preview graphic code of the first application under test to obtain the identification of the first application under test.
[0113] (3) The test application sends a resource bundle request to the server 102, the resource bundle request includes an identifier of the first application under test, and the resource bundle request is used to request a multi-terminal resource bundle of the first application under test from the server 102. In one implementation, the test application may call an interface to send the resource bundle request to the server 102.
[0114] (4) In response to the received resource bundle request, server 102 reads the stored multi-terminal resource bundle of the first application under test based on the identifier of the first application under test, and returns the multi-terminal resource bundle of the first application under test to the test application.
[0115] (5) The test application receives the multi-terminal resource package of the first application under test, loads and runs the multi-terminal resource package of the first application under test, and then demonstrates the functional interface of the first test application in the test application based on the running of the first application under test.
[0116] In an embodiment of the present application, the identification of the first application under test can be obtained in a variety of ways (such as by triggering the first application under test in the list to be tested, scanning a preview graphic code), and based on the identification of the first application under test, the multi-terminal resource package of the first application under test is obtained from the server, and then the multi-terminal resource package of the first application under test is loaded and run, and based on the running of the first application under test, the functional interface of the first test application is demonstrated in the test application. In this way, when testing the first application under test, the functional interface of the first test application is tested directly in the test application through the multi-terminal resource package of the first test application, and there is no need to build an APK / IPA file based on the source code of the first application under test and then install it on the device for testing. In this way, the test complexity of the application test is reduced, and the efficiency of the application test is improved, which can bring a faster testing experience to developers.
[0117] Next, the processing method of the application provided in the embodiment of the present application is described.
[0118] See also Figure 2 , is a flowchart of a method for processing an application provided by an exemplary embodiment of the present application. The method for processing the application can be executed by a computer device. More specifically, the method for processing the application can be executed by a test application running in a computer device, and the computer device can be a terminal device in the above system. The method for processing the application provided in the embodiment of the present application can include the following steps S201-S203:
[0119] S201: Obtain an identifier of a first application program to be tested.
[0120] The identifier may include but is not limited to: application name, application number, etc. The first application under test is a multi-terminal application. The first application under test may include but is not limited to: a payment multi-terminal application, a query multi-terminal application, a shopping multi-terminal application, etc.
[0121] Among them, the method of obtaining the identifier of the first application under test may include but is not limited to the following two methods: ① When entering the test application, a list to be tested is displayed in the test application, and the list to be tested contains the identifiers of one or more application under test to be tested. The application under test may be a multi-terminal application developed by a developer; the developer may trigger the identifier of the first application under test in the list to be tested, and when it is detected that the identifier of the first application under test in the list to be tested is triggered, the identifier of the first application under test can be obtained from the list to be tested. For example, Figure 3aAs shown, it is a schematic diagram of a list to be tested provided by an exemplary embodiment of the present application. The list to be tested 31 may include two identifications of the application to be tested, namely, the identification "XX Shop" of the application to be tested 1 and the identification "XXX Market" of the application to be tested 2. The developer triggers the identification of the application to be tested 1. When the identification of the application to be tested 1 is triggered, the identification of the application to be tested 1 can be obtained.
[0122] The triggering method of the identification of the first application under test can be flexibly set, such as clicking, sliding, dragging, long pressing the identification of the first application under test, etc., and the embodiment of the present application does not impose any limitation on this.
[0123] Displaying the list of tests in the test application may include: when a test option in the developer tool (such as a real machine test option in the developer tool) is triggered, the list of tests may be displayed in the service interface of the test application, and the service interface may include but is not limited to: a management interface for managing the application under test, such as Figure 3a In the example, the list to be tested 31 can be displayed in the service interface 301 of the test application. The display form of the identification of the application to be tested in the list to be tested includes at least one of the following: icon, card, button. Figure 3a In the example, the logo of the tested application 1 "XX Shop" is displayed in the form of a card 32. Optionally, in addition to displaying the logo of the tested application 1, the card 32 may also display other application information of the tested application 1, such as the size of the tested application 1 is 22 megabytes.
[0124] It should be understood that the display forms of the identifications of different tested applications in the list to be tested may be the same or different. For example, the identifications of the tested applications may all be displayed in the form of cards in the list to be tested, such as Figure 3a In the example, the identification of the tested application 1 and the identification of the tested application 2 are displayed in the form of cards. For another example, the identification of the first tested application can be displayed in the form of a card in the list to be tested, and the identification of the second tested application can be displayed in the form of an icon in the list to be tested.
[0125] ② A preview button is provided in the developer tools. Figure 1cAs shown. A preview graphic code of the first application under test is generated through the preview button, and the preview graphic code includes an identifier of the first application under test. The computer device can obtain the identifier of the first application under test by scanning the preview graphic code. Specifically, the computer device can obtain the preview graphic code of the first application under test, and then scan and parse the preview graphic code of the first application under test to obtain the identifier of the first application under test. In one implementation, a scanning component is configured in the application test program, and the scanning component can be called to scan and parse the preview graphic code of the first application under test. Schematically, as shown Figure 3b FIG. 1 is a schematic diagram of scanning a preview graphic code of a first application under test provided by an exemplary embodiment of the present application. Figure 3b In the example, the service interface 301 of the test application includes a scanning component 33. The developer can trigger the scanning component 33, and in response to the triggering operation on the scanning component 33, the scanning component 33 is called to scan and parse the preview graphic code 34 of the first application under test to obtain the identifier of the first application under test.
[0126] S202. Acquire a multi-terminal resource package of the first application under test according to an identifier of the first application under test; the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems.
[0127] The multi-terminal resource package of the first application under test can be a resource package obtained by calling the developer tool in the multi-terminal framework to compile the source code of the first application under test, and can enable the first application under test to run in multiple operating systems. The source code of the first application under test can be the applet code obtained by developing based on the native syntax of the applet in the multi-terminal framework. Alternatively, the source code of the first application under test can be a code pre-written in a framework other than the multi-terminal framework, and the applet code that can be compiled in the multi-terminal framework is obtained after format conversion.
[0128] As an implementation method, the multi-terminal resource package of the first application under test can be stored in the server. According to the identifier of the first application under test, obtaining the multi-terminal resource package of the first application under test can be: calling an interface to send a resource package request to the server, the resource package request includes the identifier of the first application under test, and the resource package request is used to request the multi-terminal resource package of the first application under test; and then receiving the multi-terminal resource package of the first application under test returned by the server based on the data packet request.
[0129] S203: Based on the multi-terminal resource package of the first application under test, test the functional interface of the first application under test in the test application.
[0130] In one implementation, based on the multi-terminal resource package of the first application under test, testing the functional interface of the first application under test in the test application may include: loading and running the multi-terminal resource package of the first application under test in the test application; then, based on the running of the multi-terminal resource package of the first application under test, demonstrating the functional interface of the first application under test in the test application. Schematically, the first application under test is a shopping application, and the functional interface of the shopping application may include but is not limited to: an item interface for displaying various types of items, an interface for displaying the details of an item, an interface for purchase and payment, and the like. As mentioned above Figure 1c As shown, the functional interface of the first tested application includes an item interface for displaying various types of items, and the item interface includes product information of multiple items, and the product information of the multiple items are: product information of product 1, product information of product 2, product information of product 3, and product information of product 4.
[0131] In some optional embodiments, loading and running the multi-terminal resource package of the first application under test in the test application may include: loading the multi-terminal resource package of the first application under test in the test application, and outputting loading progress prompt information, the loading progress prompt information is used to prompt the loading progress of the multi-terminal resource package of the first application under test; when the loading progress reaches a preset progress, running the multi-terminal resource package of the first application under test in the test application. The preset progress can be set according to demand, for example, the preset progress can be set to 100%, 98%, etc. Schematically, as shown in FIG. Figure 3c As shown in FIG. 1 , a schematic diagram of demonstrating a functional interface of a first application under test in a test application is provided as a schematic diagram of an exemplary embodiment of the present application. Figure 3c In the example, the preset progress is 100%. When the multi-terminal resource package of the first application under test is loaded in the test application, a loading progress prompt message 35 is output in the test application. The loading entry prompt message is used to indicate that the loading progress of the multi-terminal resource package of the first application under test is 73%. Then, when the loading progress reaches 100%, the multi-terminal resource package of the first application under test is run in the test application, and based on the running of the multi-terminal resource package of the first application under test, the functional interface 302 of the first application under test is demonstrated in the test application.
[0132] The test application can be a multi-terminal application generated based on a multi-terminal framework. Figure 4As shown, a schematic diagram of a generation process of a test application provided by an exemplary embodiment of the present application. The generation process of the test application may include: ① Obtaining the source code of the test application. ② Based on the multi-terminal framework, calling the developer tool to compile the source code of the test application to obtain a multi-terminal resource package of the test application. ③ Combine the multi-terminal resource package of the test application, the multi-terminal software development toolkit in the multi-terminal framework, and the native engineering template to form a test application. The source code of the test application can be the applet code obtained by developing the applet native syntax in the multi-terminal framework.
[0133] Combining the multi-terminal resource package of the test application, the multi-terminal software development toolkit in the multi-terminal framework, and the native project template to form a test application may include: obtaining the multi-terminal software development toolkit in the multi-terminal framework as a carrier container, and loading the multi-terminal resource package of the test application into the carrier container; and placing the carrier container loaded with the multi-terminal resource package of the test application into the native project template to form the test application.
[0134] It should be understood that the above-mentioned native project templates may include but are not limited to: Android project templates, iOS project templates. When the carrier container of the multi-terminal resource package loaded with the test application is placed in the Android project template, the formed test application can be installed and run in the Android operating system. When the carrier container of the multi-terminal resource package loaded with the test application is placed in the iOS project template, the formed test application can be installed and run in the iOS operating system.
[0135] In an embodiment of the present application, an identifier of the first application under test to be tested is obtained, and based on the identifier of the first application under test, a multi-terminal resource package of the first application under test is obtained, wherein the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems; then, based on the multi-terminal resource package of the first application under test, the functional interface of the first application under test is tested in the test application. It can be seen that when testing the first application under test, the functional interface of the first application under test can be tested directly in the test application without having to construct an APK / IPA file from the source code of the first application under test and then install it on the device for testing, which reduces the complexity of the test and improves the test efficiency.
[0136] Next, other functions of the test application provided in the embodiment of the present application are described.
[0137] In some optional embodiments, the following functions may also be provided in the test application: (1) Tested application viewing function: In the test application, the application information of the tested application can be viewed, and the application information includes but is not limited to: application detail information (such as developer information, identification of the tested application, etc.), application version information (such as version number, number of version iterations, etc.), etc. In one implementation, in response to an application viewing operation on the first tested application, the application information of the first tested application is displayed in the test application. The first tested application corresponds to a view button, and the application viewing operation on the first tested application can be a trigger operation on the view button of the first tested application, and the trigger operation can include but is not limited to: a click operation, a double-click operation, a sliding operation, etc. Schematically, as shown in FIG. Figure 5a FIG. 1 is a schematic diagram showing application information of a first application under test provided by an exemplary embodiment of the present application. Figure 5a In the test application, the first application under test has a view button 51 corresponding to it. The developer can click the view button 51. In response to the click operation of the view button 51, the application information 52 of the first application under test is displayed in the test application. The application information 52 includes an application detail information option 521, an application version information 522, and an independent operation mode setting option 523. Among them, the application detail information can be viewed by triggering the application detail information option 521; the application version information can be viewed by triggering the application version information 522; the independent operation mode setting option 523 can be used to set the first application under test to an independent operation mode. By setting the first application under test to an independent operation mode, the first application under test can be defaulted as the startup application after the test application is restarted, which can allow developers to have a more immersive real machine testing experience.
[0138] It should be understood that the application viewing operation may include not only the triggering operation of the view button, but also voice input operation (such as voice input to view the application information of the first application under test), clicking on the logo of the first application under test within a period of time, etc., and the embodiments of the present application do not limit this. In addition, the embodiments of the present application do not limit the location where the application information of the first application under test is displayed in the test application. Displaying the application information of the first application under test in the test application may include but is not limited to: displaying the application information of the first application under test in the service interface of the test application, displaying the application information of the first application under test in a window independent of the service interface (such as Figure 5a As shown, the application information of the first application under test is displayed in a window 53 independent of the service interface), and the application information of the first application under test is displayed in other interfaces independent of the service interface of the test application.
[0139] (2) Demonstration exit function: In the process of demonstrating the functional interface of the first application under test in the test application, the developer can exit the demonstration of the first application under test as required, that is, the developer can exit the test of the functional interface of the first application under test in the test application as required. In one embodiment, if an exit demonstration operation is received, the functional interface of the first application under test is switched to the service interface of the test application. Through the above exit demonstration function, the test of the first application under test can be flexibly controlled.
[0140] The exit demonstration operation includes any of the following: ① Long press operation. Specifically, the long press operation may be a long press operation on a target area of the functional interface of the first application under test. The target area may include but is not limited to: the middle area and the left area of the functional interface. When the developer long presses the target area of the functional interface, it can be determined that the exit demonstration operation is received. Schematically, as Figure 5b As shown, it is a schematic diagram of a functional interface for exiting the demonstration of the first tested application provided by an exemplary embodiment of the present application. Figure 5b ② The developer long presses area A in the functional interface of the first application under test, determines that the long press operation on area A is received, and switches the display from the functional interface 503 of the first application under test to the service interface 502 of the test application. ② The sliding operation along the target direction, the target direction can be left, right, up, down, etc. When the developer slides along the target direction in the functional interface, it can be determined that the exit demonstration operation is received. ③ Voice operation. For example, input the voice "exit demonstration", recognize the voice, and obtain the recognition result of exit demonstration, then it can be determined that the exit demonstration operation is received, and switch the display from the functional interface of the first application under test to the service interface of the test application. ④ The operation of inputting a specific gesture, the specific gesture can be, for example, an OK gesture, an M gesture, etc. Indicatively, when it is detected that an OK gesture is input in the functional interface of the first application under test, it can be determined that the exit demonstration operation is received.
[0141] Optionally, when the functional interface of the first application under test is demonstrated in the test application, an exit prompt message may be output in the functional interface of the first application under test, and the exit prompt message is used to prompt a method of waking up the application menu. The method of prompting to wake up the application menu may include but is not limited to: clicking, long pressing the functional interface of the first application under test, etc. In response to a wake-up operation on the application menu (such as a click operation, a long pressing operation on the functional interface of the first application under test, etc.), an application menu is displayed in the functional interface of the first application under test, and the application menu includes an exit option. Schematically, as shown in FIG. Figure 5c FIG. 1 is a schematic diagram of a wake-up application menu provided by an exemplary embodiment of the present application. Figure 5c In the test application, when the first application under test is demonstrated, an exit prompt message 56 is displayed in the function interface 504 of the first application under test, and the exit prompt message is used to indicate that the application menu can be awakened by long pressing the function interface of the first application under test; the developer can display an application menu 57 in the function interface of the first application under test in response to the wake-up operation for the application menu by long pressing the function interface, and the application menu includes an exit demonstration option 58. In response to the exit demonstration option 58, it is determined that the exit demonstration operation is received, and the function interface of the first application under test is switched to the service interface of the test application. Optionally, when the exit prompt message 56 is displayed in the function interface 504 of the first application under test, a close option 59 can be displayed at the same time, and the exit prompt message 56 can be closed in response to a trigger operation (such as a click operation) for the close option. Alternatively, the exit prompt message 56 can be automatically closed within a period of time (such as 1 second, 3 seconds, etc.).
[0142] It should be understood that the application menu can be displayed in a fixed area of the functional interface of the first application under test, and the fixed area can be the middle area, the left area, the right area, the bottom area (such as in Figure 5c Or the application menu can be displayed in the functional interface of the first tested application as a floating window, and this application does not impose any limitation on this.
[0143] (3) Automatic switching test function: Assume that the number of tested applications to be tested in the test application is N, where N is a positive integer. Then, in the test application, the N tested applications can be automatically switched to perform a test, thereby automating the testing of the functional interfaces of the N tested applications, which can improve the test efficiency to a certain extent. The first tested application is any one of the N tested applications.
[0144] Next, the automatic switching test of N tested application programs involved in the embodiment of the present application is described.
[0145] In some optional embodiments, the N tested applications may be tested according to preset test rules. The preset test rules include sequence rules and / or duration rules. The duration rule is used to indicate a test duration threshold of each of the N tested applications.
[0146] (1) Preset test rules include sequence rules
[0147] The sequence rule is used to indicate the test order of each of the N tested applications, and the sequence rule can be set by the developer according to the requirements. In one implementation, the sequence rule may include a random sequence test rule, that is, the N tested applications are randomly tested. Schematically, N=3, and the three tested applications are respectively tested application A, tested application B, and tested application C. When testing in the test application, the functional interface of tested application A, the functional interface of tested application B, and the functional interface of tested application C are tested in the test application completely randomly. In another implementation, the sequence rule may include a specified sequence rule, that is, the N tested applications specify the test order. Schematically, when testing in the test application, the execution sequence rule is used to indicate: in the test application, the functional interface of tested application A is tested first, then the functional interface of tested application B is tested, and finally the functional interface of tested application C is tested.
[0148] In this implementation, taking the first application under test among N applications under test as an example, the test order of the first application under test is determined based on a sequence rule; when the test order corresponding to the first application under test is reached, step S203 can be executed: based on the multi-terminal resource package of the first application under test, the functional interface of the first application under test is tested in the test application.
[0149] Furthermore, when the functional interface of the first application under test is tested in the test application, or when the demonstration of the functional interface of the first application under test is exited in the test application, the second application under test to be tested among the N applications under test can be determined according to the test order indicated by the sequence rule, and then the functional interface of the second application under test is tested in the test application based on the multi-terminal resource package of the second application under test, and so on, and finally the N applications under test can be tested. Among them, the specific implementation method of testing the functional interface of the second application under test in the test application based on the multi-terminal resource package of the second application under test can refer to the specific implementation method of testing the functional interface of the first application under test in the test application based on the multi-terminal resource package of the first application under test, which will not be repeated here.
[0150] Indicatively, Figure 6 FIG. 1 is a schematic diagram of testing the functional interfaces of multiple application programs under test provided by an exemplary embodiment of the present application. Figure 6In the process, when the functional interface 601 of the first application under test is tested, the second application under test to be tested among the N applications under test is determined according to the test sequence indicated by the sequence rule, and then the multi-terminal resource package of the second application under test is recorded, and the loading progress prompt information 61 about the second application under test is output. The loading prompt information 61 is used to indicate the loading progress of the multi-terminal resource package of the second application under test. When the loading progress reaches the preset progress, the multi-terminal resource package of the second application under test is run. Based on the running of the multi-terminal resource package of the second application under test, the functional interface 602 of the second application under test is tested in the test application.
[0151] Among them, the completion of the test of the functional interface of the first tested application means: the demonstration of the functional interface of the first tested application is completed. Correspondingly, the failure to complete the test of the functional interface of the first tested application means: the demonstration of the functional interface of the first tested application is not completed. Schematically, the functional interface of the first tested application includes: an item interface for displaying various items, an interface for displaying the details of an item, and an interface for purchase and payment. When the item interface for displaying various items, the interface for displaying the details of an item, and the interface for purchase and payment in the first tested application are all demonstrated in the test application interface, it is determined that the test of the functional interface of the first tested application is completed; when the item interface for displaying various items and the interface for displaying the details of an item in the first tested application are demonstrated, but the interface for purchase and payment is not demonstrated in the test application interface, it is determined that the test of the first tested application is not completed.
[0152] It should be noted that when the test sequence corresponding to the first application under test is reached, step S201 may also be executed: obtaining the identifier of the first application under test. Alternatively, when the test sequence corresponding to the first application under test is reached, step S202 may also be executed: based on the identifier of the first application under test, obtaining the multi-terminal resource package of the first application under test, which may be understood as: obtaining the identifiers of all applications under test in advance, and when the test sequence corresponding to the first application under test is reached, the multi-terminal resource package of the first application under test may be obtained directly based on the identifier of the first application under test. This embodiment of the present application is not limited to this.
[0153] (2) Preset test rules include duration rules
[0154] The duration rule is used to indicate the test duration threshold of each tested application in the N tested applications. Among them, the test duration threshold can be 3 minutes, 10 minutes, 30 minutes, etc. The test duration threshold of each tested application can be configured according to demand, or the test duration threshold of the tested application can be determined according to the functional interface of the tested application. Schematically, the functional interface of the tested application 1 includes an interface for displaying items and an interface for displaying the details of items; the interface of the tested application 2 includes an interface for sending messages, an interface for viewing contacts, and an interface for reading animations. At this time, the test duration threshold of the tested application can be set to 3 minutes, which means that when the test duration of the tested application 1 reaches 3 minutes, the test of the functional interface of the tested application 1 will be exited in the test application; the test duration threshold of the tested application 2 can be set to 5 minutes, which means that when the test duration of the tested application 2 reaches 5 minutes, the test of the functional interface of the tested application 2 will be exited in the test application. It should be understood that the test duration thresholds of each tested application can be the same or different, and the embodiments of the present application do not limit this in any way.
[0155] In this implementation, each tested application can be tested in the test application based on the test duration threshold of each tested application. As an implementation, taking the first tested application among N tested applications as an example, in the process of testing the functional interface of the first tested application in the test application based on the multi-terminal resource package of the first tested application, it can be detected whether the test duration of the bottom tested application reaches the test duration threshold of the first tested application indicated by the duration rule. If it is determined that the test duration of the first tested application reaches the test duration threshold of the first tested application indicated by the duration rule, the test of the functional interface of the first tested application is stopped, and the test process of the functional interface of the second tested application is started in the test application. If it is determined that the test duration of the first tested application does not reach the test duration threshold of the first tested application indicated by the duration rule, the functional interface of the first tested application continues to be tested in the test application.
[0156] The second application under test is any one of the N applications under test except the first application under test. The testing process of the functional interface of the second application under test in the test application can refer to the testing process of the functional interface of the first application under test, which will not be repeated here.
[0157] It should be understood that, in the process of testing the functional interface of the second application under test in the test application, if the test duration of the second application under test reaches the test duration threshold of the second application under test indicated by the duration rule, the test of the functional interface of the second application under test is stopped, and the test process of the functional interface of the third application under test is started in the test application. The third application under test is any one of the N applications under test except the first application under test and the second application under test, and so on, and finally the test of the functional interfaces of the N applications under test can be realized.
[0158] (3) Preset test rules include sequence rules and duration rules
[0159] In this implementation, the test sequence of the first application under test can be determined, and when the test sequence corresponding to the first application under test is reached, the functional interface of the first application under test is tested in the test application based on the multi-terminal resource package of the first application under test. And in the process of testing the functional interface of the first application under test in the test application based on the multi-terminal resource package of the first application under test, it is determined whether the test duration of the first application under test reaches the test duration threshold of the first application under test indicated by the duration rule. If the test duration of the first application under test reaches the test duration threshold of the first application under test indicated by the duration rule, the test of the functional interface of the first application under test is stopped, and based on the test sequence indicated by the sequence rule, the second application under test to be tested among the N applications under test is determined, and then based on the multi-terminal resource package of the second application under test, the functional interface of the second application under test is tested in the test application.
[0160] If the test duration of the first application under test does not reach the test duration threshold of the first application under test indicated by the duration rule, but the functional interface test of the first application under test is completed, then based on the test sequence indicated by the sequence rule, determine the second application under test to be tested among the N applications under test, and then based on the multi-terminal resource package of the second application under test, test the functional interface of the second application under test in the test application.
[0161] If the test duration of the first application under test does not reach the test duration threshold of the first application under test indicated by the duration rule, but the functional interface of the first application under test is exited in the test application, then based on the test sequence indicated by the sequence rule, the second application under test to be tested among the N applications under test is determined, and then based on the multi-terminal resource package of the second application under test, the functional interface of the second application under test is tested in the test application.
[0162] In some optional embodiments, the tested application may not be tested due to a short test time threshold of the tested application or due to exiting the functional interface of the tested application in the test application. Therefore, the embodiments of the present application can determine the tested application that has not been tested and retest the tested application that has not been tested. Taking the first tested application among N tested applications as an example, the computer device can obtain the test log of the first tested application and analyze the test log of the first tested application to obtain the analysis result. If the analysis result indicates that the functional interface of the first tested application has not been tested, the functional interface of the first tested application is retested in the test application. Schematically, if the analysis result indicates that the functional interface of the first tested application has not been tested when the test time threshold is reached, the functional interface of the first tested application is retested in the test application.
[0163] Among them, retesting the functional interface of the first application under test in the test application may include: after testing the functional interfaces of N application under test in the test application, retesting the functional interface of the first application under test in the test application. Alternatively, retesting the functional interface of the first application under test in the test application may include: when determining that the functional interface of the first application under test is not completed, without considering whether other application under test are tested, directly retesting the functional interface of the first application under test in the test application.
[0164] In summary, the test application in the embodiment of the present application provides a function for viewing the tested application, a function for exiting the demonstration, and an automatic switching test function, so that developers do not need to understand the development knowledge of the application, thereby lowering the entry threshold for developers. In addition, the functions provided by the test application can better test the tested application, thereby improving the test efficiency and test flexibility of the tested application.
[0165] Next, the embodiments of the present application are described in detail, including setting an independent operation mode for the application under test and determining whether to start the application under test when the test application is started again after the independent operation mode is set.
[0166] In an embodiment of the present application, an independent operation mode can be set for the application under test. When the developer accesses the test application, the function interface of the application under test set to the independent operation mode can be directly switched from the startup interface of the test application. Schematically, the application under test is an X-mall multi-terminal application. The developer can set the X-mall multi-terminal application to an independent operation mode. When the test application is closed and restarted, the startup interface of the test application is directly switched to the function interface of the X-mall. That is to say, when the test application is closed and restarted, the developer can directly access the function interface of the X-mall without first entering the service interface of the test application and then accessing the function interface of the X-mall through a series of operations. By setting the independent operation mode for the application under test, a more immersive real machine experience test can be provided for the developer.
[0167] Among them, the process of setting the first application under test to an independent operation mode is as follows: in response to the operation of setting the independent operation mode for the first application under test, a flag bit in the test application is obtained, and the flag bit is used to indicate the application under test that is set to an independent operation mode and is directly started by default when the test application is restarted; then, the value of the flag bit is set to the identifier of the first application under test. In one implementation, the independent operation mode setting option of the first application under test is displayed in the test application, and the operation of setting the independent operation mode for the first application under test can be: a trigger operation on the independent operation mode setting option, and the trigger operation can include one of the following: click, double-click, etc. The independent operation mode setting option can be displayed in the service interface of the test application, or the independent operation mode setting option can be displayed in the application menu of the first application under test, such as Figure 5a As shown, the independent operation mode setting option 523 is displayed in the application menu of the first application under test. The embodiments of the present application do not make any limitation to this.
[0168] It should be understood that in the embodiment of the present application, when there is an independent operation mode set for one or more of the N tested applications, the value of the flag bit in the test application will be set to the identifier of the tested application that has been set to the independent operation mode the most recently, and the so-called tested application that has been set to the independent operation mode the most recently refers to: among the one or more tested applications that have been set to the independent operation mode, the tested application corresponding to the application with the smallest time difference between the time of setting the independent operation mode and the system time. Schematically, independent operation modes are set for two tested applications, wherein the time difference between the time of setting the independent operation mode for the first tested application and the system time is greater than the time difference between the time of setting the independent operation mode for the second tested application and the system time, then the value of the flag bit in the test application is set to the identifier of the second tested application.
[0169] Furthermore, when the test application is started again, the test application needs to determine whether the service interface of the test application or the function interface of the first tested application needs to be opened. Figure 7 FIG. 1 is a flowchart of a method for processing an application provided by another exemplary embodiment of the present application. The method for processing the application may include steps S701-S703:
[0170] S701. When the test application is closed and restarted, the value of the flag bit of the test application is read.
[0171] In a specific implementation, the developer can close the test application and click the logo of the test application (such as Figure 7 ), the computer device can detect that the test application is closed and restarted, and read the value of the flag bit of the test application.
[0172] S702: If the value of the flag bit is the identifier of the first application under test, the startup interface of the test application is switched to be displayed as the function interface of the first application under test.
[0173] Among them, step S702 specifically includes: if the value of the flag bit is the identifier of the first application under test, then the multi-terminal resource package of the first application under test is loaded and run, and based on the running of the multi-terminal resource package of the first application under test, the startup interface of the test application is switched to display the functional interface of the first application under test.
[0174] S703: If the value of the flag bit is a default value, the startup interface of the test application is displayed as the service interface of the test application.
[0175] When the value of the flag bit is a default value, it means that the first application under test is not set to an independent running mode, and at this time, the service interface of the test application can be started by default.
[0176] Among them, step S703 specifically includes: if the value of the flag is the default value, loading and running the multi-terminal resource package of the test application, and based on the running of the multi-terminal resource package of the test application, displaying the startup interface of the test application as the service interface of the test application. The default value can be set arbitrarily.
[0177] To sum up, by setting an independent running mode for the first application under test, it is convenient to directly load and run the multi-terminal resource package of the first application under test when the test application is started next time, so that the functional interface of the first application under test can be quickly displayed in the test application. For the developer experience, it is like opening the corresponding first application under test. This can not only provide developers with an immersive application experience, but also realize rapid testing of the first application under test and improve testing efficiency.
[0178] Next, the processing device of the application provided in the embodiment of the present application is described.
[0179] See also Figure 8 , Figure 8 is a schematic diagram of a structure of a processing device for an application provided in an embodiment of the present application. The processing device for the application may be a computer program (including program code) in a computer device. For example, the processing device for the application may be an application software in a computer device. The processing device for the application may be used to execute Figure 2 and Figure 7 Some or all of the steps in the method embodiment shown. Figure 8 , the processing device of the application includes the following units:
[0180] An acquisition unit 801 is used to acquire an identifier of a first application program to be tested;
[0181] The acquisition unit 801 is further configured to acquire a multi-terminal resource package of the first application under test according to the identifier of the first application under test; the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems;
[0182] The processing unit 802 is further configured to test the functional interface of the first application under test in the test application based on the multi-terminal resource package of the first application under test.
[0183] In one embodiment, the processing unit 802 is specifically configured to:
[0184] Loading and running the multi-terminal resource package of the first application under test in the test application;
[0185] Based on the operation of the multi-terminal resource package of the first application under test, a functional interface of the first application under test is demonstrated in the test application.
[0186] In one embodiment, the processing unit 802 is further configured to:
[0187] In the process of demonstrating the functional interface of the first application under test in the test application, if an exit demonstration operation is received, the functional interface of the first application under test is switched to be displayed as the service interface of the test application;
[0188] The exit demonstration operation includes any of the following: a long press operation, a sliding operation along the target direction, a voice operation, and an operation of inputting a specific gesture.
[0189] In one embodiment, the processing unit 802 is specifically configured to:
[0190] Loading a multi-terminal resource package of a first application under test in a test application;
[0191] Outputting loading progress prompt information, where the loading progress prompt information is used to prompt the loading progress of the multi-terminal resource package of the first application under test;
[0192] When the loading progress reaches a preset progress, the multi-terminal resource package of the first application under test is run in the test application.
[0193] In one embodiment, the acquisition unit 801 is specifically configured to:
[0194] Displaying a list of applications to be tested in the test application, the list of applications to be tested including identifiers of one or more applications to be tested;
[0195] When the identifier of the first application under test in the list to be tested is triggered, obtaining the identifier of the first application under test from the list to be tested;
[0196] The display form of the identifier of the first application under test in the list to be tested includes at least one of the following: an icon, a card, and a button.
[0197] In one embodiment, the acquisition unit 801 is specifically configured to:
[0198] Obtaining a preview graphic code of the first application under test;
[0199] The preview graphic code of the first application under test is scanned and parsed to obtain an identifier of the first application under test.
[0200] In one embodiment, the number of tested applications to be tested is N, N is a positive integer, and the first tested application is any one of the N tested applications; the N tested applications are tested according to preset test rules; the preset test rules include sequence rules and / or duration rules;
[0201] The sequence rule is used to indicate the test sequence of each of the N tested applications;
[0202] The duration rule is used to indicate a test duration threshold of each of the N tested applications.
[0203] In one embodiment, the preset test rule includes a sequence rule; the processing unit is further configured to:
[0204] determining a test sequence for the first application under test;
[0205] When the test sequence corresponding to the first application under test is reached, a step of testing the functional interface of the first application under test in the test application is executed based on the multi-terminal resource package of the first application under test.
[0206] In one embodiment, the preset test rule includes a duration rule; the processing unit 802 is further configured to:
[0207] In a process of testing a functional interface of a first application under test in a multi-terminal resource package based on the first application under test in the test application, if the test duration of the first application under test reaches a test duration threshold of the first application under test indicated by the duration rule, the test of the functional interface of the first application under test is stopped, and a test process of the functional interface of a second application under test is started in the test application;
[0208] The second application under test is any one of the N applications under test except the first application under test.
[0209] In one embodiment, the processing unit 802 is further configured to:
[0210] Obtaining a test log of a first application under test;
[0211] Analyze the test log of the first application under test to obtain analysis results;
[0212] If the analysis result indicates that the functional interface of the first application under test has not been tested completely when the test duration threshold is reached, the functional interface of the first application under test is retested in the test application.
[0213] In one embodiment, the processing unit 802 is further configured to:
[0214] In response to the operation of setting the independent operation mode for the first application under test, obtaining a flag bit in the test application;
[0215] The value of the flag bit is set to the identifier of the first application under test.
[0216] In one embodiment, the processing unit 802 is further configured to:
[0217] When the test application is closed and restarted, the value of the flag bit of the test application is read;
[0218] If the value of the flag bit is the identifier of the first application under test, then loading and running the multi-terminal resource package of the first application under test;
[0219] Based on the running of the multi-terminal resource package of the first application under test, the startup interface of the test application is switched and displayed as the functional interface of the first application under test.
[0220] In one embodiment, the processing unit is further configured to:
[0221] If the flag value is the default value, the multi-terminal resource package of the test application is loaded and run;
[0222] Based on the running of the multi-terminal resource package of the test application, the startup interface of the test application is displayed as the service interface of the test application.
[0223] In one embodiment, the test application is a multi-terminal application generated based on a multi-terminal framework; the generation process of the test application includes:
[0224] Get the source code of the test application;
[0225] Based on the multi-terminal framework, the developer tool is called to compile the source code of the test application to obtain the multi-terminal resource package of the test application;
[0226] The multi-terminal resource package of the test application, the multi-terminal software development toolkit in the multi-terminal framework, and the native engineering template are combined to form a test application.
[0227] In one embodiment, a multi-terminal resource package of a test application, a multi-terminal software development kit in a multi-terminal framework, and a native engineering template are combined to form a test application, including:
[0228] Obtain the multi-terminal software development kit in the multi-terminal framework as a carrier container;
[0229] Loading the test application's multi-client resource bundle into the hosting container; and,
[0230] Place the carrier container of the multi-terminal resource package loaded with the test application into the native project template to form a test application.
[0231] In an embodiment of the present application, an identifier of the first application under test to be tested is obtained, and based on the identifier of the first application under test, a multi-terminal resource package of the first application under test is obtained, wherein the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems; then, based on the multi-terminal resource package of the first application under test, the functional interface of the first application under test is tested in the test application. It can be seen that when testing the first application under test, the functional interface of the first application under test can be tested directly in the test application through the multi-terminal resource package of the first application under test, without the need to build an APK / IPA file based on the source code of the first application under test and then install it on the device for testing. In this way, the complexity of application testing is reduced, while the efficiency of application testing is improved.
[0232] Next, the computer device provided in the embodiment of the present application is described.
[0233] Furthermore, the present application embodiment also provides a schematic diagram of the structure of a computer device. The schematic diagram of the structure of the computer device can be found in Fig. 9 The computer device may include: a processor 901, an input device 902, an output device 903 and a memory 904. The processor 901, the input device 902, the output device 903 and the memory 904 are connected via a bus. The memory 904 is used to store a computer program, the computer program includes program instructions, and the processor 901 is used to execute the program instructions stored in the memory 904.
[0234] In the embodiment of the present application, the processor 901 performs the following operations by running the program instructions in the memory 904:
[0235] Obtaining an identifier of a first application under test to be tested;
[0236] According to the identifier of the first application under test, obtaining a multi-terminal resource package of the first application under test; the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems;
[0237] Based on the multi-terminal resource package of the first application under test, the functional interface of the first application under test is tested in the test application.
[0238] In one embodiment, when the processor 901 tests the functional interface of the first application under test in the test application based on the multi-terminal resource package of the first application under test, it can specifically perform the following steps:
[0239] Loading and running the multi-terminal resource package of the first application under test in the test application;
[0240] Based on the operation of the multi-terminal resource package of the first application under test, a functional interface of the first application under test is demonstrated in the test application.
[0241] In one embodiment, the processor 901 may further perform the following steps:
[0242] In the process of demonstrating the functional interface of the first application under test in the test application, if an exit demonstration operation is received, the functional interface of the first application under test is switched to be displayed as the service interface of the test application;
[0243] The exit demonstration operation includes any of the following: a long press operation, a sliding operation along the target direction, a voice operation, and an operation of inputting a specific gesture.
[0244] In one embodiment, when the processor 901 loads and runs the multi-terminal resource package of the first application under test in the test application, the following steps may be specifically performed:
[0245] Loading a multi-terminal resource package of a first application under test in a test application;
[0246] Outputting loading progress prompt information, where the loading progress prompt information is used to prompt the loading progress of the multi-terminal resource package of the first application under test;
[0247] When the loading progress reaches a preset progress, the multi-terminal resource package of the first application under test is run in the test application.
[0248] In one embodiment, when the processor 901 obtains the identifier of the first application program to be tested, the processor 901 may specifically perform the following steps:
[0249] Displaying a list of applications to be tested in the test application, the list of applications to be tested including identifiers of one or more applications to be tested;
[0250] When the identifier of the first application under test in the list to be tested is triggered, obtaining the identifier of the first application under test from the list to be tested;
[0251] The display form of the identifier of the first application under test in the list to be tested includes at least one of the following: an icon, a card, and a button.
[0252] In one embodiment, when the processor 901 obtains the identifier of the first application program to be tested, the processor 901 may specifically perform the following steps:
[0253] Obtaining a preview graphic code of the first application under test;
[0254] The preview graphic code of the first application under test is scanned and parsed to obtain an identifier of the first application under test.
[0255] In one embodiment, the number of tested applications to be tested is N, N is a positive integer, and the first tested application is any one of the N tested applications; the N tested applications are tested according to preset test rules; the preset test rules include sequence rules and / or duration rules;
[0256] The sequence rule is used to indicate the test sequence of each of the N tested applications;
[0257] The duration rule is used to indicate a test duration threshold of each of the N tested applications.
[0258] In one embodiment, the preset test rule includes a sequence rule; the processor 901 may further perform the following steps:
[0259] determining a test sequence for the first application under test;
[0260] When the test sequence corresponding to the first application under test is reached, a step of testing the functional interface of the first application under test in the test application is executed based on the multi-terminal resource package of the first application under test.
[0261] In one embodiment, the preset test rule includes a duration rule; the processor 901 may further perform the following steps:
[0262] In a process of testing a functional interface of a first application under test in a multi-terminal resource package based on the first application under test in the test application, if the test duration of the first application under test reaches a test duration threshold of the first application under test indicated by the duration rule, the test of the functional interface of the first application under test is stopped, and a test process of the functional interface of a second application under test is started in the test application;
[0263] The second application under test is any one of the N applications under test except the first application under test.
[0264] In one embodiment, the processor 901 may further perform the following steps:
[0265] Obtaining a test log of a first application under test;
[0266] Analyze the test log of the first application under test to obtain analysis results;
[0267] If the analysis result indicates that the functional interface of the first application under test has not been tested completely when the test duration threshold is reached, the functional interface of the first application under test is retested in the test application.
[0268] In one embodiment, the processor 901 may further perform the following steps:
[0269] In response to the operation of setting the independent operation mode for the first application under test, obtaining a flag bit in the test application;
[0270] The value of the flag bit is set to the identifier of the first application under test.
[0271] In one embodiment, the processor 901 may further perform the following steps:
[0272] When the test application is closed and restarted, the value of the flag bit of the test application is read;
[0273] If the value of the flag bit is the identifier of the first application under test, then loading and running the multi-terminal resource package of the first application under test;
[0274] Based on the running of the multi-terminal resource package of the first application under test, the startup interface of the test application is switched and displayed as the functional interface of the first application under test.
[0275] In one embodiment, the processor 901 may further perform the following steps:
[0276] If the flag value is the default value, the multi-terminal resource package of the test application is loaded and run;
[0277] Based on the running of the multi-terminal resource package of the test application, the startup interface of the test application is displayed as the service interface of the test application.
[0278] In one embodiment, the test application is a multi-terminal application generated based on a multi-terminal framework; the generation process of the test application includes:
[0279] Get the source code of the test application;
[0280] Based on the multi-terminal framework, the developer tool is called to compile the source code of the test application to obtain the multi-terminal resource package of the test application;
[0281] The multi-terminal resource package of the test application, the multi-terminal software development toolkit in the multi-terminal framework, and the native engineering template are combined to form a test application.
[0282] In one embodiment, a multi-terminal resource package of a test application, a multi-terminal software development kit in a multi-terminal framework, and a native engineering template are combined to form a test application, including:
[0283] Obtain the multi-terminal software development kit in the multi-terminal framework as a carrier container;
[0284] Loading the test application's multi-client resource bundle into the hosting container; and,
[0285] Place the carrier container of the multi-terminal resource package loaded with the test application into the native project template to form a test application.
[0286] In an embodiment of the present application, an identifier of the first application under test to be tested is obtained, and based on the identifier of the first application under test, a multi-terminal resource package of the first application under test is obtained, wherein the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems; then, based on the multi-terminal resource package of the first application under test, the functional interface of the first application under test is tested in the test application. It can be seen that when testing the first application under test, the functional interface of the first application under test can be tested directly in the test application through the multi-terminal resource package of the first application under test, without the need to build an APK / IPA file based on the source code of the first application under test and then install it on the device for testing. In this way, the complexity of application testing is reduced, while the efficiency of application testing is improved.
[0287] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the processor executes the above program instructions, it can execute the above Figure 2 and Figure 7 The method in the corresponding embodiment, therefore, will not be repeated here. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the program instructions can be deployed on a computer device, or executed on multiple computer devices located in one location, or, executed on multiple computer devices distributed in multiple locations and interconnected by a communication network.
[0288] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device can perform the above Figure 2 and Figure 7 The method in the corresponding embodiment will therefore not be described in detail here.
[0289] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0290] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for processing an application, characterized in that: include: Obtaining an identifier of a first application under test to be tested; According to the identifier of the first application under test, obtaining a multi-terminal resource package of the first application under test; the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems; Based on the multi-terminal resource package of the first application under test, the functional interface of the first application under test is tested in the test application.
2. The method according to claim 1, characterized in that The multi-terminal resource package based on the first application under test, testing the functional interface of the first application under test in the test application, comprises: Loading and running the multi-terminal resource package of the first application under test in the test application; Based on the operation of the multi-terminal resource package of the first application under test, a functional interface of the first application under test is demonstrated in the test application.
3. The method according to claim 2, characterized in that The method further comprises: During the process of demonstrating the functional interface of the first application under test in the test application, if an exit demonstration operation is received, switching the display from the functional interface of the first application under test to the service interface of the test application; The exit demonstration operation includes any of the following: a long press operation, a sliding operation along the target direction, a voice operation, and an operation of inputting a specific gesture.
4. The method according to claim 2, characterized in that The step of loading and running the multi-terminal resource package of the first application under test in the test application comprises: Loading the multi-terminal resource package of the first application under test in the test application; Outputting loading progress prompt information, where the loading progress prompt information is used to prompt the loading progress of the multi-terminal resource package of the first application under test; When the loading progress reaches a preset progress, the multi-terminal resource package of the first application under test is run in the test application.
5. The method according to claim 1, characterized in that The step of obtaining the identifier of the first application program to be tested includes: Displaying a list to be tested in the test application, wherein the list to be tested includes identifications of one or more tested applications to be tested; When the identifier of the first application under test in the list to be tested is triggered, obtaining the identifier of the first application under test from the list to be tested; The display form of the identifier of the first application under test in the list to be tested includes at least one of the following: an icon, a card, and a button.
6. The method according to claim 1, characterized in that The step of obtaining the identifier of the first application program to be tested includes: Obtaining a preview graphic code of the first application under test; Scan and parse the preview graphic code of the first application under test to obtain an identifier of the first application under test.
7. The method according to claim 1, characterized in that The number of tested applications to be tested is N, where N is a positive integer, and the first tested application is any one of the N tested applications; the N tested applications are tested according to preset test rules; the preset test rules include sequence rules and / or duration rules; The sequence rule is used to indicate the test sequence of each of the N tested applications; The duration rule is used to indicate a test duration threshold of each of the N tested applications.
8. The method according to claim 7, characterized in that The preset test rule includes a sequence rule; the method further includes: Determining a test order for the first application under test; When the test sequence corresponding to the first application under test is reached, a step of testing the functional interface of the first application under test in the test application is executed based on the multi-terminal resource package of the first application under test.
9. The method according to claim 7, characterized in that The preset test rule includes a duration rule; the method further includes: In the process of testing the functional interface of the first application under test in the test application based on the multi-terminal resource package of the first application under test, if the test duration of the first application under test reaches the test duration threshold of the first application under test indicated by the duration rule, the test of the functional interface of the first application under test is stopped, and the test process of the functional interface of the second application under test is started in the test application; The second application under test is any one of the N applications under test except the first application under test.
10. The method according to claim 9, characterized in that The method further comprises: Obtaining a test log of the first application under test; Analyzing the test log of the first application under test to obtain an analysis result; If the analysis result indicates that the functional interface of the first application under test has not been tested completely when the first application under test reaches the test duration threshold, the functional interface of the first application under test is retested in the test application.
11. The method according to claim 1, characterized in that The method further comprises: In response to the operation of setting the independent operation mode for the first application under test, obtaining a flag bit in the test application; The value of the flag bit is set to the identifier of the first application under test.
12. The method according to claim 11, characterized in that The method further comprises: When the test application is closed and restarted, the value of the flag bit of the test application is read; If the value of the flag bit is the identifier of the first application under test, loading and running the multi-terminal resource package of the first application under test; Based on the running of the multi-terminal resource package of the first application under test, the startup interface of the test application is switched and displayed as the functional interface of the first application under test.
13. The method according to claim 12, characterized in that The method further comprises: If the value of the flag bit is a default value, loading and running the multi-terminal resource package of the test application; Based on the running of the multi-terminal resource package of the test application, the startup interface of the test application is displayed as the service interface of the test application.
14. The method of claim 1, wherein the test application is a multi-terminal application generated based on a multi-terminal framework; The generation process of the test application includes: Obtaining source code of the test application; Based on the multi-terminal framework, calling a developer tool to compile the source code of the test application to obtain a multi-terminal resource package of the test application; The multi-terminal resource package of the test application, the multi-terminal software development toolkit in the multi-terminal framework, and the native engineering template are combined to form the test application.
15. The method according to claim 14, characterized in that The combining and processing of the multi-terminal resource package of the test application, the multi-terminal software development kit in the multi-terminal framework, and the native engineering template to form the test application includes: Obtaining a multi-terminal software development kit in the multi-terminal framework as a carrier container; Loading the multi-terminal resource package of the test application into the carrying container; and, The carrier container of the multi-terminal resource package loaded with the test application is placed in the native project template to form the test application.
16. A device for processing an application, characterized in that: include: An acquisition unit, used for acquiring an identifier of a first application program to be tested; The acquisition unit is further configured to acquire a multi-terminal resource package of the first application under test according to the identifier of the first application under test; the multi-terminal resource package of the first application under test refers to a resource package that enables the first application under test to run in multiple operating systems; A processing unit is used to test the functional interface of the first application under test in a test application based on the multi-terminal resource package of the first application under test.
17. A computer device, characterized in that: include: a processor suitable for executing a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the processing method of the application program according to any one of claims 1 to 15 is executed.
18. A computer-readable storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed by a processor, the processing method of the application program according to any one of claims 1 to 15 is executed.
19. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the method for processing an application program according to any one of claims 1 to 15.
