Application testing method and device, equipment and storage medium

By establishing communication connections between different platforms, using test tools to generate and send test messages, triggering the target application to execute tests based on corresponding method instances, solving the problem of the need to write different test scripts for different platforms in the prior art, and achieving efficient cross-platform testing applications.

CN119938542APending Publication Date: 2025-05-06BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing testing methods require developers to write different test scripts for different platforms, which are cumbersome and inefficient.

Method used

By establishing a communication connection between the first device and the second device, a test tool is used to generate a test message associated with the target application, instructs the target test method, and sends a test message to the target application to trigger the target application to perform the test based on the corresponding method instance. Different platforms correspond to different method instances.

Benefits of technology

It realizes unified testing of target applications on different platforms, reduces human resources consumption, improves the efficiency of testing applications, and meets the testing needs of developers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938542A_ABST
    Figure CN119938542A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to an application testing method and device, equipment and a storage medium. A method presented herein includes establishing communication between a test tool on a first device and a target application on a second device via a connection between the first device and the second device; generating a test message associated with the target application by the test tool, wherein the test message indicates the target test method; and sending a test message to the target application to trigger the target application to execute a test based on a method instance corresponding to the target test method, the method instance being associated with a target platform corresponding to the second device, and different platforms corresponding to different method instances. In this way, the consumption of human resources can be reduced, and the efficiency of testing the application is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for testing applications. Background Art

[0002] As network technology matures, more and more users use application software for social, entertainment, and learning activities. In order to ensure the continuous and stable operation of application software and the smooth launch of new application functions, application software developers need to test the application software. However, the existing testing methods require developers to write different test scripts for different platforms or different applications, which is cumbersome and inefficient. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for testing an application is provided. The method includes: establishing communication between a test tool on the first device and a target application on the second device via a connection between a first device and a second device; generating a test message associated with the target application by the test tool, the test message indicating a target test method; and sending the test message to the target application to trigger the target application to perform a test based on a method instance corresponding to the target test method, the method instance being associated with a target platform corresponding to the second device, and different platforms corresponding to different method instances.

[0004] In a second aspect of the present disclosure, a device for testing an application is provided. The device includes: a communication module configured to establish communication between a test tool on a first device and a target application on the second device via a connection between the first device and the second device; a generation module configured to generate a test message associated with the target application by the test tool, the test message indicating a target test method; and a creation module configured to send a test message to the target application to trigger the target application to perform a test based on a method instance corresponding to the target test method, the method instance being associated with a target platform corresponding to the second device, and different platforms corresponding to different method instances.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.

[0007] In a fifth aspect of the present disclosure, a computer program product is provided, which is tangibly stored in a computer storage medium and includes computer executable instructions, wherein when the computer executable instructions are executed by a device, the device implements the method of the first aspect.

[0008] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0010] Figure 1 A schematic diagram showing an example environment in which embodiments according to the present disclosure may be implemented;

[0011] Figure 2 A flowchart illustrating an example process for testing an application according to some embodiments of the present disclosure;

[0012] Figure 3 A flowchart illustrating an example process of testing an application according to some embodiments of the present disclosure;

[0013] Figure 4 A schematic structural block diagram showing an example apparatus for testing an application according to some embodiments of the present disclosure; and

[0014] Figure 5 A block diagram of an electronic device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0016] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.

[0017] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.

[0018] The embodiments of the present disclosure may involve user data, data acquisition and / or use, etc. These aspects are subject to the corresponding laws, regulations and relevant provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user knows and confirms. Accordingly, when implementing each embodiment of the present disclosure, the type, scope of use, usage scenario, etc. of the data or information that may be involved should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with the relevant laws and regulations. The specific notification and / or authorization method can vary according to the actual situation and application scenario, and the scope of the present disclosure is not limited in this respect.

[0019] In this specification and the embodiments, if personal information processing is involved, it will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or it is necessary to perform a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.

