CN109947659B - System, method and apparatus for testing applications - Google Patents

System, method and apparatus for testing applications Download PDF

Info

Publication number
CN109947659B
CN109947659B CN201910280255.0A CN201910280255A CN109947659B CN 109947659 B CN109947659 B CN 109947659B CN 201910280255 A CN201910280255 A CN 201910280255A CN 109947659 B CN109947659 B CN 109947659B
Authority
CN
China
Prior art keywords
module
target application
processing
blocking
testing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910280255.0A
Other languages
Chinese (zh)
Other versions
CN109947659A (en
Inventor
宋立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910280255.0A priority Critical patent/CN109947659B/en
Publication of CN109947659A publication Critical patent/CN109947659A/en
Application granted granted Critical
Publication of CN109947659B publication Critical patent/CN109947659B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

Embodiments of the present disclosure disclose systems, methods, and apparatus for testing applications. One embodiment of the system comprises: the system comprises a client and a server which is in communication connection with the client, wherein the client comprises a first module and a second module for testing target applications; the second module responds to the detection of the blocking event of the test of the blocking target application and sends a processing request for requesting to process the blocking event to the server; the server side sends a processing instruction for indicating to process the blocking event to the first module according to the processing request; the first module processes the blocking event according to the processing instruction; the second module continues testing the target application in response to detecting that the blocking event processing is complete. The implementation mode realizes the timely processing of the blocking event, and reduces the testing period and the resource consumption in the testing process while ensuring the smooth execution of the test.

Description

System, method and apparatus for testing applications
Technical Field
Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a system, method, and apparatus for testing applications.
Background
Generally, a developed terminal application needs to be subjected to a strict test to ensure the reliability of a service provided by the terminal application before being on-line for a user. The method for testing the terminal application comprises manual testing, automatic testing and the like.
The manual testing method needs testers to test all aspects to be tested of the terminal application respectively, and generally consumes a great deal of manpower and material resources, and has low testing efficiency. Automated testing methods typically test end applications with some test framework in open source.
Disclosure of Invention
Embodiments of the present disclosure propose systems, methods, and apparatuses for testing applications.
In a first aspect, embodiments of the present disclosure provide a system for testing an application, the system comprising a client and a server communicatively connected to the client, wherein the client comprises a first module and a second module for testing a target application; the second module responds to the detection of the blocking event of the test of the blocking target application and sends a processing request for requesting to process the blocking event to the server; the server side sends a processing instruction for indicating to process the blocking event to the first module according to the processing request; the first module processes the blocking event according to the processing instruction; the second module continues testing the target application in response to detecting that the blocking event processing is complete.
In some embodiments, the blocking event includes an event that switches the target application to the background.
In some embodiments, the second module tests the target application using a proprietary application programming interface of an operating system to which the target application corresponds.
In some embodiments, the processing request includes indication information for indicating a result of the processing; and the processing instruction includes instruction information for indicating a processing result.
In a second aspect, embodiments of the present disclosure provide a method for testing an application, comprising: receiving a processing request which is included by the client and is sent by a second module for testing the target application in response to the detection of a blocking event, wherein the blocking event comprises an event for blocking the testing of the target application, and the processing request is used for requesting to process the blocking event; and sending a processing instruction to a first module included in the client according to the processing request, wherein the processing instruction is used for indicating the first module to process the blocking event according to the processing instruction.
In some embodiments, the blocking event includes an event that switches the target application to the background.
In some embodiments, the second module tests the target application using a proprietary application programming interface of an operating system to which the target application corresponds.
In some embodiments, the processing request includes indication information for indicating a result of the processing; and the processing instruction includes instruction information for indicating a processing result.
In a third aspect, embodiments of the present disclosure provide an apparatus for testing an application, the apparatus comprising: a receiving unit configured to receive a processing request, which is included in the client and is transmitted by a second module for testing the target application, in response to detection of a blocking event, wherein the blocking event includes an event blocking the testing of the target application, and the processing request is used for requesting processing of the blocking event; and the processing unit is configured to send a processing instruction to a first module included in the client according to the processing request, wherein the processing instruction is used for indicating the first module to process the blocking event according to the processing instruction.
In some embodiments, the blocking event includes an event that switches the target application to the background.
In some embodiments, the second module tests the target application using a proprietary application programming interface of an operating system to which the target application corresponds.
In some embodiments, the processing request includes indication information for indicating a result of the processing; and the processing instruction includes instruction information for indicating a processing result.
In a fourth aspect, embodiments of the present disclosure provide a client, wherein the client includes a first module and a second module for testing a target application; the second module responds to the detection of the blocking event of the test of the blocking target application and sends a processing request for requesting to process the blocking event to the server; the first module receives a processing instruction which is sent by the server side according to the processing request and used for indicating to process the blocking event, and processes the blocking event according to the processing instruction; the second module continues testing the target application in response to detecting that the blocking event processing is complete.
In a fifth aspect, embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage means for storing one or more programs; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described in any implementation of the second aspect.
In a sixth aspect, embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a method as described in any of the implementations of the second aspect.
The system, the method and the device for testing the application are provided by the embodiment of the disclosure, and the target application is tested through the second module of the client. When a blocking event which cannot be processed by the second module and is used for blocking the test occurs in the test process, the first module can be instructed to process the blocking event by communicating with the first module through the server side, so that the second module can continue to complete the test of the target application. In this way, the condition that the blocking process consumes resources due to the fact that some blocking events need to be found and manually processed by test personnel is avoided. Meanwhile, the method also avoids the conditions of overlong test period and overlarge resource consumption caused by repeated adjustment and retesting due to test breakdown caused by some blocking events. By timely processing the blocking event, the smooth execution of the test is ensured, and meanwhile, the test period and the resource consumption in the test process are reduced.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
FIG. 2 is a timing diagram of one embodiment of a system for testing applications according to the present disclosure;
FIG. 3 is a flow chart of one embodiment of a method for testing an application according to the present disclosure;
FIG. 4 is a schematic diagram of one application scenario of a method for testing an application according to an embodiment of the present disclosure;
FIG. 5 is a schematic structural view of one embodiment of an apparatus for testing applications according to the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates an exemplary architecture 100 to which embodiments of the system, method, or apparatus for testing applications of the present disclosure may be applied.
As shown in fig. 1, a system architecture 100 may include a terminal device 101 and a server 102. The terminal device 101 and the server 102 may be communicatively connected by a wired, wireless communication link or various connection types such as fiber optic cable. The terminal device 101 may be a client. The server 102 may be a server.
Various client applications may be installed on the terminal device 101. Such as a client application for developing applications, a client application for testing applications, a browser-like application, and so forth. The terminal device 101 may comprise a first module 1011 and a second module 1012 for testing applications. The first module 1011 and the second module 1012 may run on top of the operating system of the terminal device 101.
The terminal device 101 may be hardware or software. When the terminal device 101 is hardware, it may be a variety of electronic devices supporting test applications, including but not limited to smartphones, tablets, laptop and desktop computers, and the like. When the terminal apparatus 101 is software, it can be installed in the above-listed electronic apparatus. Which may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
The first module 1011 and the second module 1012 may be a plurality of software or software modules that can be installed in the terminal apparatus 101, or may be implemented as a single software or software module. The present invention is not particularly limited herein. For example, the first module 1011 and the second module 1012 may be client applications installed on the terminal device 101. As another example, the first module 1011 and the second module 1012 may be tools, frameworks, libraries, etc. that can be installed in the operating system of the terminal device 101 or in a client application installed on the terminal device 101.
The server 102 may be a server providing various services, such as a backend server providing support for target applications tested on the terminal device 101. The server 102 may be in communication with a first module 1011 and a second module 1012.
It should be noted that, the method for testing an application provided by the embodiment of the present disclosure is generally performed by the terminal device 101, and accordingly, the apparatus for testing an application is generally provided in the terminal device 101.
The server 102 may be hardware or software. When the server 102 is hardware, it may be implemented as a distributed server cluster formed by a plurality of servers, or as a single server. When server 102 is software, it may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services), or as a single software or software module. The present invention is not particularly limited herein.
It should be understood that the number of terminal devices, first modules, second modules and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, first modules, second modules, and servers, as desired for implementation.
With continued reference to fig. 2, a timing diagram 200 of one embodiment of a system for testing applications according to the present disclosure is shown.
The system for testing applications in an embodiment of the present application may include: a client (such as terminal device 101 shown in fig. 1) and a server (such as server 102 shown in fig. 1). Wherein the client may include a first module (e.g., first module 1011 shown in fig. 1) and a second module (e.g., second module 1012 shown in fig. 1). Wherein the second module may be used to test the target application. The first module may be used to handle various occlusion events.
As shown in fig. 2, in step 201, the second module sends a processing request for requesting processing of a blocking event to the server in response to detecting a blocking event blocking the testing of the target application.
In this embodiment, the target application may be any application developed by a technician. The second module may be installed at the client and used to test the target application. The second module may be some existing tool, framework, library, etc. that is open source for testing applications. The second module may also be an application, a plug-in, a component, a module, etc. developed by a technician for testing an application.
The process of performing the test may be different for a different second module. For example, the second module may be a test framework "WebDriverAgent", "app", "Calabash", etc. for testing mobile applications. At this time, the second module may perform various operations on the target application by communicating with the outside (e.g., a server side of the second module), thereby testing the target application.
Generally, such a test approach may be communicated with the outside to simulate relevant data to construct a corresponding test environment to test the target application. Taking the test of the login function of the target application as an example, the second module can test the login function by constructing data required for login such as a user name and the like and then simulating clicking login.
In some alternative implementations of the present embodiment, the second module may be a test framework "KIF (Keep it Function)", "EarlGrey", or the like for testing mobile applications. At this time, the second module may test the target application using a proprietary application programming interface (API, application Programming Interface) of the operating system to which the target application corresponds.
In general, the testing mode can simulate some user operations on the target application by calling some private APIs provided by the operating system corresponding to the target application, so that the mode can directly access tested codes of the target application, the testing process is simplified, and the testing efficiency is improved. Taking the test of the login function of the target application as an example, the second module may log in directly by calling the tested code for implementing the login function.
In this embodiment, the blocking event may refer to various events that cause the testing of the target application to be in a suspended state. For example, blocking events may include events such as network instability or insufficient memory. The blocking event may also include a pop event or the like that occurs during testing of the target application. For example, in the process of testing the video playing function of the target application, a popup window for prompting whether to switch the resolution is presented.
In some alternative implementations of the present embodiment, the blocking event may include an event that switches the target application to the background. Such as some system events of the operating system to which the target application corresponds that cause testing of the target application to be suspended. For example, a blocking event may include an event that occurs a rights bullet window. For example, a popup window for prompting to acquire certain authority (such as a camera function, a recording function, a positioning function, and a function of acquiring user information) appears in the test process. Blocking events may also include events that call or launch other applications during testing. For example, an event is selected during the test that opens the current page of the target application in another application.
In some optional implementations of the present embodiment, the processing request may include indication information for indicating a processing result. Wherein the processing result may refer to a processing result for a blocking event. For example, there are typically two options for a rights bullet that occurs during testing. One option may indicate approval of the authorization and another option may indicate denial of the authorization. In this case, the processing result may refer to agreement or denial of authorization.
In step 202, the server sends a processing instruction for indicating to process a blocking event to the first module according to the received processing request.
In this embodiment, the first module may be installed at the client and used to handle various blocking events. The first module may be some existing tool, framework, library, etc. that is capable of handling blocking events at the open source. The second module may also be an application, plug-in, component, module, etc. developed by the skilled person for handling blocking events.
It should be noted that the first module may also be used for testing the target application. I.e. the first module is also able to test the target application while being able to handle blocking events. In this embodiment only, the targets are tested by the second module, the first module being used only to handle blocking events. For example, the first module may be a test framework "WebDriverAgent", "app", "Calabash", etc. for testing mobile applications.
In some alternative implementations of the present embodiment, the processing instructions may include indication information for indicating the processing result.
In step 203, the first module processes the blocking event according to the received processing instruction.
It should be appreciated that the process of handling blocking events may be different for a different second module.
In step 204, the second module continues testing the target application in response to detecting that the blocking event processing is complete.
In this embodiment, the second module may periodically or sporadically determine whether the blocking event is processed. For example, the second module may determine whether the blocking event is complete by detecting the current state of the target application.
Taking the occurrence of a rights pop event as an example, in general, the target application needs to be granted a certain right to provide a corresponding related function. Thus, for an authorization window, it is often necessary to process the authorization window to grant the corresponding rights to the target application. In this case, the second module may determine whether the blocking event is completed by detecting whether the target application currently has the corresponding authority. If it is detected that the target application currently has the corresponding rights, then the blocking event may be considered to have been processed. Conversely, if it is detected that the target application does not currently have corresponding rights, then the blocking event may be considered as not yet processed.
After the current blocking event processing is completed, the first module may continue to test the target application down. Of course, in the subsequent test process, if a blocking event occurs in the blocking test, the blocking event can be processed by using the method described in this embodiment, so as to ensure that the target application cannot be tested or fails to be tested due to the blocking event in the test process.
When a blocking event for blocking a test, which cannot be processed by a second module for testing a target application, occurs in a test process, the system for testing an application provided by the embodiment of the present disclosure may communicate with the first module through a server to instruct the first module to process the blocking event, so that the second module may continue to complete the test of the target application. By the method, the condition that the blocking process consumes resources due to the fact that some blocking events need to be found and manually processed by test personnel is avoided. Meanwhile, the method also avoids the conditions of overlong test period and overlarge resource consumption caused by repeated adjustment and retesting due to test breakdown caused by some blocking events. By timely processing the blocking event, the smooth execution of the test is ensured, and meanwhile, the test period and the resource consumption in the test process are reduced.
With continued reference to fig. 3, a flow 300 of one embodiment of a method for testing an application according to the present disclosure is shown. The method for testing an application comprises the steps of:
in step 301, a processing request sent by a second module for testing a target application, which is included in the client, in response to detecting a blocking event, is received.
In this embodiment, an execution body of a method for testing an application (such as the server 102 shown in fig. 1) may receive a processing request transmitted from a client. Wherein the processing request may be used to request processing of a blocking event. The blocking event may include an event blocking the testing of the target application.
In this embodiment, the target application may be any application developed by a technician. The second module may be installed at the client and used to test the target application. The second module may be some existing tool, framework, library, etc. that is open source for testing applications. The second module may also be an application, a plug-in, a component, a module, etc. developed by a technician for testing an application.
The process of performing the test may be different for a different second module. For example, the second module may be a test framework "WebDriverAgent", "app", "Calabash", etc. for testing mobile applications. At this time, the second module may perform various operations on the target application by communicating with the outside (e.g., a server side of the second module), thereby testing the target application.
Generally, such a test approach may be communicated with the outside to simulate relevant data to construct a corresponding test environment to test the target application. Taking the test of the login function of the target application as an example, the second module can test the login function by constructing data required for login such as a user name and the like and then simulating clicking login.
In some alternative implementations of the present embodiment, the second module may be a test framework "KIF (Keep it Function)", "EarlGrey", or the like for testing mobile applications. At this time, the second module may test the target application using a proprietary application programming interface (API, application Programming Interface) of the operating system to which the target application corresponds.
In general, the testing mode can simulate some user operations on the target application by calling some private APIs provided by the operating system corresponding to the target application, so that the mode can directly access tested codes of the target application, the testing process is simplified, and the testing efficiency is improved. Taking the test of the login function of the target application as an example, the second module may log in directly by calling the tested code for implementing the login function.
In this embodiment, the blocking event may refer to various events that cause the testing of the target application to be in a suspended state. For example, blocking events may include events such as network instability or insufficient memory. The blocking event may also include a pop event or the like that occurs during testing of the target application. For example, in the process of testing the video playing function of the target application, a popup window for prompting whether to switch the resolution is presented.
In some alternative implementations of the present embodiment, the blocking event may include an event that switches the target application to the background. Such as some system events of the operating system to which the target application corresponds that cause testing of the target application to be suspended. For example, a blocking event may include an event that occurs a rights bullet window. For example, a popup window for prompting to acquire certain authority (such as a camera function, a recording function, a positioning function, and a function of acquiring user information) appears in the test process. Blocking events may also include events that call or launch other applications during testing. For example, an event is selected during the test that opens the current page of the target application in another application.
In some optional implementations of the present embodiment, the processing request may include indication information for indicating a processing result. Wherein the processing result may refer to a processing result for a blocking event. For example, there are typically two options for a rights bullet that occurs during testing. One option may indicate approval of the authorization and another option may indicate denial of the authorization. In this case, the processing result may refer to agreement or denial of authorization.
And step 302, according to the processing request, sending a processing instruction to a first module included in the client.
In this embodiment, the processing instruction may be configured to instruct the first module to process the blocking event according to the processing instruction.
In this embodiment, the first module may be installed at the client and used to handle various blocking events. The first module may be some existing tool, framework, library, etc. that is capable of handling blocking events at the open source. The second module may also be an application, plug-in, component, module, etc. developed by the skilled person for handling blocking events.
It should be noted that the first module may also be used for testing the target application. I.e. the first module is also able to test the target application while being able to handle blocking events. In this embodiment only, the targets are tested by the second module, the first module being used only to handle blocking events. For example, the first module may be a test framework "WebDriverAgent", "app", "Calabash", etc. for testing mobile applications.
In some alternative implementations of the present embodiment, the processing instructions may include indication information for indicating the processing result.
Further, the second module may periodically or sporadically determine whether the blocking event is processed. For example, the second module may determine whether the blocking event is complete by detecting the current state of the target application.
After the current blocking event processing is completed, the first module may continue to test the target application down. Of course, in the subsequent test process, if a blocking event occurs in the blocking test, the blocking event can be processed by using the method described in this embodiment, so as to ensure that the target application cannot be tested or fails to be tested due to the blocking event in the test process.
With continued reference to fig. 4, fig. 4 is a schematic diagram 400 of an application scenario of the method for testing according to the present embodiment. In the application scenario of fig. 4, a development tool (e.g., "Xcode") for developing a target application may be installed on the client 401. Meanwhile, a "KIF" framework 4011 (corresponding to the second module) and a "WebDriverAgent" framework 4012 (corresponding to the first module) for testing the target application can be installed using the development tool.
As shown at 402, the target application may be run by a simulator or the like that simulates the mobile device when testing the target application using the "KIF" framework 4011. During the test of the target application, if the authorization popup prompt needs to be "mobile phone address book authorization" (as shown by reference numeral 403 in the figure). At this time, since the "KIF" framework 4011 cannot handle such system events, the "KIF" framework 4011 can send a processing request containing information indicating "permission to authorize" to the server 404. The server 404 may send a processing instruction containing information indicating "grant authorization" to the "WebDriverAgent" framework 4012 based on the received processing request.
Thereafter, as shown at reference numeral 405, the "WebDriverAgent" framework 4012 can simulate clicking "allow" in a pop according to the processing instructions to process the current authorized pop. Further, the "KIF" framework 4011 may continue to test the target application after detecting that the target application has the call authority of the mobile phone address book.
The method provided by the embodiment of the disclosure tests the target application through the second module of the client. When a blocking event which cannot be processed by the second module and is used for blocking the test occurs in the test process, the first module can be instructed to process the blocking event by communicating with the first module through the server side, so that the second module can continue to complete the test of the target application. In this way, the condition that the blocking process consumes resources due to the fact that some blocking events need to be found and manually processed by test personnel is avoided. Meanwhile, the method also avoids the conditions of overlong test period and overlarge resource consumption caused by repeated adjustment and retesting due to test breakdown caused by some blocking events. By timely processing the blocking event, the smooth execution of the test is ensured, and meanwhile, the test period and the resource consumption in the test process are reduced.
With further reference to fig. 5, as an implementation of the method shown in the above figures, the present disclosure provides an embodiment of an apparatus for testing applications, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable in various electronic devices.
As shown in fig. 5, the apparatus 500 for testing an application provided in this embodiment includes a receiving unit 501 and a processing unit 502. Wherein the receiving unit 501 is configured to receive a processing request, which is included in the client and is sent by the second module for testing the target application, in response to detecting a blocking event, wherein the blocking event includes an event blocking the testing of the target application, and the processing request is used for requesting to process the blocking event; the processing unit 502 is configured to send a processing instruction to a first module included in the client according to the processing request, where the processing instruction is used to instruct the first module to process the blocking event according to the processing instruction.
In the present embodiment, in the apparatus 500 for testing an application: the specific processing of the receiving unit 501 and the processing unit 502 and the technical effects thereof may refer to the descriptions related to step 201 and step 202 in the corresponding embodiment of fig. 2, and are not repeated herein.
In some alternative implementations of the present embodiment, the blocking event includes an event that switches the target application to the background.
In some optional implementations of this embodiment, the second module tests the target application using a proprietary application programming interface of an operating system to which the target application corresponds.
In some optional implementations of the present embodiment, the processing request includes indication information for indicating a processing result; and the processing instruction includes instruction information for indicating a processing result.
The device provided by the above embodiment of the present disclosure receives, through a receiving unit, a processing request that is included in a client and is sent by a second module for testing a target application in response to detecting a blocking event, where the blocking event includes an event that blocks testing of the target application, and the processing request is used to request processing of the blocking event; the processing unit sends a processing instruction to a first module included in the client according to the processing request, wherein the processing instruction is used for indicating the first module to process the blocking event according to the processing instruction, so that the second module can continue to complete the test of the target application, and the condition that the blocking process consumes resources due to the fact that some blocking event needs to be found by testers and is processed manually is avoided. Meanwhile, the conditions of overlong test period and overlarge resource consumption caused by repeated adjustment and retesting due to test breakdown caused by some blocking events are avoided. By timely processing the blocking event, the smooth execution of the test is ensured, and meanwhile, the test period and the resource consumption in the test process are reduced.
A client suitable for implementing embodiments of the present disclosure, such as terminal device 101 in fig. 1, may include, but is not limited to, a mobile terminal such as a notebook computer, PAD (tablet computer), etc., and a fixed terminal such as a digital TV, desktop computer, etc. The client may include a first module and a second module for testing the target application.
The second module, in response to detecting a blocking event blocking the testing of the target application, may send a processing request to a server (e.g., server 102 in fig. 1) requesting processing of the blocking event. Then, a processing instruction sent by the server according to the processing request and used for indicating to process the blocking event can be received by the first module, and the blocking event is processed according to the processing instruction. The second module may then continue testing the target application in response to detecting that the blocking event processing is complete.
The first module (e.g., the first module 1011 in fig. 1) and the second module (e.g., the first module 1012 in fig. 1) may be a plurality of software or software modules that can be installed in a client, or may be implemented as a single software or software module. The present invention is not particularly limited herein. For example, the first module and the second module may be client applications installed on the client. As another example, the first module and the second module may be tools, frameworks, libraries, etc. that can be installed in the operating system of the client or in a client application installed on the client.
The specific process of implementing the test on the target application by the first module and the second module of the client may refer to the relevant content of the first module and the second module included in the client in the system for testing an application described in the corresponding embodiment of fig. 2, which is not described herein.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., server 102 of fig. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The server illustrated in fig. 6 is merely an example, and should not be construed as limiting the functionality and scope of use of the embodiments of the present disclosure in any way.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM602, and the RAM603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 6 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing means 601.
It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In an embodiment of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present disclosure, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a processing request which is included by the client and is sent by a second module for testing the target application in response to the detection of a blocking event, wherein the blocking event comprises an event for blocking the testing of the target application, and the processing request is used for requesting to process the blocking event; and sending a processing instruction to a first module included in the client according to the processing request, wherein the processing instruction is used for indicating the first module to process the blocking event according to the processing instruction.
Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments described in the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor includes a receiving unit and a processing unit. Wherein the names of these units do not constitute a limitation of the unit itself in some cases, for example, the receiving unit may also be described as "a unit that receives a processing request sent by the second module for the test target application in response to detecting a blocking event, which includes an event blocking the test of the target application, the processing request being for requesting processing of the blocking event".
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (9)

