Installation package generation system
The installation package generation system addresses the inefficiency of code modification by enabling users to input plug-ins directly, improving testing efficiency and reducing costs through autonomous packaging.
Patent Information
- Application Number
- CN201911072388.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-05
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2039-11-05
AI Technical Summary
Existing installation package generation methods require developers to modify application code for testing and other tasks, leading to high labor costs and low efficiency.
An installation package generation system comprising a user interface module, basic service module, and packaging service module that allows users to input an installation package and plug-ins without modifying the application code, enabling autonomous packaging and decoupling of testing tasks.
Improves efficiency and reduces costs by allowing users to inject plug-ins into installation packages autonomously, decoupling testing from development work, and enhancing universality and versatility.
Smart Images

Figure CN112764796B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of application processing, and in particular to an installation package generation system. Background Art
[0002] With the continuous development of communication technology, the application of smart terminals is becoming more and more widespread, and more and more applications (Application, APP) are developed for smart terminals. In testing scenarios, it is necessary to add test plug-ins to the application to test the performance and functions of the application. However, the existing technology requires application developers to cooperate with testers to modify the code logic of the application, which has high labor costs and low efficiency. Therefore, it is necessary to provide a technical solution that supports the decoupling of testing and other tasks from application development work to improve the efficiency of testing and other tasks and reduce costs. Summary of the invention
[0003] Multiple aspects of the present application provide an application installation package generation system to achieve decoupling of packaging and application development work, thereby helping to improve the efficiency of subsequent work using the installation package generated by the system and reduce costs.
[0004] The embodiment of the present application provides an installation package generation system, including: a user interface module, a basic service module and a packaging service module;
[0005] The user interface module is used to display the installation package input component and the plug-in input component;
[0006] The basic service module is used to obtain packaging service basic information of the first installation package based on the first installation package provided by the installation package input component and the target plug-in provided by the plug-in input component;
[0007] The packaging service module is used to repackage the first installation package based on the packaging service basic information of the first installation package, and inject the target plug-in during the repackaging process to generate a second installation package of the application.
[0008] The installation package generation system provided in the embodiment of the present application includes: a user interface module, a basic service module and a packaging service module. Among them, the user interface module displays the installation package input component and the plug-in input component, and allows the user to provide the original installation package and the target plug-in that needs to be injected; the basic service module obtains the basic information of the packaging service of the original installation package. The packaging service module can inject the target plug-in into the original installation package during the repackaging process of the original installation package, and generate a new installation package. The installation package generation system provided in the embodiment of the present application can provide users with autonomous packaging services. Users can provide the target plug-ins required for subsequent work according to the packaging requirements, without the need to perform logical transformation on the application, thereby realizing the decoupling of subsequent work from the application development program, which helps to improve the efficiency of subsequent work and reduce costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0010] Figure 1a A schematic diagram of the structure of an installation package generation system provided in an embodiment of the present application;
[0011] Figure 1b A schematic diagram of the structure of another installation package generation system provided in an embodiment of the present application;
[0012] Figure 1c-Figure 1e A schematic diagram of the structure of a human-computer interaction interface provided in an embodiment of the present application;
[0013] Figure 1f A schematic diagram of the structure of an application testing system provided in an embodiment of the present application;
[0014] Figure 2a A schematic diagram of the structure of another application testing system provided in an embodiment of the present application;
[0015] Figure 2b A schematic diagram of a test interaction interface provided in an embodiment of the present application;
[0016] Figure 3 A flowchart of an application testing method provided in an embodiment of the present application;
[0017] Figure 4 A flowchart of another application testing method provided in an embodiment of the present application;
[0018] Figure 5a A flowchart of an executable file testing method provided in an embodiment of the present application;
[0019] Figure 5b A flowchart of another executable file testing method provided in an embodiment of the present application;
[0020] Figure 6 A flowchart of a method for generating an installation package for an application provided in an embodiment of the present application;
[0021] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0023] In view of the technical problem that the existing installation package generation method has low universality, an installation package generation system is provided in some embodiments of the present application. The system includes: a user interface module, a basic service module and a packaging service module; wherein the user interface module displays the installation package input component and the plug-in input component, and allows users to provide the original installation package and the target plug-in that needs to be injected; the basic service module obtains the basic packaging service information of the original installation package. The packaging service module can inject the target plug-in into the original installation package during the repackaging process of the original installation package, and generate a new installation package. The installation package generation system provided in the embodiments of the present application can provide users with autonomous packaging services. Users can provide the target plug-ins required for subsequent work according to the packaging requirements, without the need to perform logical transformation on the application, thereby achieving the decoupling of subsequent work from the application development program, which helps to improve the efficiency of subsequent work and reduce costs.
[0024] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0025] Figure 1a This is a schematic diagram of the structure of an installation package generation system provided in an embodiment of the present application. Figure 1a As shown, the system includes: a user interface (UI) module 11, a basic service module 12 and a packaging service module 13.
[0026] In this embodiment, the user interface module 11 displays an installation package input component and a plug-in input component. The user can provide a first installation package of the application through the installation package input component, and provide a target plug-in through the plug-in input component. The first installation package of the application is the installation package to be repackaged. The first installation package can be the original installation package of the application, or it can be an installation package formed through other repackaging processes.
[0027] In this embodiment, the basic service module 12 maintains the basic information of the installation package packaging service, and can trigger the packaging service module 13 to perform the packaging service. Based on this, the basic service module 12 can obtain the basic information of the packaging service of the first installation package based on the first installation package provided by the installation package input component and the target plug-in provided by the plug-in input component, and provide the basic information of the packaging service of the first installation package to the packaging service module 13. Optionally, the basic service module 12 can obtain the basic information of the packaging service of the first installation package according to the identifier of the first installation package and the identifier of the target plug-in. Among them, the basic information of the packaging service of the first installation package includes: the basic information of the first installation package and the basic information of the target plug-in, etc., but is not limited to this. Among them, the basic information of the first installation package includes: the identifier of the first installation package, the version number, the signature information, the obfuscation relationship information, etc., but is not limited to this. Among them, the identifier of the first installation package can be information that uniquely identifies a first installation package, such as the package name of the first installation package, etc. The basic information of the target plug-in includes: the identifier of the target plug-in, the version number, the signature information, the obfuscation relationship information, etc., but is not limited to this.
[0028] In this embodiment, the packaging service module 13 may repackage the first installation package based on the packaging service basic information of the first installation package, and inject the target plug-in during the repackaging process to generate a second installation package of the application.
[0029] The installation package generation system provided in this embodiment includes: a user interface module, a basic service module and a packaging service module; wherein the user interface module displays the installation package input component and the plug-in input component, and allows the user to provide the original installation package and the target plug-in that needs to be injected; the basic service module obtains the basic packaging service information of the original installation package. The packaging service module can inject the target plug-in into the original installation package during the repackaging process of the original installation package, and generate a new installation package. The installation package generation system provided in the embodiment of the present application can provide users with autonomous packaging services. Users can provide the target plug-ins required for subsequent work according to the packaging requirements, without the need to perform logical transformation on the application, thereby achieving the decoupling of subsequent work from the application development program, which helps to improve the efficiency of subsequent work and reduce costs.
[0030] For example, a user can provide a test plug-in according to his or her own testing needs. The installation package generation system provided in this embodiment can inject the test plug-in into the first installation package of the application to generate a second installation package. In this way, during the running of the second installation package, the test plug-in can be used to test the first installation package. The application developer does not need to perform logical transformation on the application to implement the test of the first installation package, thus achieving the decoupling of the testing work from the application development work, thereby helping to improve the testing efficiency and reduce the testing cost.
[0031] On the other hand, the installation package generation system provided in this embodiment can provide users with autonomous packaging services without requiring users to have professional capabilities such as code logic transformation, thereby improving the universality and versatility of packaging and meeting the packaging needs of ordinary users.
[0032] In the embodiments of the present application, Figure 1a As shown, the user interface module 11 can display a human-computer interaction interface. Accordingly, the human-computer interaction interface includes an installation package input component and a plug-in input component. The user can trigger the installation package input component, select the storage path of the first installation package, and then provide the first installation package to the installation package generation system. Optionally, as Figure 1a As shown, the human-computer interaction interface may also include: a first installation package upload information item. Accordingly, the user may trigger the "upload" control in the first installation package upload information item, and select the first installation package of the application to be tested from the first installation packages stored locally. Accordingly, the user interface module 11 may write the storage address of the first installation package into the first installation package upload information item in response to the tester's operation of selecting the first installation package, thereby obtaining the first installation package of the application.
[0033] Further, in the embodiment of the present application, the installation package generation system may provide one or more plug-ins for the user to select. For the convenience of description and distinction, in the embodiment of the present application, the plug-in provided by the installation package generation system is defined as a basic plug-in, and the collection of basic plug-ins is defined as a basic plug-in library. Figure 1b As shown, the basic plug-in library 13a may be located in the packaging service module 13. The number of basic plug-ins may be one or more. More means two or more.
[0034] Accordingly, if Figure 1c As shown, the user interface module 11 may provide a corresponding basic plug-in selection component for the user to select a target plug-in from the basic plug-ins provided by the installation package generation system. In this embodiment, the plug-in input component may be implemented as a basic plug-in selection component. Figure 1cAs shown, the user can trigger the drop-down menu of "Select Basic Plug-in" and select a basic plug-in from the basic plug-ins displayed in the order menu. For the packaging service module 13, it can also include: a packaging processing unit 13b. Accordingly, the packaging processing unit 13b can obtain the target basic plug-in corresponding to the identifier of the target basic plug-in selected by the user from the basic plug-in library as the above-mentioned target plug-in.
[0035] Optionally, in some other embodiments, the installation package generation system may also provide users with the function of self-defining plug-ins. Figure 1d As shown, the user interface module 11 may also include: a custom plug-in input component. The user may input a custom plug-in through the custom plug-in input component. Accordingly, the packaging service module 13 may also use the custom plug-in input by the user as a target plug-in.
[0036] In some other embodiments, the installation package generation system not only provides one or more basic plug-ins for users to choose from, but also provides users with the function of self-defining plug-ins. Figure 1e As shown, the user interface module 11 includes: a basic plug-in selection component and a custom plug-in input component. Accordingly, the packaging processing unit 13b can obtain the target basic plug-in from the basic plug-in library according to the identifier of the target basic plug-in selected by the user, and use the target basic plug-in and the custom plug-in input by the user as the target plug-in.
[0037] In some embodiments, Figure 1c-Figure 1e As shown, a list of application program identifiers is displayed on the user interface module 11. Figure 1c-Figure 1e As shown, a prompt message "Please select an application" is displayed on the packaging interaction interface, and the user can trigger the drop-down menu of "Please select an application". Accordingly, the user interface module 11 displays the application program identification list ( Figure 1c-Figure 1e ). Further, the user can select the application identifier to be tested from the application identifier list. Accordingly, the user interface module 11 responds to the user's operation of selecting the application identifier from the application identifier list on the human-computer interaction interface, and uses the application identifier selected by the user as the identification information of the application to be repackaged. Optionally, the application identifier may be the name of the application, etc., but is not limited thereto. Further, the user can trigger the "Submit Package" control, and the user interface module 11 responds to the user's operation of triggering the submit package control, obtains the first installation package, and provides the first installation package to the packaging service module 13, and the packaging service module 13 repackages the first installation package.
[0038] In some embodiments, Figure 1bAs shown, the basic service module 12 includes: an application management unit 12a, a plug-in management unit 12b and a packaging task management unit 12c. Among them, the application management unit 12a is used to maintain the basic information of the application and the association relationship between the application and the plug-in configuration. Among them, the basic information of the application includes: the name of the application, the identifier of the installation package corresponding to the application, the system type applicable to the application, etc., but is not limited to this. Based on this, the basic service module 12 can obtain the basic information of the application corresponding to the first installation package and the association relationship between the application and the plug-in configuration according to the identifier of the first installation package.
[0039] In this embodiment, the plug-in management unit 12b is used to maintain the basic information and configuration parameters of the plug-in, wherein the plug-in includes: a target plug-in and an inherent plug-in of the application. The basic information and configuration parameters of the plug-in include: the name, signature, obfuscation relationship, etc. of the plug-in, but are not limited thereto. Based on this, the plug-in management unit 12b can obtain the basic information and configuration parameters of the target plug-in and the inherent plug-in of the application corresponding to the first installation package according to the identifier of the first installation package and the identifier of the target plug-in.
[0040] Furthermore, the packaging task management unit 12c may provide the packaging service basic information of the first installation package of the application to the packaging service module 13, and trigger the packaging service module 13 to repackage the first installation package of the application. The packaging service basic information of the first installation package includes: basic information of the application corresponding to the first installation package and the association relationship between the application and the plug-in configuration, as well as basic information and configuration parameters of the target plug-in and the inherent plug-in of the application corresponding to the first installation package, etc., but is not limited thereto.
[0041] Furthermore, the basic service module 12 further includes: a device management unit 12d. The device management unit 12d is used to manage a list of devices using the installation package generation system and is responsible for interacting with the devices using the installation package generation system.
[0042] Optionally, the target plug-in may include: a communication plug-in. When the device management unit 12d interacts with the device using the installation package generation system, it is specifically used to: call the terminal device to install and run the second installation package through the communication plug-in; wherein the device list includes the identifier of the terminal device. Optionally, the communication plug-in may be an RPC plug-in. In this way, the device management unit 12d can remotely call the terminal device through the RPC plug-in, and control the terminal device to install and run the second installation package through the RPC plug-in.
[0043] Furthermore, the basic service module also includes: a data management unit 12e. The data management unit 12e can receive data reported by the terminal device during the process of running the second installation package, analyze the received data, and / or provide the received data to the user interface module 11 for display by the user interface module 11. Alternatively, the data management unit 12e also provides the analysis result of the received data to the user interface module 11 for display.
[0044] Alternatively, if Figure 1b As shown, the basic service module 12 may also include a basic laboratory 12f. The basic laboratory 12f may provide some application scenarios for subsequent work using the second installation package. For example, when the first installation package is tested using the second installation package, the basic laboratory 12f may provide some test application scenarios, such as mock (virtual) test scenarios, etc.
[0045] In the embodiment of the present application, when repackaging the first installation package, the packaging service module 13 may compile the first installation package of the application to obtain the first source file of the application. Furthermore, the packaging service module 13 may also inject the source file of the target plug-in into the first source file to obtain a modified first source file, and recompile the modified first source file to obtain a second installation package of the application.
[0046] In this embodiment, the source file of the target plug-in may be a source file obtained by compiling the target plug-in; or the target plug-in itself may be provided to the user in the form of a source file.
[0047] In this embodiment, the source file of the target plug-in is injected into the first source file of the application to obtain a modified first source file, and the modified first source file is recompiled to obtain a second installation package of the application. This method of generating an installation package of an application does not require developers to modify the code logic of the application, which can improve packaging efficiency and thus help reduce packaging costs.
[0048] In other embodiments, the source files of the first installation package of the application and the source files of the target plug-in include not only the corresponding code files, but also some resource files, such as images, Lib libraries, etc. involved in the application and the plug-in, but not limited to this. That is, the first source file of the application includes source code and resource files; the source file of the plug-in also includes the original code and resource files of the plug-in. Based on this, when the packaging service module 13 recompiles the modified first source file, the original code in the source file of the target plug-in can be injected into the source code in the first source file; and the resource files in the source file of the target plug-in can be injected into the resource files in the compiled source file. Among them, the source code in the first source file can be original code, assembly code or virtual machine bytecode, but not limited to this.
[0049] Furthermore, the original code file in the source file of the target plug-in not only includes the application code required for the plug-in to implement its functions, but also includes the startup code for starting its functions for some plug-ins that need to run during the startup process. Similarly, the source code of the application not only includes the application code required for implementing the functions of the application, but also includes the startup code for starting to implement the functions of the application. Based on this, when the original code in the source file of the target plug-in is injected into the source code in the first source file, the application code of the application can also be found in the source code; and the application code of the target plug-in can be injected into the application code of the application; and the startup code of the application can be found in the source code, and the startup code of the first plug-in in the target plug-in can be injected into the startup code of the application; wherein the first plug-in is the plug-in in the target plug-in that needs to run during the startup process.
[0050] Furthermore, it is considered that there may be some conflicting files between the source files of the first installation package and the source files of the target plug-in. For example, the file name of a file in the source file of the first installation package is the same as the file name of a file in the source file of the target plug-in; for another example, the version of a file in the source file of the first installation package conflicts with the version of a file in the source file of the test tool, and so on. Based on this, when the packaging service module 13 injects the original code file in the source file of the target plug-in into the code file in the first source file, the file conflict can also be eliminated. Similarly, when the packaging service module 13 injects the resource file in the source file of the target plug-in into the resource file in the first source file of the first installation package, the file conflict can also be eliminated.
[0051] Optionally, the human-computer interaction interface may further include: a signature type information item ( Figure 1c-Figure 1eBased on this, the user can choose whether to sign the second installation package of the application and which signature type to use according to the repackaging requirements. The signature type may include one or more digital signature types, such as Keystore file signature, but is not limited thereto. Furthermore, if the user chooses Keystore file signature, the user can also upload a customized Keystore file on his own.
[0052] In this embodiment, if the user chooses to sign the second installation package of the application, the packaging service module 13 recompiles the source file of the second installation package of the application to obtain the second installation package of the application, and can also re-sign the second installation package of the application using the signature type selected by the user.
[0053] It is worth noting that the installation package generation of the application provided in the embodiment of the present application can be applied to various application scenarios. Users can insert plug-ins that meet their functional requirements into the application according to their own needs. For example, in the application scenario of testing the application, the test task can inject the source file of the preset test tool into the first source file of the application to be tested according to the test requirements to obtain the modified first source file; and recompile the modified first source file to obtain the test package of the application to be tested. After that, the test package can be run, and in the process of running the test package, the first installation package of the application can be tested using the inserted test tool. In this application scenario, the target plug-in is a test tool. The following takes the target plug-in as a test tool as an example to exemplify the interaction process between the device management unit 12d and the terminal device.
[0054] In the above application scenario, the device management unit 12d can also control the terminal device to use the test tool to test the second installation package and obtain test data during the process of calling the terminal device to run the second installation package. Afterwards, the test data can be provided to the data management unit 12e, and the data management unit 12e analyzes it so that the tester can understand the performance of the first installation package. Further, the tester can feed back the measured performance of the first installation package to the developer so that the developer can optimize the first installation package, etc., but not limited to this.
[0055] In this embodiment, the test tool can be implanted in the process of repackaging the first installation package to form the second installation package. In this way, the test terminal can use the test tool to test the first installation package and obtain test data during the process of running the second installation package. This application testing method does not require developers to modify the code logic of the application to be tested, which can improve testing efficiency and thus help reduce testing costs.
[0056] In an embodiment of the present application, the test tool may include at least one test plug-in. Accordingly, the device management unit 12d may control the terminal device to use at least one test plug-in to test the first installation package of the application to be tested. Among them, the tester may implant test plug-ins of various test functions according to the test requirements. Further, due to the startup type and function type of the test plug-in implanted by the tester, the process of the device management unit 12d controlling the terminal device to use the test plug-in to test the first installation package is different. The following is an exemplary description of it in combination with several optional embodiments.
[0057] Optional embodiment 1: At least one test plug-in includes a test plug-in with a startup type of external startup. For externally started test plug-ins, if such test plug-ins are not dynamically enabled, such test plug-ins cannot execute their test logic. Based on this, in an embodiment of the present application, for externally started test plug-ins, the tester can send a test instruction to the terminal device through the installation package generation system, and the test instruction includes: a plug-in identifier and an object identifier. Among them, the plug-in identifier is used to identify one or more test plug-ins in at least one test plug-in; the object identifier is used to identify the object to be tested in the first installation package of the application.
[0058] In the above optional embodiment 1, the target plug-in also includes: a communication plug-in. Among them, the communication plug-in provides a sandbox environment for the application to be tested to interact directly with the outside of the application, which helps to improve the convenience of testing. Optionally, the communication plug-in can be an RPC plug-in. Based on this, the device management unit 12d can send a test instruction to the terminal device, and control the terminal device through the communication plug-in to determine the target test plug-in from at least one test plug-in according to the plug-in identifier in the test instruction, so as to realize the dynamic startup of the target test plug-in. Afterwards, the device management unit 12d can test the object to be tested in the first installation package corresponding to the object identifier in the test instruction according to the test logic of the target test plug-in. Optionally, the device management unit 12d can send a test instruction to the terminal device through a web page or an automated client.
[0059] Further, in optional embodiment 1, depending on the functional type of the target test plug-in, its demand for auxiliary plug-ins is also different. In some embodiments, the tester wants to test the power consumption of the first installation package of the application to be tested during a certain period of time, or wants to test the memory resources consumed by the application to be tested during operation, etc. For these test requirements that do not require testing the code logic of the first installation package, the tester can implant the target test plug-in into the first installation package during the repackaging process. In this case, the target test plug-in does not need to test the code logic of the first installation package. Based on this, the device management unit 12d can control the terminal device to directly test the object to be tested of the first installation package according to the test logic of the target test plug-in. Among them, the object to be tested can be the power consumption of the first installation package of the application to be tested during a certain period of time, or want to test the memory resources consumed by the application to be tested during operation, etc., but is not limited to this.
[0060] In other embodiments, the tester wants to test the code logic of the first installation package of the application to be tested. Based on this, in the process of repackaging the first installation package, the implanted test tool also includes: a hook plug-in. Among them, the hook plug-in can monitor and intercept the running behavior of its object, and can also modify the code corresponding to the object. Based on this, in the case where the code logic of the first installation package needs to be tested, the device management unit 12d can control the terminal device to call the hook plug-in through the communication plug-in to obtain the running status data of the object to be tested, and provide the running status data to the target test plug-in, and then run the target test plug-in to test the code logic corresponding to the object to be tested based on the running status data. That is, the running status data is input into the target test plug-in as the entry parameter of the target test plug-in, and the code logic corresponding to the object to be tested is tested during the running of the target test plug-in.
[0061] Alternatively, if Figure 1f As shown, the user can control the operation of the second installation package of the terminal device through the web page or the automation client on the user interface module 11. Optionally, the tester enters the control instruction on the web page or the automation client on the user interface module 11, and accordingly, the device management unit 12d sends the control instruction to the terminal device. The control instruction includes the target test plug-in to be used. Optionally, in the case where the code logic of the original APP needs to be tested, such as Figure 1fAs shown, the device management unit 12d can make an RPC call to the test tool in the second installation package, and control the terminal device to receive the control instruction through the RPC plug-in. Further, the device management unit 12d can control the terminal device to dynamically start the target test plug-in based on the control instruction. Further, the RPC plug-in controls the hook plug-in to monitor or modify the behavior of the internal application programming interface (Application Programming Interface, API) of the original APP, obtain the running status data of the API, and input the running status data of the API into the target test plug-in as the entry parameter of the target test plug-in, so that the target test plug-in can test the API and obtain the test data. Among them, the RPC plug-in and the hook plug-in provide a sandbox environment for the testing of the first installation package, which helps to realize ecological testing.
[0062] Optional embodiment 2: At least one test plug-in includes a test plug-in with a startup type of self-start. For ease of description and distinction, in optional embodiment 2, the self-start test plug-in is defined as a target test plug-in. The number of target test plug-ins may be one or more. Further, for the test object of the first installation package corresponding to the target test plug-in, the test object may bind the target test plug-in to the object to be tested in the first installation package when the target test plug-in is implanted; or, the tester may specify the test by sending a test instruction to the terminal device through the device management unit 12d, wherein the test instruction includes an object identifier, which may identify the object to be tested in the first installation package.
[0063] When the target test plug-in is bound to the object to be tested in the first installation package, during the process of running the second installation package of the application to be tested, the device management unit 12d can control the terminal device through the communication plug-in to use the target test plug-in to test the object to be tested bound to the target test plug-in in the first installation package.
[0064] In the case where the device management unit 12d sends a test instruction to the terminal device to specify the object to be tested of the first installation package, the test tool implanted by the device management unit 12d also includes a communication plug-in during the process of repackaging the first installation package of the application to be tested. Optionally, the communication plug-in can be an RPC plug-in. Accordingly, the device management unit 12d sends a test instruction to the terminal device, and the test instruction includes an object identifier. Accordingly, the device management unit 12d can control the terminal device through the communication plug-in to test the object to be tested in the first installation package corresponding to the object identifier in the test instruction according to the test logic of the target test plug-in.
[0065] Further, in optional embodiment 2, the requirements for auxiliary plug-ins are different depending on the functional type of the target test plug-in. For the test requirements listed in the above optional embodiment 1 that do not require testing the code logic of the first installation package, the tester can implant the target test plug-in into the first installation package during the repackaging process. In this case, the target test plug-in does not need to test the code logic of the first installation package. Based on this, the device management unit 12d can control the terminal device through the communication plug-in to directly use the target test plug-in to test the object to be tested of the first installation package. Among them, the object to be tested can be the power consumption of the first installation package of the application to be tested during a certain period of time, or the memory resources consumed by the application to be tested during operation, etc., but it is not limited to this. Among them, regarding the implementation method for determining the object to be tested, please refer to the above content in optional embodiment 1, which will not be repeated here.
[0066] In other embodiments, the tester wants to test the code logic of the first installation package of the application to be tested. Based on this, in the process of repackaging the first installation package of the application to be tested, the packaging service module 13 also implants a test tool: a hook plug-in. Based on this, in the case where the code logic of the first installation package needs to be tested, the device management unit 12d can control the terminal device through the communication plug-in to call the hook plug-in to obtain the running status data of the object to be tested, and provide the running status data to the target test plug-in, and then run the target test plug-in to test the code logic corresponding to the object to be tested based on the running status data. That is, the running status data is input into the target test plug-in as the entry parameter of the target test plug-in, and the code logic corresponding to the object to be tested is tested during the running of the target test plug-in.
[0067] In the embodiment of the present application, regardless of whether the startup type of the test plug-in is self-start or external startup, it can perform various in-depth tests and analyses on the first installation package of the application to be tested. For example, the test plug-in can be used to test the internal interface of the first installation package, modify the content status of the first installation package, perform link tracking on the code logic of the first installation package, or perform mock (virtual) testing, etc., but it is not limited to this. In the following, in combination with several common test requirements, the process of the device management unit 12d controlling the terminal device to call the hook plug-in to obtain the running status data of the object to be tested is exemplified.
[0068] Test requirement 1: The tester wants to test the test data of an object in the first installation package in a certain state. For example, for video applications, the tester wants to test the running data when the player is in a paused state; or test the download speed when the player is in a playing state; for another example, for online shopping applications, the tester wants to test the running data of the shopping cart after adding the shopping cart. Under this test requirement, the target test plug-in can be an internal state test plug-in. Then the device management unit 12d can control the terminal device through the communication plug-in to adjust the internal state of the object to be tested to the target state, wherein the target state is the internal state that the object to be tested is required to maintain during the test process; and call the hook plug-in to obtain the running state data of the object to be tested in the target state. Accordingly, the device management unit 12d can control the terminal device through the communication plug-in to provide the running state data to the data management unit 12e. Accordingly, the data management unit 12e can use the running state data as the entry parameter of the internal state test plug-in, and run the internal state test plug-in, thereby obtaining the test data of the object to be tested in the target state.
[0069] Optionally, in some embodiments, the hook plug-in includes an internal state modification instruction. The internal state modification instruction includes a target state. In this case, the device management unit 12d can control the Chinese team device to call the hook plug-in through the communication plug-in to modify the internal state of the object to be tested to the target state.
[0070] In some other embodiments, the hook plug-in does not include an internal state modification instruction. In this case, the tester can send an external state modification instruction to the terminal device through the device management unit 12d. The external state modification instruction contains a target state. Accordingly, the device management unit 12d can control the terminal device through the communication plug-in to modify the internal state of the object to be tested to the target state according to the external state modification instruction. Under this embodiment, when the packaging service module 13 repackages the first installation package of the application to be tested, the implanted test tool also includes a communication plug-in. Optionally, the communication plug-in can be an RPC plug-in. Accordingly, the terminal device can receive the external state modification instruction through the communication plug-in.
[0071] Test requirement 2: The tester wants to test whether the method logic in the first installation package of the application to be tested is feasible, or wants to test the method performance in the first installation package of the application to be tested, such as the running rate of the method logic, etc. For example, for video applications, the tester wants to test the method of changing the playback state of the player to the pause state. For another example, for online shopping applications, the tester wants to test the method of adding a shopping cart. Under this test requirement, the target test plug-in includes a method test plug-in, and the test instruction also includes a method identifier. Accordingly, the device management unit 12d can control the terminal device through the communication plug-in to determine the method to be tested bound to the object to be tested according to the method identifier in the test instruction, and simulate the trigger operation bound to the method to be tested on the object to be tested to run the method to be tested; thereafter, the device management unit 12d can control the terminal device through the communication plug-in to use the hook plug-in to obtain the running status data generated by the object to be tested during the running of the method to be tested, and provide the running status data to the method test plug-in for the method test plug-in to test whether the method to be tested is feasible and / or the running performance of the method to be tested, etc., but is not limited to this.
[0072] Test requirement 3: The tester wants to perform link tracking on the call relationship in the first installation package to implement link troubleshooting, performance optimization, etc. of the first installation package. Under this application requirement, the target test plug-in may include a path tracking plug-in. Accordingly, the device management unit 12d can control the terminal device to call the hook plug-in through the communication plug-in to obtain the operating status data generated by the object to be tested during the call process with its context object. Among them, the context object of the object to be tested includes: an object that has a direct calling relationship with the object to be tested and an object that has an indirect calling relationship with the object to be tested. For example, assuming that the object to be tested is module A, module A calls dependency B, and dependency B calls dependency C, then the context objects of module A can be dependency A and dependency C.
[0073] Accordingly, the device management unit 12d can also control the terminal device through the communication plug-in to provide the running state data generated by the object under test during the call process with its context object to the data management unit 12e. Accordingly, the data management unit 12e can use the running state parameter as the entry parameter of the path tracking plug-in, and run the path tracking plug-in to track and analyze the link between the object under test and its context object.
[0074] Test requirement 4: In some application scenarios, testers want to test some objects that are difficult to construct or are relatively complex in the application to be tested. For example, testers want to test the operation status of the entire application when a page of the application to be tested is in a crashed state during operation; for another example, in online payment applications, there are many third-party interfaces that are used for payment and transfer, etc. When the test environment provided by the third party is unstable, the performance of the online payment application will be affected. In this application scenario, testers can also simulate the instability of the third-party interface; and so on.
[0075] Under the above test requirements, the target test plug-in also includes: a virtual test plug-in. In this embodiment, the device management unit 12d can control the terminal device to use the virtual test plug-in to generate the virtual environment required for the mock test through the communication plug-in, and control the object to be tested to run in the virtual environment; then, the hook plug-in is used to obtain the running status data of the object to be tested in the virtual environment. Optionally, the device management unit 12d can control the terminal device to provide the running status data to the virtual test plug-in through the communication plug-in, so that the virtual test plug-in can perform virtual testing on the object to be tested based on these running status data.
[0076] It is worth noting that in this embodiment, the application program can be an APP or a client. The implementation form of the application program is different, and the implementation form of the terminal device is also different. If the application program is an APP, the terminal device can be a smart phone, a wearable device, etc.; if the application program to be tested is suitable for a client, the terminal device can be a desktop computer, a laptop computer, etc., but is not limited thereto.
[0077] The installation package generation system provided in the embodiment of the present application can be deployed on one or more computer devices. Among them, the computer device has certain data processing capabilities and communication capabilities, which can be a single server device, a cloud server array, or a virtual machine (VM) running in a cloud server array. In addition, the server-side device can also refer to other computing devices with corresponding service capabilities, such as computers and other terminal devices (running service programs), such as testers' computers, etc.
[0078] In addition to the above-mentioned installation package generation system, the present application embodiment also provides an application testing system. Figure 2a As shown, the system includes: a test terminal 20a and a server device 20b. Figure 2a The implementation forms of the test terminal 20a and the server device 20b shown are only exemplary and not limiting.
[0079] In this embodiment, the test terminal 20a refers to a computer device used by a tester that can install and run the first installation package and the second installation package of the application to be tested, such as a smart phone, a tablet computer, a personal computer, a wearable device, etc. Among them, the first installation package of the application to be tested is an installation package developed by the developer for ordinary users, generally the first installation package of the application to be tested. In the application testing scenario, the second installation package of the application to be tested, which can also be called a test package, can be an installation package formed by the tester implanting the corresponding test tool into the first installation package according to his own test requirements.
[0080] In this embodiment, the test terminal 20a generally includes at least one processing unit and at least one memory. The number of processing units and memories depends on the configuration and type of the test terminal 20a. The memory may include volatile, such as RAM, or non-volatile, such as read-only memory (ROM), flash memory, etc., or may include both types at the same time. The memory generally stores an operating system (OS), one or more application software, such as instant messaging software corresponding to the server device 20b, and may also store program data, etc. In addition to the processing unit and memory, the test terminal 20a also includes basic configurations such as a network card chip, an IO bus, and audio and video components. Optionally, according to the implementation form of the test terminal 20a, the test terminal 20a may also include some peripheral devices, such as a keyboard, a mouse, an input pen, a printer, etc. These peripheral devices are well known in the art and will not be described in detail here.
[0081] In this embodiment, the server device 20b refers to a computer device with certain data processing capabilities and communication capabilities. The server device 20b can be a single server device, a cloud server array, or a virtual machine (VM) running in a cloud server array. In addition, the server device can also refer to other computing devices with corresponding service capabilities, such as computers and other terminal devices (running service programs), such as testers' computers, etc.
[0082] In this embodiment, the test terminal 20a and the server device 20b may be connected wirelessly or by wire. Optionally, the server device test terminal 20a may be connected to the server device 20b through a mobile network. Accordingly, the network standard of the mobile network may be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), 5G, WiMax, etc. Optionally, the test terminal 20a may also be connected to the server device 20b through Bluetooth, WiFi, infrared, etc.
[0083] In this embodiment, the server device 20b stores a second installation package of the application to be tested. Based on this, the server device 20b can obtain the second installation package of the application to be tested from its memory and send the second installation package to the test terminal 20a. The second installation package of the application to be tested is obtained by repackaging the first installation package of the application to be tested, and the second installation package includes the test tool implanted in the repackaging process.
[0084] Optionally, the server device 20b stores second installation packages of multiple applications, including the second installation package of the application to be tested provided in this embodiment. Multiple refers to 2 or more. Further, the server device 20b may store a list of second installation packages of applications. The tester may select the second installation package to be tested from the list of second installation packages corresponding to the application according to the current test requirements. For example, Figure 2b As shown, in this embodiment, the server device 20b can provide a test interaction interface. Optionally, the test interaction interface includes an application selection information item. For example, Figure 2b The prompt message "Please select an application" is shown, and the tester can trigger the order menu of the application selection information item to view the application identification list provided by the server device 20b, such as Figure 2b The tester can then select the application to be tested from the list of application IDs. Figure 2b As shown, the tester selects application B as the application to be tested. Accordingly, in response to the tester selecting the application identifier from the application identifier list, the server device 20b obtains the second installation package corresponding to the application identifier selected by the tester from the second installation packages of the locally stored applications as the second installation package of the application to be tested, and sends the second installation package to the test terminal 20a. For example, Figure 2bAs shown, the server device 20b obtains the second installation package of application B from the second installation packages of the locally stored applications as the second installation package of the application to be tested, and sends the second installation package of application B to the test terminal 20a. Optionally, the application identifier may be the name of the application, a functional description, etc., but is not limited thereto.
[0085] Correspondingly, the test terminal 20a receives the second installation package of the application to be tested sent by the server device 20b, and runs the second installation package. Furthermore, since the second installation package is embedded with a test tool, the test terminal 20a can use the test tool to test the first installation package of the application to be tested during the process of running the second installation package of the application to be tested, thereby obtaining test data.
[0086] Optionally, the test terminal 20a may send the obtained test data to the server device 20b. Accordingly, the server device 20b receives the test data and analyzes the performance of the first installation package based on the test data, so that the tester can understand the performance of the first installation package of the application to be tested. Further, the tester can feed back the measured performance of the first installation package to the developer, so that the developer can optimize the first installation package of the application to be tested, etc., but not limited to this.
[0087] In this embodiment, the server device implants the test tool in the process of repackaging the first installation package of the application to be tested, thereby forming the second installation package of the application to be tested. In this way, the test terminal can use the test tool to test the first installation package and obtain test data during the process of running the second installation package of the application to be tested. This application testing method does not require developers to modify the code logic of the application to be tested, which can improve testing efficiency and thus help reduce testing costs.
[0088] In this embodiment, the server device 20b can repackage the first installation package of the application to be tested, and implant the test tool in the repackaging process. The specific implementation method of the server device 20b repackaging the first installation package of the application to be tested can refer to the relevant content of the above embodiment, which will not be repeated here.
[0089] Correspondingly, the test terminal 20a receives the second installation package of the application to be tested and installs the second installation package. The test terminal 20a may install the second installation package by operating the test terminal 20a, or by controlling the test terminal 20a to install the second installation package of the application to be tested by performing a remote procedure call (RPC) on the test terminal 20a through the server device 20b.
[0090] Furthermore, the test terminal 20a runs the second installation package of the application to be tested, and can use the test tool therein to test the first installation package of the application to be tested during the running of the second installation package of the application to be tested. Optionally, the server device 20b can send a running instruction to the test terminal 20a through the RPC plug-in to enable the test terminal 20a to run the second installation package of the application to be tested. Among them, the specific implementation method of the server device 20b controlling the test terminal 20a to test the first installation package during the running of the second installation package can be referred to the relevant content of the above embodiment, which will not be repeated here.
[0091] In addition to the above-mentioned application testing system embodiment, the embodiment of the present application also provides an application testing method, which is exemplarily described below from the perspectives of the test terminal and the server device respectively.
[0092] Figure 3 The flowchart of an application testing method provided in the embodiment of the present application is shown in FIG. The method is applicable to a test terminal. Figure 3 As shown, the method includes:
[0093] 301. Run a second installation package of the application to be tested; the second installation package is obtained by repackaging the first installation package of the application to be tested, and the second installation package includes a test tool implanted during the repackaging process.
[0094] 302. During the running of the second installation package, use a test tool to test the first installation package to obtain test data.
[0095] In this embodiment, the test terminal can be a smart phone, a tablet computer, a personal computer, a wearable device, etc. Among them, the first installation package of the application to be tested is an installation package developed by the developer for ordinary users, and the second installation package of the application to be tested is an installation package formed after the tester implants the corresponding test tool into the first installation package according to his own test requirements.
[0096] In this embodiment, the application to be tested may be an APP or a client. The implementation form of the application to be tested is different, and the implementation form of the test terminal is also different. If the application to be tested is an APP suitable for a smartphone or a wearable device, the test terminal may be a smartphone, a wearable device, etc.; if the application to be tested is a client suitable for a desktop computer, a notebook, etc., the test terminal may be a desktop computer, a notebook computer, etc., but is not limited thereto.
[0097] In this embodiment, the test terminal is installed with a second installation package of the application to be tested. The test terminal can run the second installation package and use the test tool in the second installation package to test the first installation package of the application to be tested during the running of the second installation package, thereby obtaining test data.
[0098] Optionally, the test terminal may send the obtained test data to the server device. Accordingly, the server device receives the test data and analyzes the performance of the first installation package based on the test data, so that the tester can understand the performance of the first installation package of the application to be tested. Further, the tester may feed back the measured performance of the first installation package to the developer, so that the developer can optimize the first installation package of the application to be tested, etc., but not limited to this.
[0099] In this embodiment, the server device may be a single server device, a cloud server array, or a virtual machine (VM) running in a cloud server array. In addition, the server device may also refer to other computing devices with corresponding service capabilities, such as computers and other terminal devices (running service programs), such as testers' computers, etc.
[0100] Based on this, for the case where the application to be tested is a client adapted to a computer, workstation, etc., the test terminal can also be a computer used by the tester. In this case, the test terminal can analyze the performance of the first installation package based on the test data so that the tester can understand the performance of the first installation package of the application to be tested. Further, the tester can feedback the measured performance of the first installation package to the developer so that the developer can optimize the first installation package of the application to be tested, etc., but not limited to this. In this embodiment, optionally, the test terminal stores a plurality of second installation packages of applications, including the second installation package of the application to be tested provided in this embodiment. Among them, multiple refers to 2 or more. Further, the test terminal can store a list of second installation packages of applications. The tester can select the second installation package to be tested from the list of second installation packages corresponding to the application according to the current test requirements. Accordingly, in response to the tester's operation of selecting the application identifier from the application identifier list, the test terminal obtains the second installation package corresponding to the application identifier selected by the tester from the second installation package of the locally stored application as the second installation package of the application to be tested. Optionally, the application identifier can be the name of the application, the function description, etc., but not limited to this.
[0101] In this embodiment, the test tool is implanted in the process of repackaging the first installation package of the application to be tested to form the second installation package of the application to be tested. In this way, the test terminal can use the test tool to test the first installation package and obtain test data during the process of running the second installation package of the application to be tested. This application testing method does not require developers to modify the code logic of the application to be tested, which can improve testing efficiency and thus help reduce testing costs.
[0102] In one embodiment, if the second installation package of the application to be tested is formed by the server device repackaging the first installation package of the application to be tested, the server device sends the second installation package of the application to be tested to the test terminal before step 301. Correspondingly, the test terminal receives the second installation package and installs the second installation package.
[0103] In another embodiment, if the second installation package of the application to be tested is formed by the test terminal repackaging the first installation package of the application to be tested, the test terminal may further repack the first installation package of the application to be tested before step 301. For the specific implementation, please refer to the relevant content of the above embodiment, which will not be repeated here.
[0104] Furthermore, the test terminal may install a second installation package of the application to be tested. The test terminal may install the second installation package by the tester operating the test terminal. Alternatively, based on the above application test system architecture, the tester may control the test terminal to install the second installation package of the application to be tested by performing a remote procedure call (RPC) on the test terminal through the server device.
[0105] Furthermore, when the test terminal runs the second installation package of the application to be tested, the test tool therein can be used to test the first installation package of the application to be tested during the running process of the second installation package of the application to be tested. Optionally, the server device can send a running instruction to the test terminal through an RPC plug-in to enable the test terminal to run the second installation package of the application to be tested. Among them, the specific implementation method of using the test tool to test the first installation package of the application to be tested can be referred to the relevant content of the above embodiment, which will not be repeated here.
[0106] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned test terminal executing the application program testing method.
[0107] based on Figure 2aThe system architecture shown in the figure, the embodiment of the present application also provides an application testing method, which is applicable to the server device. Figure 4 This method is exemplified. Figure 4 As shown, the method includes:
[0108] 401. Obtain a second installation package of the application to be tested; the second installation package is obtained by repackaging the first installation package of the application to be tested, and the second installation package includes a test tool implanted during the repackaging process.
[0109] 402. Send the second installation package to the test terminal, so that the test terminal can test the first installation package using a test tool during the process of running the second installation package.
[0110] In this embodiment, the server device stores a second installation package of the application to be tested. Based on this, the server device can obtain the second installation package of the application to be tested and send the second installation package to the test terminal. The second installation package of the application to be tested is obtained by repackaging the first installation package of the application to be tested, and the second installation package includes a test tool implanted in the repackaging process.
[0111] Optionally, the server-side device stores second installation packages of multiple applications, including the second installation package of the application to be tested provided in this embodiment. Here, multiple refers to 2 or more. Further, the server-side device may store a list of second installation packages of applications. The tester may select the second installation package to be tested from the list of second installation packages corresponding to the application according to the current test requirements. Accordingly, in response to the tester's operation of selecting an application identifier from the list of application identifiers, the server-side device obtains the second installation package corresponding to the application identifier selected by the tester from the second installation packages of the locally stored application as the second installation package of the application to be tested, and sends the second installation package to the test terminal.
[0112] Correspondingly, the test terminal receives the second installation package of the application to be tested sent by the server device, and runs the second installation package. Furthermore, since the second installation package is embedded with a test tool, the test terminal can use the test tool to test the first installation package of the application to be tested during the process of running the second installation package of the application to be tested, thereby obtaining test data.
[0113] Optionally, the test terminal may send the obtained test data to the server device. Accordingly, the server device receives the test data and analyzes the performance of the first installation package based on the test data, so that the tester can understand the performance of the first installation package of the application to be tested. Further, the tester may feed back the measured performance of the first installation package to the developer, so that the developer can optimize the first installation package of the application to be tested, etc., but not limited to this.
[0114] In this embodiment, the server device implants the test tool in the process of repackaging the first installation package of the application to be tested, thereby forming the second installation package of the application to be tested. In this way, the test terminal can use the test tool to test the first installation package and obtain test data during the process of running the second installation package of the application to be tested. This application testing method does not require developers to modify the code logic of the application to be tested, which can improve testing efficiency and thus help reduce testing costs.
[0115] In this embodiment, the server device may repackage the first installation package of the application to be tested, and embed the test tool in the repackaging process. Figure 1c As shown, when the server-side device repackages the first installation package of the application to be tested, the first installation package of the application to be tested and the test tool can be compiled separately to obtain the source file of the first installation package and the source file of the test tool. Further, the server-side device can inject the source file of the test tool into the source file of the first installation package to obtain the source file of the second installation package of the application to be tested; further, the server-side device recompiles the source file of the second installation package of the application to be tested to obtain the second installation package of the application to be tested. Among them, the specific implementation method of the server-side device repackaging the first installation package of the application to be tested can be found in the relevant content of the above-mentioned system embodiment, which will not be repeated here.
[0116] In other embodiments, before the test terminal runs the second installation package, the server device may also send a test instruction to the test terminal in response to the tester submitting the test instruction, and the test instruction includes an object identifier and a plug-in identifier, so that the test terminal can test the first installation package according to the test instruction.
[0117] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned server-side device executing application program testing method.
[0118] In addition to providing an application testing method, the embodiments of the present application also provide a method for testing any executable file, wherein the executable file may be an executable file corresponding to a web page, a mini-program, etc., but is not limited thereto. The following is an exemplary description of the executable file testing method provided in the embodiments of the present application from the perspectives of the test terminal and the server device.
[0119] Figure 5a The flowchart of an executable file testing method provided in the embodiment of the present application is shown in FIG. The method is applicable to a test terminal. Figure 5a As shown, the method includes:
[0120] 501. Run a target executable file corresponding to the original executable file; the target executable file is a file obtained by embedding a test tool into the original executable file.
[0121] 502. During the running of the target executable file, the original executable file is tested using a testing tool.
[0122] In this embodiment, the test terminal can be a smart phone, a tablet computer, a personal computer, a wearable device, etc. Among them, the original executable file is an installation package developed by developers for ordinary users, and the target executable file is an executable file formed by the tester after the corresponding test tool is implanted into the original executable file according to his own test requirements.
[0123] In this embodiment, the application to be tested may be a web page or a small program. The implementation form of the application to be tested is different, and the implementation form of the test terminal is also different. If the application to be tested is a small program or a web page suitable for a smartphone or a wearable device, the test terminal may be a smartphone, a wearable device, etc.; if the application to be tested is a web page suitable for a desktop computer, a notebook, etc., the test terminal may be a desktop computer, a notebook computer, etc., but is not limited thereto.
[0124] In this embodiment, the test terminal stores a target executable file. The test terminal can run the target executable file, and in the process of running the target executable file, use the test tool in the target executable file to test the original executable file, thereby obtaining test data. Among them, regarding the implementation form of the test tool and the specific implementation method of using the test tool to test the original executable file, both can refer to the above-mentioned related content of using the test tool to test the first installation package of the application to be tested, which will not be repeated here.
[0125] Optionally, the test terminal may send the obtained test data to the server device. Accordingly, the server device receives the test data and analyzes the performance of the original executable file based on the test data, so that the tester can understand the performance of the original executable file of the application to be tested. Further, the tester can feed back the measured performance of the original executable file to the developer, so that the developer can optimize the original executable file, etc., but not limited to this.
[0126] In this embodiment, the server device may be a single server device, a cloud server array, or a virtual machine (VM) running in a cloud server array. In addition, the server device may also refer to other computing devices with corresponding service capabilities, such as computers and other terminal devices (running service programs), such as testers' computers, etc.
[0127] Based on this, in the case where the executable file is a client adapted to a computer, workstation, etc., the test terminal may also be a computer used by the tester. In this case, the test terminal may analyze the performance of the original executable file based on the test data so that the tester can understand the performance of the original executable file. Further, the tester may feed back the measured performance of the original executable file to the developer so that the developer can optimize the first installation package of the original executable file, etc., but not limited to this.
[0128] In this embodiment, the test tool is embedded in the original executable file to form a target executable file. In this way, the test terminal can use the test tool to test the original executable file during the process of running the target executable file to obtain test data. This executable file testing method does not require developers to modify the code logic of the executable file, which can improve test efficiency and thus help reduce test costs.
[0129] In one embodiment, if the target executable file is formed by the server device repackaging the first installation package of the application to be tested, the server device sends the target executable file to the test terminal before step 501. Accordingly, the test terminal receives the target executable file and runs the target executable file.
[0130] In another embodiment, if the target executable file is formed by the test terminal repackaging the original executable file, the test terminal may further repack the original executable file before step 501. The main steps of the test terminal repackaging the original executable file are as follows:
[0131] S1: Compile the original executable file and the test tool respectively to obtain the source file of the original executable file and the source file of the test tool.
[0132] S2: Inject the source file of the test tool into the source file of the original executable file to obtain the source file of the target executable file.
[0133] S3: Recompile the source file of the target executable file to obtain the target executable file.
[0134] The specific implementation methods of steps S1-S3 in this embodiment can all refer to the above-mentioned content related to repackaging the first installation package of the application to be tested, which will not be repeated here.
[0135] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned test terminal executing executable file test method.
[0136] Figure 5b A flowchart of another method for testing an executable file provided in an embodiment of the present application. The method is applicable to a server device. Figure 5b As shown, the method includes:
[0137] S501. Obtain a target executable file corresponding to an original executable file; the target executable file is a file obtained by embedding a test tool into the original executable file.
[0138] S502: Send the target executable file to the test terminal, so that the test terminal can use a test tool to test the original executable file during the process of running the target executable file.
[0139] In this embodiment, the server device stores a target executable file. Based on this, the server device can obtain the target executable file and send the target executable file to the test terminal. The target executable file is a file formed after the test tool is implanted into the original executable file.
[0140] Optionally, the server device stores a plurality of executable files, including the target executable file provided in this embodiment. Among them, a plurality refers to 2 or more. Further, the server device may store a list of executable file identifiers. The tester may select an executable file to be tested from the list of executable file identifiers according to the current test requirements. Accordingly, the server device responds to the tester's operation of selecting an executable file identifier from the list of executable file identifiers, and obtains the executable file corresponding to the executable file identifier selected by the tester from the locally stored executable files as the target executable file.
[0141] Accordingly, the test terminal receives the target executable file sent by the server device and runs the target executable file. Furthermore, since the target executable file is embedded with a test tool, the test terminal can use the test tool to test the original executable file during the process of running the target executable file, thereby obtaining test data.
[0142] Optionally, the test terminal may send the obtained test data to the server device. Accordingly, the server device receives the test data and analyzes the performance of the original executable file based on the test data, so that the tester can understand the performance of the original executable file. Further, the tester can feed back the measured performance of the original executable file to the developer, so that the developer can optimize the original executable file, etc., but not limited to this.
[0143] In this embodiment, the server device embeds the test tool in the original executable file to form a target executable file. In this way, the test terminal can use the test tool to test the original executable file during the process of the target executable file to obtain test data. This testing method does not require developers to modify the code logic of the target executable file, which can improve test efficiency and thus help reduce test costs.
[0144] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned server-side device execution executable file testing method.
[0145] Figure 6 The following is a flow chart of a method for generating an installation package of an application provided in an embodiment of the present application. Figure 6 As shown, the method includes:
[0146] 601. Compile a first installation package of an application to obtain a first source file of the application.
[0147] 602. Inject the source file of the target plug-in into the first source file to obtain a modified first source file.
[0148] 603. Recompile the modified first source file to obtain a second installation package of the application.
[0149] In this embodiment, the source file of the target plug-in may be a first source file obtained by compiling the target plug-in; or the target plug-in itself may be provided to the user in the form of a source file.
[0150] In this embodiment, the source file of the target plug-in is injected into the first source file of the application to obtain a modified first source file, and the modified first source file is recompiled to obtain a second installation package of the application. This method of generating an installation package of an application does not require developers to modify the code logic of the application, which can improve packaging efficiency and thus help reduce packaging costs.
[0151] In some embodiments, the source files of the first installation package of the application and the source files of the target plug-in include not only the corresponding code files, but also some resource files, such as pictures, Lib libraries, etc. involved in the application and the plug-in, but not limited to this. That is, the first source file of the application includes source code and resource files; the source file of the plug-in also includes the original code and resource files of the plug-in. Based on this, another optional implementation of step 603 is: inject the original code in the source file of the target plug-in into the source code in the first source file; and inject the resource files in the source file of the target plug-in into the resource files in the compiled source file. Among them, the source code in the first source file can be original code, assembly code or virtual machine bytecode, but not limited to this.
[0152] Furthermore, the original code file in the source file of the target plug-in not only includes the application code required for the plug-in to implement its functions, but also includes the startup code for starting its functions for some plug-ins that need to run during the startup process. Similarly, the source code of the application not only includes the application code required for implementing the functions of the application, but also includes the startup code for starting to implement the functions of the application. Based on this, when the original code in the source file of the target plug-in is injected into the source code in the first source file, the application code of the application can also be found in the source code; and the application code of the target plug-in can be injected into the application code of the application; and the startup code of the application can be found in the source code, and the startup code of the first plug-in in the target plug-in can be injected into the startup code of the application; wherein the first plug-in is the plug-in in the target plug-in that needs to run during the startup process.
[0153] It is worth noting that the installation package generation of the application provided in the embodiment of the present application can be applied to various application scenarios. Users can insert plug-ins that meet their functional requirements into the application according to their own needs. For example, in an application scenario where an application is tested, the test task can inject the source file of a preset test tool into the first source file of the application to be tested according to the test requirements to obtain a modified first source file; and recompile the modified first source file to obtain a test package of the application to be tested. After that, the test package can be run, and in the process of running the test package, the first installation package of the application can be tested using the inserted test tool. The specific test process can refer to the relevant content of the above embodiment, which will not be repeated here.
[0154] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 401 and 402 can be device A; for another example, the execution subject of step 401 can be device A, and the execution subject of step 402 can be device B; and so on.
[0155] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel, and the sequence numbers of the operations, such as 401, 402, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.
[0156] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 7 As shown, the device includes: a memory 70a and a processor 70b.
[0157] The following describes the workflow of the above-mentioned computer device in combination with different embodiments of the device.
[0158] First, when the computer device is a terminal device, the memory 70a is used to store a second installation package of the application to be tested and a computer program; the second installation package is obtained by repackaging the first installation package of the application to be tested, and the second installation package includes a test tool implanted during the repackaging process.
[0159] The processor 70b is coupled to the memory 70a, and is used to execute a computer program for: running the second installation package of the application to be tested; and in the process of running the second installation package, using a test tool to test the first installation package to obtain test data.
[0160] In one embodiment, the test tool includes: at least one test plug-in. The processor 70b uses the test tool to test the first installation package, specifically for: in the process of running the second installation package, using the at least one test plug-in to test the first installation package to obtain test data.
[0161] Further, when the processor 70b uses at least one test plug-in to test the first installation package, it is specifically used to: obtain a test instruction, which includes an object identifier and a plug-in identifier; determine a target test plug-in from at least one test plug-in based on the plug-in identifier; and test the object to be tested corresponding to the object identifier in the first installation package according to the test logic of the target test plug-in.
[0162] Optionally, if the terminal device and the server device are different physical devices, the test tool further includes: a communication plug-in; accordingly, when the processor 70b obtains the test instruction, it is specifically used to: receive the test instruction sent by the server device through the communication plug-in. Optionally, the communication plug-in is an RPC plug-in.
[0163] In some embodiments, the test tool further includes: a hook plug-in. When the processor 70b tests the object to be tested corresponding to the object identifier in the first installation package according to the test logic of the target test plug-in, it is specifically used to: when it is necessary to test the code logic of the first installation package, call the hook plug-in to obtain the running status data of the object to be tested; provide the running status data to the target test plug-in, and run the target test plug-in to test the code logic corresponding to the object to be tested.
[0164] Further, if the target test plug-in includes an internal state test plug-in, when the processor 70b calls the hook plug-in to obtain the running state data of the object to be tested, it is specifically used to: adjust the internal state of the object to be tested to the target state, the target state is the internal state that the object to be tested is required to maintain during the test process; call the hook plug-in to obtain the running state data of the object to be tested in the target state.
[0165] Among them, when the processor 70b adjusts the internal state of the object to be tested to the target state, it is specifically used to: when the hook plug-in contains an internal state modification instruction, call the hook plug-in to modify the internal state of the object to be tested to the target state; when the hook plug-in does not contain a state modification instruction, modify the internal state of the object to be tested to the target state according to the external state modification instruction; wherein the internal state modification instruction and the external state modification instruction contain the target state.
[0166] Optionally, if the target test plug-in includes a method test plug-in, when the processor 70b calls the hook plug-in to obtain the running status data of the object to be tested, it is specifically used to: determine the method to be tested bound to the object to be tested according to the method identifier in the test instruction; simulate the trigger operation bound to the method to be tested on the object to be tested to make the method to be tested run; use the hook plug-in to obtain the running status data generated by the object to be tested during the running of the method to be tested.
[0167] Optionally, if the target test plug-in includes a path tracing plug-in, when the processor 70b calls the hook plug-in to obtain the running status data of the object under test, it is specifically used to: call the hook plug-in to obtain the running status data generated by the object under test during the calling process with its context object.
[0168] Optionally, if the target test plug-in includes a virtual test plug-in, when the processor 70b calls the hook plug-in to obtain the running data of the object to be tested, it is specifically used to: use the virtual test plug-in to generate the virtual environment required for virtual testing, and control the object to be tested to run in the virtual environment; use the hook plug-in to obtain the running status data of the object to be tested in the virtual environment, so that the virtual test plug-in can perform virtual testing on the object to be tested.
[0169] In some embodiments, if the terminal device and the server device are not the same physical device, the terminal device further includes: a communication plug-in 70c. The processor 70b is further configured to: receive the second installation package of the application to be tested sent by the server device through the communication plug-in 70c; and report the test data to the server device through the communication plug-in 70c, so that the server device can perform performance analysis on the first installation package based on the test data.
[0170] In other embodiments, the terminal device and the server device are the same physical device, such as a tester's computer, etc., and the terminal device further includes a display 70d. The display 70d can display the test interaction interface. Before running the second installation package of the application to be tested, the processor 70b is further used to: in response to the tester selecting an application identifier from the application identifier list on the test interaction interface, obtain the second installation package corresponding to the application identifier selected by the tester from the second installation packages of the application stored in the memory 70a as the second installation package of the application to be tested.
[0171] In some other embodiments, the terminal device and the server device are the same physical device, such as a tester's computer. The processor 70b may also repackage the first installation package of the application to be tested. Accordingly, when the processor 70b repackages the first installation package of the application to be tested, it is specifically used to: compile the first installation package and the test tool respectively to obtain the source file of the first installation package and the source file of the test tool; inject the source file of the test tool into the source file of the first installation package to obtain the source file of the second installation package; recompile the source file of the second installation package to obtain the second installation package.
[0172] Correspondingly, when processor 70b injects the source file of the testing tool into the source file of the first installation package, it is specifically used to: inject the original code file in the source file of the testing tool into the code file in the source file of the first installation package; and inject the resource file in the source file of the testing tool into the resource file in the source file of the first installation package.
[0173] In this embodiment, a test tool is implanted in the process of repackaging the first installation package of the application to be tested to form a second installation package of the application to be tested. In this way, the terminal device can use the test tool to test the first installation package and obtain test data during the process of running the second installation package of the application to be tested. This application testing method does not require developers to modify the code logic of the application to be tested, which can improve testing efficiency and thus help reduce testing costs.
[0174] Second, when Figure 7 When the computer device shown is a server device, the server device further includes a communication component 70c. The memory 70a is used to store a second installation package of the application to be tested and a computer program. The second installation package is obtained by repackaging the first installation package of the application to be tested, and the second installation package includes a test tool implanted during the repackaging process.
[0175] The processor 70b is coupled to the memory 70a, and is used to execute a computer program to: obtain a second installation package of the application to be tested from the memory 70a; and send the second installation package to the test terminal through the communication plug-in 70c, so that the test terminal can use the test tool to test the first installation package during the running of the second installation package.
[0176] In some embodiments, the server device is also used to repackage the first installation package of the application to be tested. Accordingly, when the processor 70b repackages the first installation package of the application to be tested, it is specifically used to: compile the first installation package and the test tool respectively to obtain the source file of the first installation package and the source file of the test tool; inject the source file of the test tool into the source file of the first installation package to obtain the source file of the second installation package; recompile the source file of the second installation package to obtain the second installation package. Among them, the specific implementation method of the processor 70b repackaging the first installation package of the application to be tested can refer to the relevant content of the processor 70b repackaging the first installation package of the application to be tested when the above-mentioned computer device is a terminal device, which will not be repeated here.
[0177] In other embodiments, before the test terminal runs the second installation package, the processor 70b is further used to: in response to the tester submitting the test instruction, send the test instruction to the test terminal through the communication plug-in, the test instruction including the object identifier and the plug-in identifier, so that the test terminal can test the first installation package according to the test instruction. Optionally, the communication plug-in is an RPC plug-in.
[0178] The server device provided in this embodiment provides the second installation package of the test application program including the test tool to the test terminal. In this way, the test terminal can use the test tool to test the first installation package and obtain test data during the process of running the second installation package of the test application program. This application testing method does not require developers to modify the code logic of the test application program, which can improve the test efficiency and thus help reduce the test cost.
[0179] Third, when Figure 7 When the computer device shown is another terminal device, the memory 70a is used to store the target executable file and the computer program corresponding to the original executable file; the target executable file is the file after the test tool is implanted into the original executable file.
[0180] The processor 70b is coupled to the memory 70a, and is used to execute a computer program to: run the target executable file; and in the process of running the target executable file, use the test tool to test the original executable file. The specific implementation of the processor 70b using the test tool to test the original executable file can refer to the above-mentioned related content of using the test tool to test the first installation package, which will not be repeated here.
[0181] In some embodiments, the processor 70b is also used to embed a test tool into the original executable file of the executable file. Further, when the processor 70b embeds the test tool into the original executable file of the executable file, it is specifically used to: compile the original executable file and the test tool separately to obtain the source file of the original executable file and the source file of the test tool; inject the source file of the test tool into the source file of the original executable file to obtain the source file of the target executable file; recompile the source file of the target executable file to obtain the test file. The specific implementation method of the processor 70b embedding the test tool into the original executable file of the executable file can be found in the above Figure 7 The relevant content of the processor 70b repackaging the first installation package is not repeated here.
[0182] In this embodiment, a test tool is embedded in the original executable file to form a target executable file. In this way, the terminal device can use the test tool to test the original executable file during the process of running the target executable file to obtain test data. This executable file testing method does not require developers to modify the code logic of the executable file, which can improve test efficiency and thus help reduce test costs.
[0183] Fourth, when Figure 7In another server device provided in an embodiment of the present application, the memory 70a is used to store a target executable file and a computer program corresponding to the original executable file; the target executable file is a file obtained by implanting a test tool into the original executable file.
[0184] The processor 70b is coupled to the memory 70a, and is used to execute a computer program to: obtain a target executable file from the memory 70a; and send the target executable file to the test terminal through the communication component 70c, so that the test terminal can use a test tool to test the original executable file during the process of running the target executable file.
[0185] In some embodiments, the processor 70b is further used to embed a test tool into the original executable file. Further, when embedding the test tool into the original executable file, the processor 70b is specifically used to: compile the original executable file and the test tool respectively to obtain the source file of the original executable file and the source file of the test tool; inject the source file of the test tool into the source file of the original executable file to obtain the source file of the target executable file; recompile the source file of the target executable file to obtain the target executable file.
[0186] The server device provided in this embodiment provides the target executable file containing the test tool to the test terminal. In this way, the test terminal can use the test tool to test the original executable file during the process of running the target executable file to obtain test data. This executable file testing method does not require developers to modify the code logic of the original executable file, which can improve test efficiency and thus help reduce test costs.
[0187] Fifth, in some embodiments, Figure 7 The processor 70b in the embodiment can also be used to: compile the first installation package of the application to obtain the first source file of the application; inject the source file of the target plug-in into the first source file to obtain the modified first source file; and recompile the first source file to obtain the second installation package of the application.
[0188] In some embodiments, when the processor 70b injects the source file of the target plug-in into the first source file, it is specifically used to: inject the original code in the source file of the target plug-in into the source code in the first source file; and inject the resource file in the source file of the target plug-in into the resource file in the first source file.
[0189] Further, when the processor 70b injects the original code in the source file of the target plug-in into the source code in the first source file, it is specifically used to: search for the application code of the application in the source code; and inject the application code of the target plug-in into the application code of the application; and search for the startup code of the application in the source code, and inject the startup code of the first plug-in in the target plug-in into the startup code of the application; wherein the first plug-in is a plug-in that needs to be run during the startup process.
[0190] In some other embodiments, the target plug-in is a test tool. After obtaining the second installation package of the application, the processor 70b is further used to: run the second installation package; and in the process of running the second installation package, use the test tool to test the first installation package to obtain test data. The specific implementation method of the processor 70b using the test tool to test the first installation package can refer to the relevant content of the above embodiment, which will not be repeated here.
[0191] In some other embodiments, if the computer device and the server device are not the same physical device, the computer device may be a terminal device, and further includes: a communication component 70c. The processor 70b is further configured to: receive the second installation package of the application to be tested issued by the server device through the communication component 70c; and report the test data to the server device through the communication component 70c, so that the server device can perform performance analysis on the first installation package based on the test data.
[0192] In other embodiments, the computer device and the server device are the same physical device, such as a tester's computer, etc. The computer device also includes a display 70d. The display 70d can display the test interaction interface. Before running the second installation package of the application to be tested, the processor 70b is further used to: in response to the tester selecting an application identifier from the application identifier list on the test interaction interface, obtain the second installation package corresponding to the application identifier selected by the tester from the second installation packages of the application stored in the memory 70a as the second installation package of the application to be tested.
[0193] The computer device provided in this embodiment can inject the source file of the target plug-in into the first source file of the application to obtain a modified first source file, and recompile the modified first source file to obtain a second installation package of the application. This method of generating an installation package for an application does not require developers to modify the code logic of the application, which can improve packaging efficiency and thus help reduce packaging costs.
[0194] The computer device provided in the embodiment of the present application may further include: a power supply component 70c. If the computer device is a terminal device, such as a computer, etc., the computer device may further include: an audio component 70f and other optional components. Figure 7Only some components are shown schematically, which does not mean that the server device must include Figure 7 All components shown do not mean that the server device can only include Figure 7 Components shown.
[0195] In an embodiment of the present application, the memory is used to store a computer program and can be configured to store various other data to support operations on the device where it is located. Among them, the processor can execute the computer program stored in the memory to implement the corresponding control logic. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0196] In an embodiment of the present application, the communication plug-in is configured to facilitate wired or wireless communication between the device in which it is located and other devices. The device in which the communication plug-in is located can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G, 5G or a combination thereof. In an exemplary embodiment, the communication plug-in receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication plug-in can also be implemented based on near field communication (NFC) technology, radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology or other technologies.
[0197] In an embodiment of the present application, the display may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0198] In an embodiment of the present application, a power supply component is configured to provide power to various components of the device in which it is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component is located.
[0199] In an embodiment of the present application, the audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication plug-in. In some embodiments, the audio component also includes a speaker for outputting an audio signal. For example, for an electronic device with a language interaction function, voice interaction with a user may be achieved through an audio component.
[0200] It should be noted that the descriptions such as “first” and “second” in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit “first” and “second” to different types.
[0201] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0202] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0203] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0204] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0205] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0206] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0207] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0208] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0209] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A system for generating an installation package, It is characterized in that include: User interface module, basic service module and packaging service module; The user interface module is used to display the installation package input component and the plug-in input component; The basic service module is used to obtain packaging service basic information of the first installation package based on the first installation package provided by the installation package input component and the target plug-in provided by the plug-in input component; The packaging service module is used to compile the first installation package of the application based on the packaging service basic information of the first installation package to obtain the first source file of the application; Injecting the source file of the target plug-in into the first source file to obtain a modified first source file, and recompiling the modified first source file to obtain a second installation package of the application, thereby injecting the target plug-in during the process of repackaging the first installation package; The packaging service basic information of the first installation package includes: basic information of the first installation package and basic information of the target plug-in; wherein the basic service module includes: an application management unit, a plug-in management unit and a packaging task management unit; The application management unit is used to obtain basic information of an application corresponding to the first installation package and an association relationship between the application and the plug-in configuration according to the identifier of the first installation package; The plug-in management unit is used to obtain basic information of the target plug-in and basic information of the inherent plug-in of the application according to the identifier of the first installation package and the identifier of the target plug-in; The packaging task management unit is used to provide the packaging service module with packaging service basic information of the first installation package, and trigger the packaging service module to repackage the first installation package.
2. The system according to claim 1, It is characterized in that The plug-in input component includes: a basic plug-in selection component, so that the user can select a target basic plug-in through the basic plug-in selection component.
3. The system according to claim 2, It is characterized in that The packaging service module includes: a packaging processing module and a basic plug-in library; The packaging processing module is used to obtain the target basic plug-in from the basic plug-in library as the target plug-in according to the identifier of the target basic plug-in selected by the user.
4. The system according to claim 1, It is characterized in that The plug-in input component includes: a custom plug-in input component, for the user to input a custom plug-in through the custom plug-in input component; The packaging service module is further used to: use the custom plug-in input by the user as the target plug-in.
5. The system according to claim 2, It is characterized in that The plug-in input component further includes: a custom plug-in input component, for the user to input a custom plug-in through the custom plug-in input component.
6. The system according to claim 5, It is characterized in that The packaging service module includes: a packaging processing module and a basic plug-in library; The packaging processing module is used to obtain the target basic plug-in from the basic plug-in library according to the identifier of the target basic plug-in selected by the user, and use the target basic plug-in and the custom plug-in as the target plug-in.
7. The system according to claim 1, It is characterized in that The basic service module also includes: a device management unit; The device management unit is used to manage a list of devices using the installation package generation system, and is responsible for interacting with the devices using the installation package generation system.
8. The system according to claim 7, It is characterized in that The target plug-in includes: a communication plug-in; When interacting with a device using the installation package generation system, the device management unit is specifically used to: call the terminal device through the communication plug-in to install and run the second installation package; wherein the device list includes the identification of the terminal device.
9. The system according to claim 8, It is characterized in that The basic service module also includes: a data management unit; The data management unit is used to receive data reported by the terminal device during the execution of the second installation package, and analyze the received data and / or provide the received data to the user interface module for display by the user interface module.
10. The system according to claim 8, It is characterized in that The target plug-in also includes: a testing tool; The device management unit is further used to: during the process of calling the terminal device to run the second installation package, control the terminal device to use the test tool to test the first installation package to obtain test data.
11. The system according to claim 10, It is characterized in that The test tool includes: at least one test plug-in; when the device management unit controls the terminal device to test the first installation package using the test tool, it is specifically used to: The communication plug-in controls the terminal device to determine a target test plug-in from the at least one test plug-in according to the plug-in identifier in the test instruction; and controls the terminal device to test the object to be tested in the first installation package corresponding to the object identifier in the test instruction according to the test logic of the target test plug-in.
12. The system according to claim 11, It is characterized in that The test tool further includes: a hook plug-in; when the device management unit controls the terminal device to test the object to be tested corresponding to the object identifier in the first installation package according to the test logic of the target test plug-in, it is specifically used to: When it is necessary to test the code logic of the first installation package, the communication plug-in is used to control the terminal device to call the hook plug-in to obtain the running status data of the object to be tested; and the terminal device is controlled to provide the running status data to the target test plug-in, and the target test plug-in is run to test the code logic corresponding to the object to be tested.
13. The system according to claim 12, It is characterized in that If the target test plug-in includes an internal state test plug-in, the device management unit is specifically used to control the terminal device to call the hook plug-in to obtain the running state data of the object to be tested: The communication plug-in controls the terminal device to adjust the internal state of the object under test to a target state, where the target state is the internal state that the object under test is required to maintain during the test; and controls the terminal device to call the hook plug-in to obtain the operating status data of the object under test in the target state.
14. The system according to claim 13, It is characterized in that When the device management unit controls the terminal device to adjust the internal state of the object to be tested to the target state, it is specifically used to: In the case where the hook plug-in includes an internal state modification instruction, the communication plug-in controls the terminal device to call the hook plug-in to modify the internal state of the object to be tested to the target state; In the case where the hook plug-in does not include a state modification instruction, the communication plug-in controls the terminal device to modify the internal state of the object to be tested to the target state according to the external state modification instruction; The internal state modification instruction and the external state modification instruction include the target state.
15. The system according to claim 12, It is characterized in that If the target test plug-in includes a method test plug-in, the device management unit is specifically used to control the terminal device to call the hook plug-in to obtain the running status data of the object to be tested: Control the terminal device to determine the method to be tested bound to the object to be tested according to the method identifier in the test instruction; and control the terminal device to simulate the trigger operation bound to the method to be tested on the object to be tested so that the method to be tested runs; and control the terminal device to use the hook plug-in to obtain the running status data generated by the object to be tested during the running of the method to be tested.
16. The system according to claim 12, It is characterized in that If the target test plug-in includes a path tracking plug-in, the device management unit is specifically used to control the terminal device to call the hook plug-in to obtain the running status data of the object to be tested: The communication plug-in controls the terminal device to call the hook plug-in to obtain the running status data generated by the object under test during the calling process with its context object.
17. The system according to claim 12, It is characterized in that If the target test plug-in includes a virtual test plug-in, the device management unit is specifically used to control the terminal device to call the hook plug-in to obtain the operation data of the object to be tested: The communication plug-in controls the terminal device to use the virtual test plug-in to generate the virtual environment required for the virtual test, and controls the object to be tested to run in the virtual environment; and controls the terminal device to use the hook plug-in to obtain the running status data of the object to be tested in the virtual environment, so that the virtual test plug-in can perform virtual testing on the object to be tested.
18. A system according to any one of claims 8 to 17, It is characterized in that The communication plug-in is an RPC plug-in.
