Running test method and device of application program and electronic equipment

By pre-downloading and compiling the executable file of the adapter program on the server, the client directly selects and runs the target version, solving the problem of inefficient testing in the existing technology and achieving rapid application adapter testing.

CN120492353APending Publication Date: 2025-08-15ZHONGKE FANGDE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510709859.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the prior art, the operation and testing efficiency of applications under different versions of adapter programs is low, mainly because the time to download source code from the external network and the compilation process is too long.

Method used

The adapter program is downloaded and compiled from the external network server in advance from the server. The client selects the target version through the version list and generates a startup command to run the application directly in the built execution environment to avoid repeated download and compilation steps.

Benefits of technology

Improves the testing efficiency of applications under different versions of adapters, reduces download and compilation time, and improves testing speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492353A_ABST
    Figure CN120492353A_ABST
Patent Text Reader

Abstract

The invention is suitable for the field of software development, and discloses a running test method and device of an application program and electronic device.The method applied to a client side comprises the steps that in response to a first operation, a version list is downloaded from a server side, the version list comprises version identifiers corresponding to the adaptive programs of all versions downloaded from the external network server by the server side; the adaptive program stored by the server is compiled into an executable file; in response to the second operation, obtaining a target file corresponding to the target identifier based on an executable file stored in the server, the target file being an executable file corresponding to an adaptive program to which the target identifier belongs; the target identifier is a version identifier corresponding to the second operation in a version list; obtaining a starting command; according to the command parameter, a starting command is executed, and the starting command is used for running the application program in an execution environment constructed by execution of the target file, so that a running test result of the application program under the adaptive program corresponding to the target identifier is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, and electronic device for testing the operation of an application program. Background Art

[0002] In order to adapt an application built on a certain operating system to different operating systems, an adapter program needs to be deployed in the operating system, and the application program can run on different operating systems based on the adapter program.

[0003] Currently, when testing the operation of an application under different versions of adapters, it is necessary to download the source code of different versions of the adapter from an external network, such as the server of the adapter provider, and then compile each version of the source code into an executable file. Then, run the executable file so that the application can run in the constructed execution environment to obtain the operation test results.

[0004] However, downloading source code from the Internet and compiling the source code takes too much time, resulting in low application testing efficiency. Summary of the Invention

[0005] In view of the above problems, this application provides an application operation test method, device and electronic device to improve the test efficiency of running the application in the adapter under different versions. The specific solution is as follows:

[0006] In a first aspect, the present application provides a method for running an application program, the method being applied to a client and comprising:

[0007] In response to a first operation on the adapter, a version list is downloaded from the server, the version list including version identifiers corresponding to all versions of the adapter downloaded by the server from an external network server; the adapter stored by the server is compiled into an executable file; the external network server is a server for storing the adapter of the adapter provider;

[0008] In response to a second operation on the version list, obtaining a target file corresponding to a target identifier based on the executable file stored on the server, the target file being the executable file corresponding to the adapter program to which the target identifier belongs; the target identifier being the version identifier corresponding to the second operation in the version list;

[0009] Obtaining a startup command; the startup command includes at least one command parameter; the command parameter includes at least: a program parameter corresponding to the application program and the target identifier;

[0010] According to the command parameters, the startup command is executed, and the startup command is used to run the application in the execution environment constructed by executing the target file to obtain the running test result of the application under the adapter corresponding to the target identifier.

[0011] In a possible implementation, obtaining the start command includes:

[0012] Obtaining a storage path of the application program according to a path selection operation for the application program;

[0013] Obtaining the storage path of the running container corresponding to the application according to the storage path of the application;

[0014] A start command is obtained according to at least the storage path of the application, the storage path of the running container, and the target identifier.

[0015] In a possible implementation, if the storage path of the running container corresponding to the application is not obtained according to the storage path of the application, the method further includes:

[0016] In response to a container setting operation for the application, a storage path of a running container corresponding to the application is obtained.

[0017] In a possible implementation, obtaining the startup command according to at least the storage path of the application, the storage path of the running container, and the target identifier includes:

[0018] At least the storage path of the application, the storage path of the running container, and the target identifier are concatenated to obtain a startup command.

[0019] In a possible implementation, obtaining the target file corresponding to the target identifier based on the executable file stored on the server includes:

[0020] According to the target identifier, searching the cache area corresponding to the client for a target file corresponding to the target identifier;

[0021] If the target file corresponding to the target identifier exists in the cache area, reading the target file corresponding to the target identifier from the cache area;

[0022] If the target file corresponding to the target identifier does not exist in the cache area, the target file corresponding to the target identifier is downloaded from the server.

[0023] A second aspect of the present application provides a method for running an application program, which is applied to a server and includes:

[0024] Monitoring whether the external network server has been updated with the target adapter; the external network server is a server where the adapter provider stores the adapter;

[0025] downloading the target adapter program from the external network server when the external network server is updated with the target adapter program;

[0026] Compiling the target adapter program to obtain an executable file corresponding to the target adapter program;

[0027] Among them, the executable file saved by the server is provided to the client for download, so that the client executes the corresponding startup command; the startup command is used to run the application in the execution environment constructed by the execution of the executable file to obtain the running test results of the application under the adapter program corresponding to the target identifier.

[0028] In a possible implementation, after downloading the target adapter from the external network server, the method further includes:

[0029] Adding the version identifier corresponding to the target adapter to a version list; the version list includes the version identifiers corresponding to all versions of the adapter downloaded by the server from the external network server;

[0030] The version list stored in the server is provided to the client for downloading, so that the client outputs the version list.

[0031] A third aspect of the present application provides an application program operation test device, which is applied to a client and includes:

[0032] A list downloading unit is configured to download a version list from a server in response to a first operation on the adapter, the version list including version identifiers corresponding to all versions of the adapter downloaded by the server from an external network server; the adapter stored by the server is compiled into an executable file; the external network server is a server for storing adapters of an adapter provider;

[0033] A file obtaining unit is configured to obtain, in response to a second operation on the version list, a target file corresponding to a target identifier based on the executable file stored on the server, the target file being the executable file corresponding to the adapter program to which the target identifier belongs; the target identifier being the version identifier corresponding to the second operation in the version list;

[0034] A command obtaining unit, configured to obtain a start command; the start command includes at least one command parameter; the command parameter includes at least: a program parameter corresponding to the application program and the target identifier;

[0035] A command execution unit is used to execute the startup command according to the command parameters, and the startup command is used to run the application in the execution environment constructed by the execution of the target file to obtain the running test result of the application under the adapter program corresponding to the target identifier.

[0036] A fourth aspect of the present application provides an application program operation test device, the device being applied to a server, and comprising:

[0037] An update monitoring unit, configured to monitor whether an external network server has been updated with a target adapter; the external network server is a server storing the adapter of the adapter provider;

[0038] a program downloading unit, configured to download the target adapter program from the external network server when the external network server is updated with the target adapter program;

[0039] A program compiling unit, configured to compile the target adapter program to obtain an executable file corresponding to the target adapter program;

[0040] Among them, the executable file saved by the server is provided to the client for download, so that the client executes the corresponding startup command, and the startup command is used to run the application in the execution environment constructed by the execution of the executable file to obtain the running test results of the application under the adapter program corresponding to the target identifier.

[0041] In a fifth aspect, the present application provides a computer program product comprising computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the method for running an application program according to the first aspect or any implementation of the first aspect.

[0042] A sixth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0043] The memory is used to store computer programs;

[0044] The processor is used to execute the computer program so that the electronic device can implement the operation test method of the application program of the above-mentioned first aspect or any implementation manner of the first aspect.

[0045] In a seventh aspect, the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can run the application program of the first aspect or any implementation method of the first aspect.

[0046] By means of the above-mentioned technical solution, in a method, device and electronic device for testing the operation of an application provided by the present application, an adapter program is downloaded from an external network server in advance on the server side and compiled into an executable file. In this way, when the application needs to be tested under a certain version of the adapter program, the client can respond to the first operation on the adapter program, download a version list containing all version identifiers from the server side and provide it to the user for selection of a certain version identifier, and then respond to the second operation on the version list. Based on the executable file saved by the server side, the target file of the version identifier corresponding to the second operation in the version list is obtained, and then the startup command containing command parameters is obtained. Finally, the startup command is executed according to these command parameters such as the program parameters corresponding to the application and the version identifier of the adapter program. In this way, the target file can be executed and the application can be run in the execution environment constructed by it to obtain the operation test result of the application based on the corresponding version of the adapter program. It can be seen that in this application, the pre-downloaded and compiled executable file is saved on the server side. When the client needs to test the operation of the application under a certain version of the adapter, the executable file can be downloaded directly from the server. There is no need to download the original code of the adapter from the external network or to compile the adapter, which can speed up the operation test of the application under a certain version of the adapter, thereby improving the testing efficiency of the application under a certain version of the adapter. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0048] Figure 1 A flowchart of a method for running and testing an application program provided in an embodiment of the present application;

[0049] Figure 2 This is an example diagram of the interaction between the client, the server, and the external network server in the embodiment of the present application;

[0050] Figure 3 A partial flow chart of a method for running and testing an application program provided in an embodiment of the present application;

[0051] Figure 4 This is an example diagram of a path selection box in an embodiment of the present application;

[0052] Figure 5 Another partial flow chart of a method for running and testing an application program provided in an embodiment of the present application;

[0053] Figure 6 This is an example diagram of a container position selection box in an embodiment of the present application;

[0054] Figure 7 Another partial flow chart of a method for running and testing an application program provided in an embodiment of the present application;

[0055] Figure 8 A flowchart of another application program operation test method provided in an embodiment of the present application;

[0056] Figure 9 Another flowchart of another application program operation test method provided in an embodiment of the present application;

[0057] Figure 10 A schematic diagram of the structure of an application program operation test device provided in an embodiment of the present application;

[0058] Figure 11 A schematic diagram of the structure of another application program operation test device provided in an embodiment of the present application;

[0059] Figure 12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0060] Figure 13 This is an example diagram of the configuration interface in the embodiment of this application;

[0061] Figure 14 The following is a flowchart showing how a user can switch between wines using an embodiment of the present application. DETAILED DESCRIPTION

[0062] The following describes the embodiments of the present application in conjunction with the accompanying drawings. The terms used in the implementation methods of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the present application.

[0063] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0064] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0065] This application can be applied in the field of software development. The following uses the example of an application developed based on the Windows operating system running on the Linux operating system to introduce multiple application scenarios that have been implemented in products.

[0066] Migrating Windows applications to other operating systems, such as Linux, primarily relies on adapters like Wine. Wine is an open-source compatibility layer that emulates the Windows Application Programming Interface (API), enabling many Windows-based applications to run on non-Windows operating systems like Linux. As Wine has evolved, multiple versions have emerged, leading to the following two scenarios:

[0067] The first scenario: When you need to quickly verify which Wine version upgrade caused a problem, you usually use different Wine versions to verify and find the two adjacent Wine version numbers that caused the problem.

[0068] The second scenario: When adapting a new application, it is usually necessary to find the best release version of Wine and use this version as a basis for secondary development of the adaptation.

[0069] To meet the needs of different application scenarios, the usual practice is to download the source code of different versions of Wine locally, compile them separately, and then modify the command line to use the executable files of different versions of Wine for verification and testing. This requires a lot of time to switch versions and compile.

[0070] In view of this, the present application can provide an application operation test method, device, and electronic device that can quickly switch Wine versions, thereby quickly testing the application under the switched Wine. The technical solution of the present application eliminates the need for multiple adapter developers to repeatedly download and compile source code when testing multiple Wine versions, saving the time of repeatedly compiling the Wine source code and improving efficiency.

[0071] Reference Figure 1 , which is a flow chart of a method for running an application provided in an embodiment of the present application. This method can be applied to a client deployed on an electronic device capable of data processing, such as a computer or server running a Linux operating system. The technical solution in this embodiment is primarily used to improve the efficiency of running an application under an adapter program.

[0072] Specifically, the method in this embodiment may include the following steps:

[0073] Step 101: In response to a first operation on an adapter, a version list is downloaded from a server.

[0074] The version list includes the version identifiers of all versions of the adapter program wine downloaded by the server from the external network server. Figure 2 As shown in , the server stores a version list, which may include the following version identifiers: wine8.1, wine8.2, wine8.3, wine8.5, wine8.6, wine8.9, wine8.10, wine9.0, and wine9.1. A data connection is established between the client and the server. The client can download the version list from the server in response to a first operation. The client can then provide the user with the version identifiers of all versions of the adapter by outputting the version list. The user can select any version identifier in the version list to represent the required test results for the application under the adapter corresponding to the version identifier.

[0075] The adapter program (i.e. source code) stored on the server is compiled into an executable file. Thus, the server stores executable files compiled from all versions of the adapter program. For example, Figure 2 As shown in the figure, the server saves the executable deb files of wine8.1, wine8.2, wine8.3, wine8.5, wine8.6, wine8.9, wine8.10, wine9.0, and wine9.1 versions.

[0076] The external network server is a server where the adapter provider stores the adapter source code. Figure 2 As shown in , a data connection can be established between the server and the external network server, and the external network server can contain all versions of the adapter program wine. The server can download all versions of the adapter program from the external network server and compile these adapter programs into executable files.

[0077] In one implementation, the server can monitor whether the external server has been updated with the target adapter. If so, the server downloads the target adapter from the external server and compiles the target adapter to obtain an executable file corresponding to the target adapter. Furthermore, the server can add the version identifier of the target adapter to a version list, thereby including both the version identifier of the original adapter and the version identifier of the most recently updated adapter.

[0078] It should be noted that the first operation may be an operation performed on the configuration interface when the adapter version needs to be selected. Figure 2 As shown in , a selection box for the wine version is output in the configuration interface, and the selection box corresponds to a drop-down control. In this embodiment, in response to a click operation (ie, a first operation) on the drop-down control, a version list can be downloaded from the server.

[0079] Step 102: In response to the second operation on the version list, a target file corresponding to the target identifier is obtained based on the executable file stored on the server.

[0080] The target file is the executable file corresponding to the adapter to which the target identifier belongs. The target identifier is the version identifier corresponding to the second operation in the version list. Specifically, the second operation is an operation in which a user selects one of the version identifiers in the version list. The corresponding target identifier is the version identifier selected by the second operation in the version list, and the corresponding target file is the executable file corresponding to the version identifier selected by the second operation.

[0081] For example, Figure 2 As shown in , the user can select the version identifier of wine8.1 in the version list. Wine8.1 is the target identifier, and the corresponding target file is the executable file wine8.10.deb of the wine8.1 version.

[0082] Step 103: Obtain a startup command, where the startup command includes at least one command parameter, and the command parameter includes at least a program parameter corresponding to the application program and a target identifier.

[0083] In this embodiment, a startup command may be obtained based on the target identifier and the program parameters corresponding to the application program, so that the startup command includes command parameters such as the program parameters corresponding to the application program and the target identifier.

[0084] It should be noted that in this embodiment, the user does not need to write a startup command. Instead, the command is generated through command parameters such as program parameters and target identifiers corresponding to the application, thereby obtaining the startup command, thereby improving the efficiency of obtaining the startup command.

[0085] The operating system for which the application is developed is different from the operating system installed on the electronic device. For example, the application is developed for the Windows operating system, and the operating system installed on the electronic device is the Linux operating system. The adapter program Wine enables the Windows operating system application to run on the Linux operating system.

[0086] Step 104: Execute the startup command according to the command parameters.

[0087] The startup command is used to execute the target file and run the application in the execution environment constructed by the execution of the target file to obtain the running test result of the application under the adapter corresponding to the target identifier.

[0088] For example, the executable file wine8.1.deb of wine8.1 is executed in the Linux operating system, thereby building an execution environment simulating the Windows operating system in the Linux operating system, and running the chat application in the execution environment to obtain the running test result of the chat application under wine8.1.

[0089] It should be noted that in this embodiment, the target file can be executed when the startup command is executed, thereby constructing an executable environment corresponding to the target identifier; or, in this embodiment, after obtaining the target file, the target file can be executed on the electronic device where the client is located, thereby constructing an executable environment corresponding to the target identifier, without waiting until the startup command is executed, thereby further improving the efficiency of the application's running test.

[0090] Furthermore, if the target file cannot be executed on the electronic device, in this embodiment, a prompt message may be output to indicate that the adapter program identified by the target is damaged, and the user may select another version of the adapter program.

[0091] With the help of the above technical solution, in an application operation test method provided by an embodiment of the present application, an adapter program is downloaded from an external network server in advance on the server side and compiled into an executable file. In this way, when the application needs to be tested under a certain version of the adapter program, the client can respond to the first operation on the adapter program, download a version list containing all version identifiers from the server side and provide it to the user for selection of a certain version identifier, and then respond to the second operation on the version list. Based on the executable file saved by the server side, the target file of the version identifier corresponding to the second operation in the version list is obtained, and then the startup command containing command parameters is obtained. Finally, the startup command is executed according to these command parameters such as the program parameters corresponding to the application and the version identifier of the adapter program. In this way, the target file can be executed and the application can be run in the execution environment constructed by it to obtain the operation test result of the application based on the corresponding version of the adapter program. It can be seen that in this embodiment, the pre-downloaded and compiled executable file is saved on the server side. When the client needs to test the operation of the application under a certain version of the adapter, the executable file can be downloaded directly from the server. There is no need to download the original code of the adapter from the external network or to compile the adapter, which can speed up the operation test of the application under a certain version of the adapter, thereby improving the testing efficiency of the application under a certain version of the adapter.

[0092] based on Figure 1 In one implementation, when the start command is obtained in step 103, the following methods can be used: Figure 3 As shown in:

[0093] Step 301: Obtain the storage path of the application according to a path selection operation for the application.

[0094] The storage path of the application refers to the storage path of the executable file of the application after it is installed on the electronic device.

[0095] In a specific implementation, a path selection box for the application can be provided in the configuration interface. The user can click the selection control to expand the file directory in the configuration interface, and then browse the file directory to select the storage path where the executable file corresponding to the application to be tested is located. In this embodiment, after monitoring the user's path selection operation on the file directory, the storage path of the application can be extracted based on the path selection operation.

[0096] The executable file corresponding to the application refers to the file that can be executed in the execution environment corresponding to the application. Figure 4As shown in the configuration interface, in the path selection box output, the user selects the storage path where the executable file abc.exe corresponding to the application abc is located: / opt / home / test / apps / container1 / drive_c / abc / abc.exe. Based on this, in this embodiment, the storage path of the executable file abc.exe corresponding to the application abc is obtained based on the path selection operation performed by the user in the path selection box.

[0097] Step 302: According to the storage path of the application, obtain the storage path of the running container corresponding to the application.

[0098] In this embodiment, the storage path of the application program may be parsed to determine the storage path of the running container.

[0099] For example, in this embodiment, the storage path " / opt / home / test / apps / container1 / drive_c / abc / abc.exe" is parsed to determine the character "drive_c" contained in the storage path, thereby determining that the character string before "drive_c" is the storage path of the running container. For example, the storage path WINEPREFIX of the running container container1 is: / opt / home / test / apps / container1.

[0100] Step 303: Obtain a startup command based at least on the storage path of the application, the storage path of the running container, and the target identifier.

[0101] In the startup command, the program parameters corresponding to the application may include: the storage path of the application and the storage path of the running container, and other command parameters related to the application. Specifically, in this embodiment, the storage path of the application, the storage path of the running container, the target identifier, and other command parameters may be combined to generate a command to obtain the startup command.

[0102] In one implementation, in this embodiment, at least the storage path of the application, the storage path of the running container, and the target identifier may be concatenated to obtain a startup command.

[0103] The command parameter corresponding to the target identifier in the startup command is the environment path of the execution environment created by the executable file of the adapter program corresponding to the target identifier in the electronic device. For example, the command parameter corresponding to wine8.1 is: the environment path / opt / winux / wa / win8.1 / bin / wine. Based on this, in this embodiment, the storage path of the application, the storage path of the running container, and the environment path corresponding to the target identifier can be spliced together to obtain the startup command.

[0104] It should be noted that other command parameters may include command parameters related to test output, for example, the command parameter WINEDEBUG is: +win,fixme-all.

[0105] For example, in this embodiment, the other command parameters (WINEDEBUG=+win,fixme-all), the storage path of the running container (WINEPREFIX= / opt / home / test / apps / container1), the environment path corresponding to the target identifier ( / opt / winux / wa / win8.1 / bin / wine), and the storage path of the application ( / opt / home / test / apps / container1 / drive_c / abc / abc.exe) are concatenated to obtain the startup command:

[0106] WINEDEBUG=+win,fixme-all WINEPREFIX= / opt / home / test / apps / container1 / opt / winux /

[0107] wa / win8.1 / bin / win / opt / home / test / apps / container1 / drive_c / abc / abc.exe.

[0108] It can be seen that in this embodiment, the command parameters can be automatically spliced without manual splicing by the user, thereby speeding up the rate of obtaining the startup command and further improving the efficiency of the running test of the application.

[0109] Furthermore, when obtaining the storage path of the running container in step 302, it may be impossible to obtain the storage path of the running container from the storage path of the application due to various circumstances. In this case, the following processing can also be performed, such as Figure 5 As shown in:

[0110] Step 304: In response to the container setting operation for the application, obtain the storage path of the running container corresponding to the application.

[0111] In a specific implementation, the application's storage path can be user-defined and different from the application's installation path, resulting in the application's storage path not including the storage path of the running container. Based on this, this embodiment can provide users with a container setup service through a configuration interface, allowing users to enter the storage path of the running container in the container location input box output by the configuration interface. Thus, in response to the user's container setup operation in the configuration interface, this embodiment obtains the storage path of the running container corresponding to the application.

[0112] For example, Figure 6 As shown in the Container Location selection box displayed on the configuration interface, the user enters " / opt / APPS / test". This results in the storage path " / opt / APPS / test" for the running container corresponding to the application. If the storage path for the running container can be derived from the application's storage path, the obtained storage path can be directly displayed in the Container Location selection box. If the storage path for the running container cannot be derived from the application's storage path, the Container Location selection box remains blank, allowing the user to enter the storage path.