1. The system for testing the application comprises a client and a server which is in communication connection with the client, wherein the client comprises a first module for processing a blocking event and a second module for testing a target application, the first module comprises a WebDriverAGENT framework, the second module comprises a KIF framework, the second module uses a private application programming interface of an operating system corresponding to the target application to test the target application, and the second module completes the test of the target application through communication with the server;
The second module responds to the detection of a blocking event blocking the test of the target application and sends a processing request for requesting to process the blocking event to the server;
the server side sends a processing instruction for indicating to process the blocking event to the first module according to the processing request, wherein the processing request comprises indicating information for indicating a processing result;
the first module processes the blocking event according to the processing instruction;
the second module continues to test the target application in response to determining that the blocking event processing is completed by detecting the current state of the target application;
wherein the first module is also capable of testing the target application while being capable of handling blocking events.
2. The system of claim 1, wherein the blocking event comprises an event that switches the target application to the background.
3. The system according to claim 1 or 2, wherein the processing instruction includes instruction information for indicating a processing result.
4. A method for testing an application, comprising:
receiving a processing request which is included by a client and is sent by a second module for testing a target application in response to detection of a blocking event, wherein the blocking event comprises an event for blocking the testing of the target application, the processing request is used for requesting to process the blocking event, the second module comprises a KIF framework, the second module uses a private application programming interface of an operating system corresponding to the target application to test the target application, and the second module completes the testing of the target application through communication with a server, and the processing request comprises indication information for indicating a processing result;
According to the processing request, a processing instruction is sent to a first module included in the client, wherein the processing instruction is used for instructing the first module to process the blocking event according to the processing instruction, the first module comprises a WebDriverAgent framework, and the second module continues to test the target application in response to determining that the blocking event processing is completed by detecting the current state of the target application;
wherein the first module is also capable of testing the target application while being capable of handling blocking events.
5. The method of claim 4, wherein the blocking event comprises an event that switches the target application to the background.
6. An apparatus for testing an application, comprising:
a receiving unit configured to receive a processing request, which is included in a client and is used for testing a target application, sent by a second module in response to detection of a blocking event, wherein the blocking event includes an event for blocking the testing of the target application, the processing request is used for requesting to process the blocking event, the second module includes a KIF framework, the second module uses a private application programming interface of an operating system corresponding to the target application to test the target application, and the second module completes the testing of the target application by communicating with a server, and the processing request includes indication information for indicating a processing result;
And the processing unit is configured to send a processing instruction to a first module included in the client according to the processing request, wherein the processing instruction is used for instructing the first module to process the blocking event according to the processing instruction, the first module comprises a WebDriverAgent framework, and the second module is used for responding to the determination that the blocking event processing is completed by detecting the current state of the target application, and the first module can also test the target application while processing the blocking event.
7. A client, wherein the client comprises a first module for processing a blocking event and a second module for testing a target application, the first module comprises a WebDriverAgent framework, the second module comprises a KIF framework, the second module uses a private application programming interface of an operating system corresponding to the target application to test the target application, and the second module completes the test of the target application by communicating with a server;
the second module responds to the detection of a blocking event blocking the test of the target application and sends a processing request for requesting to process the blocking event to a server, wherein the processing request comprises indication information for indicating a processing result;
The first module receives a processing instruction which is sent by the server side according to the processing request and is used for indicating to process the blocking event, and processes the blocking event according to the processing instruction, wherein the first module can process the blocking event and can also test a target application;
the second module continues testing the target application in response to determining that the blocking event processing is complete by detecting a state in which the target application is currently located.
8. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, causes the one or more processors to implement the method of claim 4 or 5.
9. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of claim 4 or 5.
CN201910280255.0A 2019-04-09 2019-04-09 System, method and apparatus for testing applications Active CN109947659B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910280255.0A CN109947659B (en) 2019-04-09 2019-04-09 System, method and apparatus for testing applications

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910280255.0A CN109947659B (en) 2019-04-09 2019-04-09 System, method and apparatus for testing applications