[0020] As mentioned above, with the increasing maturity of network technology, more and more users use application software for social, entertainment, and learning activities. In order to ensure the continuous and stable operation of application software and the smooth launch of new application functions, application software developers need to test the application software. However, the existing testing methods require developers to write different test scripts for different platforms, which is cumbersome and inefficient.

[0021] The embodiment of the present disclosure proposes a solution for testing an application. According to the solution, communication between a test tool on the first device and a target application on the second device can be established via a connection between the first device and the second device; a test message associated with the target application is generated by the test tool, the test message indicating a target test method; and the test message is sent to the target application to trigger the target application to perform a test based on a method instance corresponding to the target test method, the method instance being associated with a target platform corresponding to the second device, and different platforms corresponding to different method instances.

[0022] In this way, the embodiment of the present disclosure can generate a test message for the target application on the second device based on the test tool on the first device to indicate the target test method after the first device and the second device establish a communication connection. Further, the embodiment of the present disclosure can trigger the target application to perform a test based on the method instance corresponding to the test method based on sending a test message to the target application. In this way, the embodiment of the present disclosure can determine different method instances for different platforms to complete the test of the target application based on the corresponding method instance. Therefore, the present disclosure can complete the test of the target application in different platforms based on the test tool, thereby reducing the consumption of human resources, improving the efficiency of testing applications, and meeting the testing needs of developers.

[0023] Various example implementations of the solution are described in detail below in conjunction with the accompanying drawings.

[0024] Example Environment

[0025] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, example environment 100 may include a first device 110 and a second device 120 .

[0026] In the example environment 100, the first device 110 may run a test tool 115. The test tool 115 may include a test script. The test script may be used to test application software.

[0027] In this example environment 100, the second device 120 may run an application 125 that supports interface interaction. The application 120 may be any appropriate type of application for interface interaction, examples of which may include, but are not limited to, call applications, e-commerce applications, social applications, or other appropriate applications. The user may interact with the application 125 via the second device 120 and / or its attached device.

[0028] In some embodiments, the first device 110 and / or the second device 120 can be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, handheld computers, portable game terminals, VR / AR devices, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDA), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, game devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the electronic device 110 can also support any type of interface for the user (such as "wearable" circuits, etc.).

[0029] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.

[0030] In some embodiments, a communication connection may be established between the first device 110 and the second device 120. The communication connection may be established in a wired manner or a wireless manner. The communication connection may include, but is not limited to, a Bluetooth connection, a mobile network connection, a Universal Serial Bus (USB) connection, a Wireless Fidelity (WiFi) connection, etc., and the embodiments of the present disclosure are not limited in this respect. In an embodiment of the present disclosure, the first device 110 and the second device 120 may implement signaling interaction through a communication connection between the two.

[0031] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.

[0032] Sample test application

[0033] Figure 2 A flowchart of an example process 200 for creating and updating an element according to some embodiments of the present disclosure. The process 200 may be implemented at the electronic device 110. Figure 1 The process 200 is described below.

[0034] In some embodiments, Figure 2As shown, at 210, a communication connection may be established between the first device 110 and the second device 120. As an example, the communication connection may be established in a wired manner or a wireless manner. In some embodiments, the first device 110 and the second device 120 may be connected based on a Universal Serial Bus (USB) to achieve communication between the two.

[0035] In some embodiments, via the connection between the first device 110 and the second device 120, communication between the test tool 115 on the first device 110 and the application 125 (or referred to as the target application) on the second device 120 can be established. The target application can be an application based on a cross-platform framework. As an example, the cross-platform framework allows target applications in different platforms to be developed simultaneously based on the same set of codes. For example, for application 125, the cross-platform framework can simultaneously support running application 125 on platform A associated with operating system A and platform B associated with operating system B based on the same set of codes.

[0036] As an example, the testing tool 115 can communicate with applications of different platform frameworks. Further, the testing tool 115 can implement application testing under different platform frameworks through a unified test script.

[0037] At 220, in response to the communication being established, the first device 110 may send initialization information to the application 125 (or target application) of the second device 120 based on the test tool 115. As an example, the initialization information may include an identification (ID) assigned by the test tool 115 to the application 125. In this way, the test tool 115 may determine that the message originates from the application 125 in response to the identity being included in the received message.

[0038] At 230 , the application 125 in the second device 120 may send a registration message to the test tool 115 of the first device 110 in response to receiving the initialization information from the test tool 115 . As an example, the registration message may include an identity assigned to the application 125 by the test tool 115 .

[0039] As an example, the first device 110 may receive a registration message from a target application (eg, application 125) in response to communication being established. The registration message includes description information associated with an operating environment of the target application.

[0040] As an example, the description message may include the version of the target application.

[0041] Additionally, the description message may include a target platform corresponding to the second device 120. As an example, the target platform may correspond to an operating system. Different target platforms may correspond to different operating systems.

[0042] Alternatively, the registration message or description information may also include, for example, the name of the target application, the device name of the second device 120, the operating system version of the target platform, and / or the state of the target application, etc. As an example, the state of the target application may include, for example, a development state, an update state, and / or an operating state, etc.

[0043] In some embodiments, the testing method of the application 125 using the testing tool 115 may include two methods.

[0044] For example, the first test method may include, based on a test message generated by the test tool 115, sending the test message to the application 125, obtaining a response message corresponding to the test message, and completing the test of the application 125 based on the response message. The first test method may be called a synchronous test method.

[0045] For example, in the second test method, the application 125 may actively send a test message to the test tool 115. Further, the test tool 115 may complete the test on the application 125 based on the received test message. The second test method may be called an asynchronous test method.

[0046] First, the first test method (or called the synchronous test method) is described exemplarily.

[0047] In some implementations, the first device 110 may generate a test message associated with the target application by the test tool 115. The test message may indicate a target test method. As an example, the target test method may indicate a function to be detected (or referred to as a terminal capability) associated with the target application. Such functions to be detected may include, for example, a login function, a message sending function, a content presentation function, or other interactive capabilities.

[0048] As an example, the test message may include an identity assigned by the testing tool 115 to the application 125 .

[0049] In some embodiments, the test message may include a target message identifier for indicating the test message.

[0050] In some embodiments, the test message further indicates at least one test parameter associated with the target test method. As an example, the at least one test parameter may include a name of the end capability and a parameter for passing to the end capability. Taking the login function as an example, the name of the end capability may include a name associated with "login", and the parameter for passing to the end capability may include, for example, an account number and password used for login.

[0051] At 240, the first device 110 may send a test message to a target application (eg, application 125). The test message may trigger the target application to perform a test based on a method instance corresponding to the target test method. Additionally, at least one test parameter may be passed into the method instance to perform the test.

[0052] As an example, the method instance is associated with a target platform corresponding to the second device 120 .

[0053] In some embodiments, the method instances are implemented using a set of interfaces associated with the target platform.

[0054] As an example, the application 125 may determine the target test method indicated in the test message based on the received test message. In addition, the application 125 may determine a set of interfaces corresponding to the target platform. Further, the application 125 may implement a method instance corresponding to the target test method based on a set of interfaces.

[0055] As an example, before the application 125 is tested, the end capabilities associated with the application 125 need to be stored in the client message distribution center. In response to receiving the test message, the application 125 can call the corresponding end capabilities from the client distribution center based on a set of interfaces associated with the target platform to complete the method instance corresponding to the target test method.

[0056] At 250, the first device 110 may receive a response message from the target application (eg, application 125). The response message may include first test data associated with the test. As an example, the first test data may include execution data associated with the aforementioned method instance.

[0057] In some embodiments, the response message may include a target message identifier to indicate that the response message is a response to a test message associated with the target message identifier.

[0058] Next, the second test method (or asynchronous test method) is described exemplarily.

[0059] At 260, the first device 110 may receive a report message from a target application (e.g., application 125). The report message is sent by the target application independently of the message received from the test tool. That is, the report message is actively sent by the application 125 of the second device 120 to the test device 115 of the first device 110.

[0060] As an example, the report message may indicate the second data of the target application executing the test method. For example, the application 125 may send the execution data associated with the terminal capability to the test device 115 so that the test device 115 can monitor the operation of the application 125. It is worth noting that the report message does not contain any message identifier of the test message. That is, the report message is not a response to the test message. As an example, the application 125 may call the corresponding terminal capability from the client distribution center based on a set of interfaces associated with the target platform to execute the test method and obtain the corresponding second data.

[0061] In this way, the embodiment of the present disclosure can generate a test message for the target application on the second device based on the test tool on the first device after the first device and the second device establish a communication connection to indicate the target test method. Further, the embodiment of the present disclosure can trigger the target application to perform the test based on the method instance corresponding to the test method based on sending a test message to the target application. In addition, the embodiment of the present disclosure can also be implemented by the application of the second device directly sending a report message to the test tool of the first device to enable the test tool to monitor the application. In this way, the embodiment of the present disclosure can determine different method instances for different platforms to complete the test of the target application based on the corresponding method instance. In addition, the present disclosure can also monitor the running data of the application. Therefore, the present disclosure can complete the test of the target application of the cross-platform framework based on the same test script of the test tool, thereby reducing the consumption of human resources, improving the efficiency of the test application, and meeting the testing needs of the developers.

[0062] Example Process

[0063] Figure 3 FIG. 3 is a flow chart showing an example process 300 for testing an application according to some embodiments of the present disclosure. The process 300 may be implemented at the first device 110. Figure 1 The process 300 is described below.

[0064] like Figure 3 As shown, in block 310 , communication between a test tool on the first device 110 and a target application on the second device 120 is established via a connection between the first device 110 and the second device 120 .

[0065] In block 320 , the first device 110 generates a test message associated with the target application by a test tool, where the test message indicates a target test method.

[0066] In box 330, the first device 110 sends a test message to the target application to trigger the target application to perform a test based on a method instance corresponding to the target test method, where the method instance is associated with the target platform corresponding to the second device, and different platforms correspond to different method instances.

[0067] In some embodiments, the test message also indicates at least one test parameter associated with the target test method, and the at least one test parameter is passed into the method instance to perform the test.

[0068] In some embodiments, process 300 further includes: in response to communication being established, receiving a registration message from the target application, the registration message including description information associated with an operating environment of the target application.

[0069] In some embodiments, the description information includes at least one of the following: a version of the target application; and a target platform corresponding to the second device.

[0070] In some embodiments, process 300 also includes receiving a response message from the target application, the response message including first test data associated with the test.

[0071] In some embodiments, the test message includes a target message identification and the response message includes the target message identification.

[0072] In some embodiments, the method instances are implemented using a set of interfaces associated with the target platform.

[0073] In some embodiments, process 300 further includes receiving a report message from the target application, the report message being sent by the target application independently of the message received from the testing tool.

[0074] In some embodiments, the report message indicates that the target application executes the second test data of the test method.

[0075] Example devices and equipment

[0076] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 4 A schematic structural block diagram of an example apparatus 400 for testing an application according to some embodiments of the present disclosure is shown. The apparatus 400 may be implemented as or included in the electronic device 110. Each module / component in the apparatus 400 may be implemented by hardware, software, firmware, or any combination thereof.

[0077] like Figure 4As shown, the apparatus 400 includes: a communication module 410, configured to establish communication between a test tool on the first device and a target application on the second device via a connection between the first device and the second device; a generation module 420, configured to generate a test message associated with the target application by the test tool, the test message indicating a target test method; and a creation module 430, configured to send a test message to the target application to trigger the target application to perform a test based on a method instance corresponding to the target test method, the method instance being associated with a target platform corresponding to the second device, and different platforms corresponding to different method instances.

[0078] In some embodiments, the test message also indicates at least one test parameter associated with the target test method, and the at least one test parameter is passed into the method instance to perform the test.

[0079] In some embodiments, the apparatus 400 further includes a receiving module, the receiving module being configured to: in response to communication being established, receive a registration message from the target application, the registration message including description information associated with the operating environment of the target application.

[0080] In some embodiments, the description information includes at least one of the following: a version of the target application; and a target platform corresponding to the second device.

[0081] In some embodiments, the apparatus 400 further includes a response message module, the response message module being configured to: receive a response message from the target application, the response message including first test data associated with the test.

[0082] In some embodiments, the test message includes a target message identification and the response message includes the target message identification.

[0083] In some embodiments, the method instances are implemented using a set of interfaces associated with the target platform.

[0084] In some embodiments, the apparatus 400 further includes a report message module, the report message module being configured to: receive a report message from a target application, the report message being sent by the target application independently of a message received from the test tool.

[0085] In some embodiments, the report message indicates that the target application executes the second test data of the test method.

[0086] The units included in the device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units in the device 400 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0087] Figure 5 1 shows a block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 5 The electronic device 500 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 5 The electronic device 500 shown can be used to implement Figure 1 An electronic device 110.

[0088] like Figure 5 As shown, the electronic device 500 is in the form of a general electronic device. The components of the electronic device 500 may include, but are not limited to, one or more processors or processing units 510, a memory 520, a storage device 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. The processing unit 510 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 520. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 500.

[0089] The electronic device 500 typically includes a plurality of computer storage media. Such media may be any accessible media that is accessible to the electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 520 may be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 530 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data and may be accessed within the electronic device 500.

[0090] The electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 5 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 520 may include a computer program product 525 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0091] The communication unit 540 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 500 can be implemented in a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 500 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0092] The input device 550 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 560 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 500 may also communicate with one or more external devices (not shown) through the communication unit 540 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 500, or communicate with any device that allows the electronic device 500 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0093] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0094] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0095] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0096] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0097] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0098] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A method for testing an application, comprising: establishing, via a connection between a first device and a second device, communication between a test tool on the first device and a target application on the second device; generating, by the test tool, a test message associated with the target application, the test message indicating a target test method; as well as The test message is sent to the target application to trigger the target application to perform a test based on a method instance corresponding to the target test method, wherein the method instance is associated with a target platform corresponding to the second device, and different platforms correspond to different method instances. 2 . The method according to claim 1 , wherein the test message further indicates at least one test parameter associated with the target test method, and the at least one test parameter is passed into the method instance to perform the test.

3. The method according to claim 1, further comprising: In response to the communication being established, a registration message is received from the target application, the registration message including description information associated with an operating environment of the target application.

4. The method according to claim 3, wherein the description information includes at least one of the following: the version of the target application; The target platform corresponding to the second device.

5. The method according to claim 1, further comprising: A response message is received from the target application, the response message including first test data associated with the test. The method according to claim 5 , wherein the test message includes a target message identifier, and the response message includes the target message identifier.

7. The method of claim 1, wherein the method instance is implemented using a set of interfaces associated with the target platform.

8. The method according to claim 1, further comprising: A report message is received from the target application, the report message being sent by the target application independently of a message received from the testing tool. 9 . The method according to claim 8 , wherein the report message indicates second test data of the target application executing a test method.

10. An apparatus for testing an application, comprising: a communication module configured to establish communication between a test tool on the first device and a target application on the second device via a connection between the first device and the second device; a generating module configured to generate, by the testing tool, a test message associated with the target application, the test message indicating a target testing method; as well as A creation module is configured to send the test message to the target application to trigger the target application to perform a test based on a method instance corresponding to the target test method, wherein the method instance is associated with a target platform corresponding to the second device, and different platforms correspond to different method instances.

11. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 9 when executed by the at least one processing unit.

12. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 9.

13. A computer program product tangibly stored in a computer storage medium and comprising computer executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 9.