[0113] It can be seen that in this embodiment, when the storage path of the running container cannot be obtained from the storage path of the application, the storage path of the running container can be obtained through the user's container setting operation, and the situation where the application cannot be run tested due to the inability to obtain the storage path of the running container will not occur. This can improve the reliability of the application run test.

[0114] based on Figure 1 In one implementation, in step 102, when obtaining the target file corresponding to the target identifier, it can be implemented in the following manner, such as Figure 7 As shown in:

[0115] Step 701: According to the target identifier, search the cache area corresponding to the client to see if there is a target file corresponding to the target identifier. If there is a target file corresponding to the target identifier in the cache area, execute step 702. If there is no target file corresponding to the target identifier in the cache area, execute step 703.

[0116] In this embodiment, each time the client downloads the executable file corresponding to the adapter program, the executable file corresponding to the adapter program is saved in the cache area. Based on this, when the client needs to obtain the executable file corresponding to the target identifier, the client can first check the cache area to see if the corresponding executable file has been saved.

[0117] Step 702: Read the target file corresponding to the target identifier from the cache area.

[0118] The cache area is a storage area deployed for the client in the electronic device where the client is located. Based on this, the speed of reading the target file from the cache area is faster.

[0119] Step 703: Download the target file corresponding to the target identifier from the server.

[0120] It should be noted that the client and the server can be respectively deployed in electronic devices in the same local area network or private network. Based on this, the speed of downloading the version list and the target file from the server is faster through the data connection between the client and the server.

[0121] It can be seen that in this embodiment, by setting the cache area, the efficiency of obtaining the executable file can be further accelerated, so that after the startup command is executed to build the execution environment corresponding to the adapter program, the running test efficiency of the application can be improved.

[0122] refer to Figure 8 , is a flowchart for implementing an application runtime testing method provided in an embodiment of the present application. This method can be applied to a server deployed in an electronic device capable of data processing, such as a computer or server. The technical solution in this embodiment is primarily used to improve the efficiency of running application tests under an adapter program.

[0123] Specifically, the method in this embodiment may include the following steps:

[0124] Step 801: Monitor whether the external network server has been updated with the target adapter program. If the external network server has been updated with the target adapter program, execute step 802; if not, continue to execute step 801.

[0125] Among them, Figure 2 As shown in , the external network server is a server where the adapter provider stores the adapter. A data connection can be established between the external network server and the server. The server and the external network server are in different networks, and a data connection is established between the external network server and the server via the Internet.

[0126] Step 802: Download the target adapter program from the external network server.

[0127] For example, Figure 2 As shown in , the server downloads the newly updated target adapter from the external network server through the data connection realized by the Internet.

[0128] Step 803: Compile the target adapter program to obtain an executable file corresponding to the target adapter program.

[0129] Among them, the executable file saved by the server is provided to the client for download, so that the client executes the corresponding startup command. The startup command is used to run the application in the execution environment constructed by the execution of the executable file to obtain the running test results of the application under the adapter program corresponding to the target identifier.

[0130] It should be noted that the client downloads the executable file from the server, obtains the startup command, and executes the startup command. Figure 1 The embodiment shown will not be described in detail here.

[0131] With the help of the above technical solution, in an application operation test method provided by an embodiment of the present application, an adapter program is downloaded from an external network server in advance on the server side and compiled into an executable file; in this way, when the application needs to be tested under a certain version of the adapter program, the client can respond to the first operation on the adapter program, download a version list containing all version identifiers from the server side and provide it to the user for selection of a certain version identifier; thereby, in response to the second operation on the version list, based on the executable file saved by the server side, obtain the target file of the version identifier corresponding to the second operation in the version list; then obtain a startup command containing command parameters; finally, execute the startup command according to these command parameters such as the program parameters corresponding to the application and the version identifier of the adapter program; in this way, the target file can be executed and the application can be run in the execution environment constructed by it to obtain the running test result of the application based on the corresponding version of the adapter program. It can be seen that in this application, the pre-downloaded and compiled executable file is saved on the server side. When the client needs to test the operation of the application under a certain version of the adapter, the executable file can be downloaded directly from the server. There is no need to download the original code of the adapter from the external network or to compile the adapter. This can speed up the operation test of the application under a certain version of the adapter and improve the testing efficiency of the application under a certain version of the adapter.

[0132] based on Figure 8 In one implementation, after step 802, the method in this embodiment may further include the following processing: Figure 9 As shown in:

[0133] Step 804: Add the version identifier corresponding to the target adapter to the version list.

[0134] The version list includes the version identifiers corresponding to all versions of the adapter downloaded by the server from the external network server. The server provides the version list stored on the server to the client for download, so that the client can output the version list. The user can select a target identifier from the version list, thereby running the application on the client in the execution environment constructed by executing the target file (the executable file corresponding to the adapter corresponding to the target identifier) to obtain the test results of the application running under the adapter corresponding to the target identifier.

[0135] It can be seen that in this embodiment, the version list can be continuously updated on the server, so that when the user needs an adapter, he can view all version identifiers of the adapter saved by the server by browsing the version list on the client, thereby facilitating the user to select the required adapter and improving the user's testing experience of the application.

[0136] refer to Figure 10 , which is a schematic diagram of the structure of an application operation test device provided in an embodiment of the present application. This device can be applied to a client in an electronic device, such as a computer or server running a Linux operating system. The technical solution in this embodiment is primarily used to improve the efficiency of application operation testing under an adapter program.

[0137] Specifically, the device in this embodiment may include the following units:

[0138] The list downloading unit 1001 is configured to download a version list from a server in response to a first operation on the adapter, wherein the version list includes version identifiers corresponding to all versions of the adapter downloaded by the server from an external network server; the adapter stored by the server is compiled into an executable file; the external network server is a server for storing adapters of the adapter provider;

[0139] A file obtaining unit 1002 is configured to obtain, in response to a second operation on the version list, a target file corresponding to a target identifier based on executable files stored on the server, the target file being the executable file corresponding to the adapter program to which the target identifier belongs; the target identifier being the version identifier corresponding to the second operation in the version list;

[0140] The command obtaining unit 1003 is configured to obtain a start command; the start command includes at least one command parameter; the command parameter includes at least: a program parameter corresponding to the application program and the target identifier;

[0141] The command execution unit 1004 is used to execute the startup command according to the command parameters. The startup command is used to run the application in the execution environment constructed by the target file execution to obtain the running test result of the application under the adapter program corresponding to the target identifier.

[0142] With the help of the above technical solution, in an application operation test device provided by an embodiment of the present application, an adapter program is downloaded from an external network server in advance on the server side and compiled into an executable file. In this way, when the application needs to be tested under a certain version of the adapter program, the client can respond to the first operation on the adapter program, download a version list containing all version identifiers from the server side and provide it to the user for selection of a certain version identifier, and then respond to the second operation on the version list. Based on the executable file saved by the server side, the target file of the version identifier corresponding to the second operation in the version list is obtained, and then the startup command containing command parameters is obtained. Finally, the startup command is executed according to these command parameters such as the program parameters corresponding to the application and the version identifier of the adapter program. In this way, the target file can be executed and the application can be run in the execution environment constructed by it to obtain the running test result of the application based on the corresponding version of the adapter program. It can be seen that in this embodiment, the pre-downloaded and compiled executable file is saved on the server side. When the client needs to test the operation of the application under a certain version of the adapter, the executable file can be downloaded directly from the server. There is no need to download the original code of the adapter from the external network or to compile the adapter, which can speed up the operation test of the application under a certain version of the adapter, thereby improving the testing efficiency of the application under a certain version of the adapter.

[0143] In one implementation, the command obtaining unit 1003 is specifically used to: obtain the storage path of the application according to the path selection operation for the application; obtain the storage path of the running container corresponding to the application according to the storage path of the application; and obtain the startup command according to at least the storage path of the application, the storage path of the running container, and the target identifier.

[0144] Among them, the command obtaining unit 1003 is further used to: obtain the storage path of the running container corresponding to the application in response to the container setting operation for the application, if the storage path of the running container corresponding to the application is not obtained according to the storage path of the application.

[0145] In one implementation, when the command obtaining unit 1003 obtains the startup command based at least on the storage path of the application, the storage path of the running container, and the target identifier, it is specifically used to: at least concatenate information of the storage path of the application, the storage path of the running container, and the target identifier to obtain the startup command.

[0146] In one implementation, the file obtaining unit 1002 is specifically used to: according to the target identifier, search from the cache area corresponding to the client whether there is a target file corresponding to the target identifier; if there is a target file corresponding to the target identifier in the cache area, read the target file corresponding to the target identifier from the cache area; if there is no target file corresponding to the target identifier in the cache area, download the target file corresponding to the target identifier from the server.

[0147] It should be noted that the specific implementation of each unit in this embodiment can refer to the corresponding content in the previous text and will not be described in detail here.

[0148] refer to Figure 11 , is a schematic diagram of the structure of an application operation test device provided in an embodiment of the present application, which is applied to the server side of an electronic device. The technical solution in this embodiment is mainly used to improve the test efficiency of the application operation test under the adapter program.

[0149] Specifically, the device in this embodiment may include the following units:

[0150] Update monitoring unit 1101, used to monitor whether the external network server has been updated with the target adapter; the external network server is the server where the adapter provider stores the adapter;

[0151] The program downloading unit 1102 is configured to download the target adapter program from the external network server when the external network server is updated with the target adapter program;

[0152] A program compiling unit 1103 is configured to compile the target adapter program to obtain an executable file corresponding to the target adapter program;

[0153] Among them, the executable file saved by the server is provided to the client for download, so that the client executes the corresponding startup command, and the startup command is used to run the application in the execution environment constructed by the execution of the executable file to obtain the running test results of the application under the adapter program corresponding to the target identifier.

[0154] With the help of the above technical solution, in an application operation test device provided by an embodiment of the present application, an adapter program is downloaded from an external network server in advance on the server side and compiled into an executable file. In this way, when the application needs to be tested under a certain version of the adapter program, the client can respond to the first operation on the adapter program, download a version list containing all version identifiers from the server side and provide it to the user for selection of a certain version identifier, and then respond to the second operation on the version list. Based on the executable file saved by the server side, the target file of the version identifier corresponding to the second operation in the version list is obtained, and then the startup command containing command parameters is obtained. Finally, the startup command is executed according to these command parameters such as the program parameters corresponding to the application and the version identifier of the adapter program. In this way, the target file can be executed and the application can be run in the execution environment constructed by it to obtain the running test result of the application based on the corresponding version of the adapter program. It can be seen that in this application, the pre-downloaded and compiled executable file is saved on the server side. When the client needs to test the operation of the application under a certain version of the adapter, the executable file can be downloaded directly from the server. There is no need to download the original code of the adapter from the external network or to compile the adapter, which can speed up the operation test of the application under a certain version of the adapter, thereby improving the testing efficiency of the application under a certain version of the adapter.

[0155] In one implementation, after downloading the target adapter program from the external network server, the program download unit 1102 is further used to: add the version identifier corresponding to the target adapter program to a version list; the version list includes the version identifiers corresponding to all versions of the adapter program downloaded by the server from the external network server; wherein the version list saved by the server is provided to the client for download, so that the client outputs the version list.

[0156] It should be noted that the specific implementation of each unit in this embodiment can refer to the corresponding content in the previous text and will not be described in detail here.

[0157] refer to Figure 12 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device may include the following structure:

[0158] Memory 1201, used to store computer programs and data generated by the execution of the computer programs;

[0159] The processor 1202 is configured to execute the computer program so that a client and a server are deployed in the electronic device, and the following processing is implemented through the client and the server:

[0160] In response to a first operation on the adapter, a version list is downloaded from the server, the version list including version identifiers corresponding to all versions of the adapter downloaded by the server from an external network server; the adapter stored by the server is compiled into an executable file; the external network server is a server for storing the adapter of the adapter provider;

[0161] In response to a second operation on the version list, obtaining a target file corresponding to a target identifier based on the executable file stored on the server, the target file being the executable file corresponding to the adapter program to which the target identifier belongs; the target identifier being the version identifier corresponding to the second operation in the version list;

[0162] Obtaining a startup command; the startup command includes at least one command parameter; the command parameter includes at least: a program parameter corresponding to the application program and the target identifier;

[0163] According to the command parameters, the startup command is executed, and the startup command is used to run the application in the execution environment constructed by executing the target file to obtain the running test result of the application under the adapter corresponding to the target identifier.

[0164] With the help of the above technical solution, in an electronic device provided by an embodiment of the present application, an adapter program is downloaded from an external network server in advance on the server side and compiled into an executable file. In this way, when it is necessary to test the application under a certain version of the adapter program, the client can respond to the first operation on the adapter program, download a version list containing all version identifiers from the server side and provide it to the user for selection of a certain version identifier, and then respond to the second operation on the version list. Based on the executable file saved by the server side, the target file of the version identifier corresponding to the second operation in the version list is obtained, and then the startup command containing command parameters is obtained. Finally, the startup command is executed according to these command parameters such as the program parameters corresponding to the application and the version identifier of the adapter program. In this way, the target file can be executed and the application can be run in the execution environment constructed by it to obtain the running test results of the application based on the corresponding version of the adapter program. It can be seen that in this application, the pre-downloaded and compiled executable file is saved on the server side. When the client needs to test the operation of the application under a certain version of the adapter, the executable file can be downloaded directly from the server. There is no need to download the original code of the adapter from the external network or to compile the adapter, which can speed up the operation test of the application under a certain version of the adapter, thereby improving the testing efficiency of the application under a certain version of the adapter.

[0165] In summary, in this application, the server can uniformly save the executable files of all versions of the adapter program wine, and the client can automatically download and automatically splice the startup commands to achieve: a technical solution for quickly switching multiple adapter program wine versions to start the same application.

[0166] For example, Figure 13 The following figure shows an example of the configuration interface provided by the client to the user. "WineUtil Client" refers to the client's Wine version management tool; "Wine Util Server" refers to the server's Wine version management tool; "Executable File" refers to the full path to the application to be tested; "Container Location" refers to a path extracted from the application's full path or manually entered by the user; "Wine Version" refers to a drop-down selection box containing a list of all available Wine versions; "Other Parameters" refers to additional command parameters that supplement the final startup command line; and "Startup Command Line" refers to the complete startup command spliced together from all of the above information.

[0167] The following references Figure 14 , the implementation process of this application is described:

[0168] (1) The user starts the Wine Util Client;

[0169] (2) After the Wine Util Client is started, it can automatically send a request from the Wine Util Server to obtain a list of all available wine versions on the server. If the Wine Util Server does not respond, it indicates that the Wine Util Client initialization has failed and the process exits. If the server responds to the request and replies with a list of versions, it indicates that the initialization is successful and proceeds to step (3).

[0170] (3) The user selects the application to be used, and the application corresponds to the storage path of the application;

[0171] (4) When the user selects the full path of an application, determine whether the path contains "drive_c";

[0172] (5) If it is included, the string before "drive_c" will be directly extracted and used as the container location to automatically add to the command line;

[0173] For example, the path containing drive_c is: / opt / home / test / apps / container1 / drive_c / abc / abc.exe, and the automatically resolved container location is: / opt / home / test / apps / container1 / .

[0174] (6) If not included, the container needs to be filled in manually by the user.

[0175] For example, the path example that does not include drive_c is: / opt / home / test / apps / container1 / abc / abc.exe. The container location input box will have no content and the user needs to enter it, such as: / opt / APPS / test.

[0176] (7) The user selects the wine version (i.e. target identifier).

[0177] When the user clicks the Wine version drop-down box, Wine Util Client will obtain a list of Wine versions from the server, such as ["wine8.1", "wine8.3", "wine9.5", "wine9.15", "wine9.22"]. This information is displayed to the user in the form of a list for selection.

[0178] (8) Determine whether the deb installation package of the wine version selected by the user has been downloaded in the local cache. If the selected wine version exists locally, execute (9);

[0179] When the user selects a wine version, Wine Util Client will check whether the directory name corresponding to the selected version already exists under the local / opt / winux / wa / (i.e. the cache area).

[0180] (9) You can splice complete command lines (i.e. startup commands).

[0181] The startup command is concatenated using the following rules: other command parameters + "WINEPREFIX=container location" + the full path to the executable file " / opt / winux / wa / wineversion / bin / wine".

[0182] Clicking the "Start" button will open the command line window and run the generated complete startup command line in the terminal window.

[0183] (10) Execute the complete command line.

[0184] (11) If the wine version does not exist locally, a download button will appear, and the "Start" button at the bottom will not be clickable. After the user clicks the download button, the deb installation package of the wine version will be downloaded from the server and installed;

[0185] (12) Determine whether the download and installation are successful. If the download and installation are successful, execute (9). If the download or installation fails, execute (13).

[0186] (13) Output a prompt message to indicate that the wine version cannot be used and needs to be reselected.

[0187] It can be seen that in this application, if you need to change a version to continue running the same application, you can directly change the new version by clicking the wine version drop-down box. The startup command line will be regenerated, and no other changes are required. You can click Start again to start the application with the new version.

[0188] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.

[0189] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.

[0190] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0191] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

Claims

1. A method for running an application, characterized in that: The method is applied to a client, and includes: In response to a first operation on the adapter, a version list is downloaded from the server, the version list including version identifiers corresponding to all versions of the adapter downloaded by the server from an external network server; the adapter stored by the server is compiled into an executable file; the external network server is a server for storing the adapter of the adapter provider; In response to a second operation on the version list, obtaining a target file corresponding to a target identifier based on the executable file stored on the server, the target file being the executable file corresponding to the adapter program to which the target identifier belongs; the target identifier being the version identifier corresponding to the second operation in the version list; Obtaining a startup command; the startup command includes at least one command parameter; the command parameter includes at least: a program parameter corresponding to the application program and the target identifier; According to the command parameters, the startup command is executed, and the startup command is used to run the application in the execution environment constructed by executing the target file to obtain the running test result of the application under the adapter corresponding to the target identifier.

2. The method according to claim 1, characterized in that The obtaining of the startup command includes: Obtaining a storage path of the application program according to a path selection operation for the application program; Obtaining the storage path of the running container corresponding to the application according to the storage path of the application; A start command is obtained according to at least the storage path of the application, the storage path of the running container, and the target identifier.

3. The method according to claim 2, characterized in that In a case where the storage path of the running container corresponding to the application is not obtained according to the storage path of the application, the method further includes: In response to a container setting operation for the application, a storage path of a running container corresponding to the application is obtained.

4. The method according to claim 2, characterized in that The obtaining the startup command according to at least the storage path of the application, the storage path of the running container, and the target identifier includes: At least the storage path of the application, the storage path of the running container, and the target identifier are concatenated to obtain a startup command.

5. The method according to claim 1, characterized in that The obtaining of a target file corresponding to a target identifier based on the executable file stored in the server includes: According to the target identifier, searching the cache area corresponding to the client for a target file corresponding to the target identifier; If the target file corresponding to the target identifier exists in the cache area, reading the target file corresponding to the target identifier from the cache area; If the target file corresponding to the target identifier does not exist in the cache area, the target file corresponding to the target identifier is downloaded from the server.

6. A method for running an application, characterized in that: The method is applied to the server, and includes: Monitoring whether the external network server has been updated with the target adapter; the external network server is a server where the adapter provider stores the adapter; downloading the target adapter program from the external network server when the external network server is updated with the target adapter program; Compiling the target adapter program to obtain an executable file corresponding to the target adapter program; Among them, the executable file saved by the server is provided to the client for download, so that the client executes the corresponding startup command; the startup command is used to run the application in the execution environment constructed by the execution of the executable file to obtain the running test results of the application under the adapter program corresponding to the target identifier.

7. The method according to claim 6, characterized in that After downloading the target adapter from the external network server, the method further includes: Adding the version identifier corresponding to the target adapter to a version list; the version list includes the version identifiers corresponding to all versions of the adapter downloaded by the server from the external network server; The version list stored in the server is provided to the client for downloading, so that the client outputs the version list.

8. An application program operation test device, characterized in that: The device is applied to a client, and includes: A list downloading unit is configured to download a version list from a server in response to a first operation on the adapter, the version list including version identifiers corresponding to all versions of the adapter downloaded by the server from an external network server; the adapter stored by the server is compiled into an executable file; the external network server is a server for storing adapters of an adapter provider; A file obtaining unit is configured to obtain, in response to a second operation on the version list, a target file corresponding to a target identifier based on the executable file stored on the server, the target file being the executable file corresponding to the adapter program to which the target identifier belongs; the target identifier being the version identifier corresponding to the second operation in the version list; A command obtaining unit, configured to obtain a start command; the start command includes at least one command parameter; the command parameter includes at least: a program parameter corresponding to the application program and the target identifier; A command execution unit is used to execute the startup command according to the command parameters, and the startup command is used to run the application in the execution environment constructed by the execution of the target file to obtain the running test result of the application under the adapter program corresponding to the target identifier.

9. An application program operation test device, characterized in that: The device is applied to a server, and includes: An update monitoring unit, configured to monitor whether an external network server has been updated with a target adapter; the external network server is a server storing the adapter of the adapter provider; a program downloading unit, configured to download the target adapter program from the external network server when the external network server is updated with the target adapter program; A program compiling unit, configured to compile the target adapter program to obtain an executable file corresponding to the target adapter program; Among them, the executable file saved by the server is provided to the client for download, so that the client executes the corresponding startup command, and the startup command is used to run the application in the execution environment constructed by the execution of the executable file to obtain the running test results of the application under the adapter program corresponding to the target identifier.

10. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer programs and data generated by the execution of the computer programs; A processor, configured to execute the computer program to implement: In response to a first operation on the adapter, a version list is downloaded from the server, the version list including version identifiers corresponding to all versions of the adapter downloaded by the server from an external network server; the adapter stored by the server is compiled into an executable file; the external network server is a server for storing the adapter of the adapter provider; In response to a second operation on the version list, obtaining a target file corresponding to a target identifier based on the executable file stored on the server, the target file being the executable file corresponding to the adapter program to which the target identifier belongs; the target identifier being the version identifier corresponding to the second operation in the version list; Obtaining a startup command; the startup command includes at least one command parameter; the command parameter includes at least: a program parameter corresponding to the application program and the target identifier; According to the command parameters, the startup command is executed, and the startup command is used to run the application in the execution environment constructed by executing the target file to obtain the running test result of the application under the adapter corresponding to the target identifier.