Publications (2)

Publication Number Publication Date
CN109947659A CN109947659A (en) 2019-06-28
CN109947659B true CN109947659B (en) 2023-09-05

Family

ID=67014113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910280255.0A Active CN109947659B (en) 2019-04-09 2019-04-09 System, method and apparatus for testing applications

Country Status (1)

Country Link
CN (1) CN109947659B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502429B (en) * 2019-07-10 2023-04-25 平安普惠企业管理有限公司 Management method, device, equipment and storage medium of test system
CN110515850B (en) * 2019-08-29 2023-10-24 北京拉勾网络技术有限公司 Application program testing method, mobile terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183643A (en) * 2015-08-18 2015-12-23 惠州Tcl移动通信有限公司 Automatic testing interference preventing method and apparatus for Android mobile terminal
CN105786687A (en) * 2014-12-22 2016-07-20 博雅网络游戏开发(深圳)有限公司 Mobile application test method and device
CN108628657A (en) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 Pop-up processing method, device, computer equipment and storage medium
CN108959064A (en) * 2017-05-25 2018-12-07 腾讯科技(深圳)有限公司 The pop-up processing method and processing device of automatic test

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9064054B2 (en) * 2010-12-29 2015-06-23 Red Hat, Inc. Synchronizing execution of a testing application

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786687A (en) * 2014-12-22 2016-07-20 博雅网络游戏开发(深圳)有限公司 Mobile application test method and device
CN105183643A (en) * 2015-08-18 2015-12-23 惠州Tcl移动通信有限公司 Automatic testing interference preventing method and apparatus for Android mobile terminal
CN108959064A (en) * 2017-05-25 2018-12-07 腾讯科技(深圳)有限公司 The pop-up processing method and processing device of automatic test
CN108628657A (en) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 Pop-up processing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109947659A (en) 2019-06-28

Similar Documents

Publication Publication Date Title
CN109471647B (en) Data updating method and device, electronic equipment and readable medium
CN109947659B (en) System, method and apparatus for testing applications
CN113806212A (en) Application program exception positioning method and device and electronic equipment
CN109491908B (en) Page detection method and device, electronic equipment and storage medium
CN108959102B (en) Method and device for generating test data and testing application to be tested
CN113144620A (en) Detection method, device, platform, readable medium and equipment for frame synchronization game
CN110674050B (en) Memory out-of-range detection method and device, electronic equipment and computer storage medium
CN116662193A (en) Page testing method and device
CN112306857A (en) Method and apparatus for testing applications
CN111273967A (en) Remote hook setting method and device suitable for Android system and electronic equipment
CN113608997B (en) Remote debugging method and device for embedded webpage of application program and electronic equipment
CN111367783A (en) Application program testing method and device and electronic equipment
CN114328215A (en) Test data deployment method, device, equipment, readable storage medium and product
CN111625326A (en) Task pipeline execution method and device and electronic equipment
CN111310175A (en) iOS application safety monitoring and protecting method and device based on plug-in
CN115248772A (en) Interface testing method and device for software middleware
CN111831530A (en) Test method and device
CN111382058A (en) Service testing method and device, server and storage medium
CN113835995B (en) Method and device for generating test cases
CN110851150B (en) Method and apparatus for installing applications
CN111782410B (en) Lock jam monitoring method and device, electronic equipment and computer readable medium
CN110489341B (en) Test method and device, storage medium and electronic equipment
CN114693313B (en) Identification code-based warehousing equipment detection method and device, electronic equipment and medium
CN112311749B (en) Method and device for adding participating members and electronic equipment
CN109542921B (en) Data checking method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant