CN112948239B - Application program testing method, system, terminal equipment and computer storage medium - Google Patents

Application program testing method, system, terminal equipment and computer storage medium Download PDF

Info

Publication number
CN112948239B
CN112948239B CN202110152815.1A CN202110152815A CN112948239B CN 112948239 B CN112948239 B CN 112948239B CN 202110152815 A CN202110152815 A CN 202110152815A CN 112948239 B CN112948239 B CN 112948239B
Authority
CN
China
Prior art keywords
application program
instruction
server
interface
test
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
CN202110152815.1A
Other languages
Chinese (zh)
Other versions
CN112948239A (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.)
Shenzhen Renkai Network Technology Co ltd
Original Assignee
Shenzhen Renkai 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 Shenzhen Renkai Network Technology Co ltd filed Critical Shenzhen Renkai Network Technology Co ltd
Priority to CN202110152815.1A priority Critical patent/CN112948239B/en
Publication of CN112948239A publication Critical patent/CN112948239A/en
Application granted granted Critical
Publication of CN112948239B publication Critical patent/CN112948239B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of application program testing, and discloses a method, a system, terminal equipment and a computer storage medium for testing an application program. According to the method for testing the application program, a testing tool interface of the application program is output according to an interface calling instruction through terminal equipment provided with the application program to be tested, wherein an environment switching control is configured on the testing tool interface and is associated with other server environments different from the current server environment; and acquiring a server environment switching instruction triggered based on the environment switching control, and switching the current server environment to the other server environments according to the server environment switching instruction so as to test the application program under the other server environments. The invention can greatly simplify the operation of switching the server environment test application program, and shorten the time consumption of the server environment switching, thereby improving the test efficiency of the application program.

Description

Application program testing method, system, terminal equipment and computer storage medium
Technical Field
The present invention relates to the field of application testing technologies, and in particular, to a method, a system, a terminal device, and a computer storage medium for testing an application.
Background
Application program (foreign language name App, application) is a main means installed on terminal equipment to perfect the deficiency and individuation of the original system of the terminal equipment, so that the terminal equipment perfects the functions thereof and provides richer use experience for users. Currently, before an application program is formally released to a user, a functional test must be performed to ensure that a problem does not exist after the function of the application program is formally released, and in the process of performing the functional test on the application program, various server environments such as development, test and formally switching test are often required.
When the switching test of different server environments is carried out on application programs, the code is modified to compile the application programs in the current server environment into program packages, then the program packages are downloaded to the target server environment needing the switching test for reinstallation, and then the test is started, so that the switching test process of the whole server environment at least needs to be subjected to the processes of code modification, program compiling, program packing, uploading, downloading and installation, and the operation is complex and the switching time is long.
In summary, the existing switching test for different server environments is performed on an application program, which is complex in operation and long in time consumption, resulting in low testing efficiency of the application program.
Disclosure of Invention
The invention mainly aims to provide a test method, a test system, terminal equipment and a computer storage medium of an application program, and aims to solve the technical problems that the conventional method for switching test of different server environments aiming at the application program is complex in operation and long in time consumption, so that the test efficiency of the application program is low.
In order to achieve the above object, the present invention provides a method for testing an application program, where the method for testing an application program is applied to a terminal device, and an application program to be tested is installed on the terminal device, and the method for testing an application program includes:
outputting a testing tool interface of the application program according to an interface calling instruction, wherein an environment switching control is configured on the testing tool interface and is associated with other server environments different from the current server environment;
And acquiring a server environment switching instruction triggered based on the environment switching control, and switching the current server environment to the other server environments according to the server environment switching instruction so as to test the application program under the other server environments.
Optionally, the step of acquiring a server environment switching instruction triggered based on the environment switching control includes:
Monitoring an instruction triggering event input based on the environment switching control, and analyzing instruction content carried by the instruction triggering event;
And packaging the instruction content and environment identifiers of other server environments associated with the environment switching control to generate a server environment switching instruction, and acquiring the server environment switching instruction.
Optionally, the instruction content includes a switching time of a server environment, and the step of switching the current server environment to the other server environments according to the server environment switching instruction further includes:
and when the current time is detected to reach the switching time, switching the current server environment to other server environments corresponding to the environment identifier.
Optionally, the terminal device is configured with a testing tool for assisting in testing the application program, and before the step of outputting the testing tool interface of the application program according to the interface calling instruction, the method further includes:
and triggering an interface calling instruction of the testing tool when an instruction triggering event input based on the calling control of the testing tool is monitored.
Optionally, the method for testing an application program further includes:
and displaying the service request parameters of the application program on the test tool interface.
Optionally, the test tool interface is further configured with a view control of service request parameters, where the service request parameters include a request interface and parameter content corresponding to the request interface, and the step of displaying the service request parameters of the application program on the test tool interface includes:
when an instruction triggering event input based on the check control is monitored, extracting all request interfaces of the application program and respective parameter contents of all request interfaces;
and generating a parameter display list on the test tool interface, and filling all the request interfaces and the parameter content into the parameter display list for associated display.
Optionally, after the step of filling all the requests and the parameter contents in the parameter presentation list for associated presentation, the method further includes:
And outputting detailed interface return data of the request interface pointed by the selection instruction when the selection instruction triggered based on the parameter display list is detected.
In addition, in order to achieve the above object, the present invention further provides a test system for an application program, where the test system for an application program is applied to a terminal device, and an application program to be tested is installed on the terminal device, and the test system for an application program includes:
The interface output module is used for outputting a test tool interface of the application program according to an interface calling instruction, wherein an environment switching control is configured on the test tool interface and is associated with other server environments different from the current server environment;
And the test environment switching module is used for acquiring a server environment switching instruction triggered based on the environment switching control, and switching the current server environment to the other server environments according to the server environment switching instruction so as to test the application program under the other server environments.
The invention also provides the steps of the method for testing the application program, which are realized by each functional module of the system for testing the application program when the functional module runs.
In addition, to achieve the above object, the present invention also provides a terminal device including: the system comprises a memory, a processor and a test program of an application program stored on the memory and capable of running on the processor, wherein the test program of the application program is executed by the processor to realize the steps of the test method of the application program.
In addition, in order to achieve the above object, the present invention also provides a computer storage medium having stored thereon a test program of an application program, which when executed by a processor, implements the steps of the test method of an application program as described above.
The invention provides a testing method, a testing system, terminal equipment and a computer storage medium of an application program, wherein a testing tool interface of the application program is output according to an interface calling instruction through the terminal equipment of the application program to be tested, and an environment switching control is configured on the testing tool interface and is associated with other server environments different from the current server environment; and acquiring a server environment switching instruction triggered based on the environment switching control, and switching the current server environment to the other server environments according to the server environment switching instruction so as to test the application program under the other server environments.
Under the condition that a server environment needs to be switched to test an application program before the application program is on line, a terminal device provided with the application program to be tested outputs a test tool interface for assisting in testing the application program according to an interface calling instruction, the test tool interface is provided with environment switching controls for controlling the switching of the application program to test the server environment, the environment switching controls are respectively associated with other server environments which are different from the current server environment in which the application program is tested at the current moment, finally, the terminal device obtains a server environment switching instruction triggered by an application program development staff based on the environment switching controls, and correspondingly switches the current server environment of the application program to other server environments associated with the environment switching controls according to the server environment switching instruction, so that the application program can continue testing under the other server environments.
Compared with the traditional mode of switching the server environment based on modifying codes, compiling programs, packing and uploading programs and downloading programs to test the application programs, the method and the device can be used for realizing switching the server environment to test the application programs based on the simple command control and the different server environments and then according to the server environment switching command triggered based on the command control, so that the processes of code modification, program compiling, packing, uploading programs and downloading and installing programs are not needed, the operation of switching the server environment to test the application programs is simplified to a great extent, the environment switching time is shortened, and the testing efficiency of the application programs is improved.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a testing method of an application program according to a first embodiment of the present invention;
FIG. 3 is a functional block diagram of an embodiment of a testing system for an application program according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic device structure diagram of a hardware running environment according to an embodiment of the present invention.
The terminal device of the embodiment of the invention can be a device which is specially used by application program development staff to install an online application program to perform functional test on the application program, and the device can be a smart phone, a PC (Personal Computer ), a tablet computer, a portable computer and the like.
As shown in fig. 1, the terminal device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the terminal device structure shown in fig. 1 is not limiting of the terminal device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a type of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a test program for an application program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client and communicating data with the client; and the processor 1001 may be used to call a test program of the application program stored in the memory 1005 and perform the following operations:
outputting a testing tool interface of the application program according to an interface calling instruction, wherein an environment switching control is configured on the testing tool interface and is associated with other server environments different from the current server environment;
And acquiring a server environment switching instruction triggered based on the environment switching control, and switching the current server environment to the other server environments according to the server environment switching instruction so as to test the application program under the other server environments.
Further, the processor 1001 may call a test program of the application program stored in the memory 1005, and further perform the following operations:
Monitoring an instruction triggering event input based on the environment switching control, and analyzing instruction content carried by the instruction triggering event;
And packaging the instruction content and environment identifiers of other server environments associated with the environment switching control to generate a server environment switching instruction, and acquiring the server environment switching instruction.
Further, the instruction content includes a switching time of the server environment, and the processor 1001 may call a test program of the application program stored in the memory 1005, and further perform the following operations:
and when the current time is detected to reach the switching time, switching the current server environment to other server environments corresponding to the environment identifier.
Further, the terminal device is provided with a test tool for assisting in testing the application program, and the processor 1001 may call the test program of the application program stored in the memory 1005, and before executing the step of outputting the test tool interface of the application program according to the interface call instruction, further execute the following operations:
and triggering an interface calling instruction of the testing tool when an instruction triggering event input based on the calling control of the testing tool is monitored.
Further, the processor 1001 may call a test program of the application program stored in the memory 1005, and further perform the following operations:
and displaying the service request parameters of the application program on the test tool interface.
Further, the test tool interface is further configured with a view control of service request parameters, where the service request parameters include a request interface and parameter content corresponding to the request interface, and the processor 1001 may call a test program of the application program stored in the memory 1005, and further perform the following operations:
when an instruction triggering event input based on the check control is monitored, extracting all request interfaces of the application program and respective parameter contents of all request interfaces;
and generating a parameter display list on the test tool interface, and filling all the request interfaces and the parameter content into the parameter display list for associated display.
Further, the processor 1001 may call the test program of the application program stored in the memory 1005, and after performing the step of filling all the requests and the parameter contents in the parameter presentation list for association presentation, further perform the following operations:
And outputting detailed interface return data of the request interface pointed by the selection instruction when the selection instruction triggered based on the parameter display list is detected.
Based on the above hardware structure, various embodiments of the test method of the application program of the present invention are presented.
It should be noted that, the application program is a main means of installing on the terminal device, improving the deficiency and individuation of the original system of the terminal device, so that the terminal device improves its functions and provides a richer use experience for the user. Currently, before an application program is formally released to a user, a functional test must be performed to ensure that a problem does not exist after the function of the application program is formally released, and in the process of performing the functional test on the application program, various server environments such as development, test and formally switching test are often required.
When the switching test of different server environments is carried out on application programs, the code is modified to compile the application programs in the current server environment into program packages, then the program packages are downloaded to the target server environment needing the switching test for reinstallation, and then the test is started, so that the switching test process of the whole server environment at least needs to be subjected to the processes of code modification, program compiling, program packing, uploading, downloading and installation, and the operation is complex and the switching time is long.
In summary, the existing switching test for different server environments is performed on an application program, which is complex in operation and long in time consumption, resulting in low testing efficiency of the application program.
Aiming at the phenomenon, the invention provides a testing method of an application program to solve the technical problems of low testing efficiency of the application program caused by complex operation and long time consumption in the prior art of switching testing of different server environments aiming at the application program. Referring to fig. 2, fig. 2 is a flowchart illustrating a testing method of an application program according to a first embodiment of the present invention.
In this embodiment, the method for testing an application program includes:
Step S10, outputting a test tool interface of the application program according to an interface calling instruction, wherein an environment switching control is configured on the test tool interface and is associated with other server environments different from the current server environment;
The terminal equipment provided with the application program to be tested outputs a test tool interface for carrying out test assistance on the application program according to an interface calling instruction, wherein an environment switching control for controlling the switching of the application program test server environment is configured on the test tool interface, and the environment switching control is respectively associated with other server environments which are different from the current server environment of the application program to be tested at the current moment.
In this embodiment, the server environment may specifically include a development server, a test server, and a formal server, which each provide an interface for an application to be tested to serve its normal running environment (hereinafter, simply referred to as a development server environment, a test server environment, and a formal server environment, respectively). In addition, the plurality of environment switching controls can be configured on the test tool interface, and each environment switching control respectively establishes a one-to-one association relationship with one other server environment. Specifically, for example, when the terminal device provides an interface service for an application to be tested with respect to a development server connected at the current moment, on a test tool interface for performing test assistance on the application, which is output according to an interface calling instruction, the terminal device may be configured with two environment switching controls, namely, an environment switching control 1 and an environment switching control 2, for controlling and switching an application test server environment, where the environment switching control 1 may establish a one-to-one association relationship with the test server environment (or a formal server environment), and the environment switching control 2 may establish a one-to-one association relationship with the formal server environment (or the test server environment).
Further, it should be noted that, in this embodiment, the environment switching control may be specifically configured on the test tool interface by a developer of the application program through a code form, and an association relationship between the environment switching control and the server environment in a one-to-one correspondence manner is established. It should be understood that, based on different design requirements of practical applications, in different possible embodiments, a developer may, of course, use different code modes to configure an environment switching control and establish an association relationship between the environment switching control and a server environment.
Further, in a possible embodiment, in the step S10, a test tool interface of the application program is output according to an interface calling instruction, where the test tool interface is configured with an environment switching control, and before the environment switching control is associated with another server environment different from the current server environment, the test method of the application program of the present invention may further include:
and step S30, triggering an interface calling instruction of the test tool when a command triggering event input based on the calling control of the test tool is monitored.
It should be noted that, in this embodiment, the terminal device on which the application program to be tested is already installed is preconfigured with a testing tool for assisting in testing the application program, where the testing tool may be specifically developed by a developer separately and installed on the terminal device, so as to assist the developer in performing service environment switching, recording service request parameters of the application program, and the like in a process of testing the application program before being online, and the testing tool may be configured to run continuously during the whole testing process of the application program based on development. It should be understood that, based on different design requirements of practical applications, in different possible embodiments, a developer may specifically develop different types of testing tools to assist in performing a testing process on an application program before being online, and the testing method of the application program of the present invention is not limited to the specific development process of the testing tools and the specific implementation principle for assisting in testing the application program before being online.
In addition, it should be noted that, in this embodiment, the instruction triggering event may be specifically a touch point pressing instruction control or a voice content triggered by inputting control to select the instruction control, etc., it should be understood that, based on different design requirements of practical application, in different feasible embodiments, the terminal device may of course use different instruction triggering events based on the instruction control to trigger the corresponding instruction, and the test method of the application program of the present invention is not limited to the specific type of the instruction triggering event.
After the terminal equipment provided with the application program to be tested is provided with the test tool for assisting in testing the application program, the terminal equipment continuously runs in the whole test process of the application program and generates a calling control for calling the interface of the test tool, so that when the terminal equipment monitors an instruction triggering event input based on the calling control, the terminal equipment immediately triggers the interface calling instruction of the test tool to output the interface of the test tool which is provided with the environment switching control and is used for assisting in testing the application program according to the interface calling instruction.
Specifically, for example, after the terminal device installs the test tool, in the process of starting the application program before the online operation to test the application program, continuously operating the test tool and generating and displaying a call control for calling the test tool interface in a floating window form on any display interface of the application program, thereby, when receiving an instruction triggering event that a developer clicks the call control based on the touch input by the call control, immediately triggering an interface call instruction for calling the test tool interface for interaction of the developer by the test tool, and then, the terminal device can output and display the test tool interface in a floating window form on any application interface of the application program which is displayed at the current moment based on the interface call instruction, so that the developer can utilize the preset environment switching control on the test tool interface to perform the test process after the application program switches different server environments.
And step S20, acquiring a server environment switching instruction triggered based on the environment switching control, and switching the current server environment to the other server environments according to the server environment switching instruction so as to test the application program under the other server environments.
After outputting a testing tool interface configured with an environment switching control according to an interface calling instruction, the terminal equipment starts to monitor development staff of an application program to be tested, acquires a server environment switching instruction triggered based on the time when the instruction triggering event is monitored based on an instruction triggering event input by the environment switching control, correspondingly switches the current server environment of the application program tested at the current moment to other server environments associated with the environment switching control according to the server environment switching instruction, and enables the application program to continue testing under the other server environments.
Further, in a possible embodiment, in the step S20, the step of "obtaining the server environment switching instruction triggered by the environment switching control" may include:
Step S201, monitoring an instruction triggering event input based on the environment switching control, and analyzing instruction content carried by the instruction triggering event;
it should be noted that, in this embodiment, when the developer inputs the command triggering event based on the environment switching control, the developer may synchronously input the command content for controlling the server environment switching based on the event triggering server environment switching command, and it should be understood that, based on different design needs of the actual application, in different possible embodiments, the developer may naturally input different command content to control the server environment switching, and the test method of the application program of the present invention is not specifically limited to the specific implementation of the command content.
After outputting a testing tool interface configured with an environment switching control according to an interface invoking instruction, the terminal equipment starts to monitor a developer of an application program to be tested, based on an instruction triggering event input by the environment switching control, and immediately analyzes the instruction triggering event when the instruction triggering event is monitored to obtain instruction content which is synchronously input by the developer when the instruction triggering event is input and is used for controlling the server environment switching based on the event triggering server environment switching instruction.
Specifically, for example, after the terminal device outputs a test tool interface for performing test assistance on an application program according to an interface calling instruction, when a developer of the application program switches a control 1 according to an environment configured by the test tool interface to trigger an instruction triggering event based on the touch point, a piece of time data is synchronously selected and input as instruction content, so that when the terminal device monitors the instruction triggering event, the terminal device immediately analyzes the instruction triggering event by adopting any mature command analysis technology, thereby analyzing and acquiring the time data input by the developer.
Step S202, packaging the instruction content and environment identifiers of other server environments associated with the environment switching control to generate a server environment switching instruction, and acquiring the server environment switching instruction.
After analyzing an instruction triggering event triggered by a developer based on the environment switching control, the terminal equipment determines other server environments associated with the environment switching control and packages the environment identifiers of the other server environments and the instruction content together into a server environment switching instruction, and acquires and stores the server environment switching instruction.
Specifically, for example, after analyzing and obtaining time data input by a developer, the terminal device first establishes a one-to-one association relationship between the environment switching control 1 and a test server environment (or a formal server environment), further obtains an environment identifier, namely a test service (or a formal service), of the test server environment (or the formal server environment) associated with the environment switching control 1, and then encapsulates the time data and the obtained environment identifier to generate a server environment switching instruction capable of controlling server environment switching, and obtains the instruction for storage, so that the subsequent test of an application program is performed by controlling the switching server environment according to the instruction.
Further, in a possible embodiment, the step of "switching the current server environment to the other server environment according to the server environment switching instruction" in the above step S20 may include:
and step S203, when the current time reaches the switching time, switching the current server environment to other server environments corresponding to the environment identifier.
In this embodiment, the switching time may be specifically time data input by the developer.
After the terminal equipment acquires the server environment switching instruction stored in the environment identifier packaged with the server environment and the instruction content input by the development staff, the terminal equipment starts to detect the current time of the system, and immediately controls the current server environment which provides a service interface for the test of the application program at the current time to be directly switched to other server environments corresponding to the environment identifier when the current time reaches the time indicated by the time data, so that the terminal equipment provides the service interface for the test of the application program in the subsequent server environments.
Specifically, for example, assume that in a server environment switching instruction acquired and stored by a terminal device, an environment identifier of another server environment associated with the packaged environment switching control 1 is "test service" (corresponding to a test server environment), and time data input by a developer of a packaged application program to be tested is "00:00", when detecting that the current time of the system reaches "00:00", the terminal device immediately controls the development server environment that is currently providing a service interface for the application program to be directly switched to the test server environment corresponding to the environment identifier-test service, so that after the application program is restarted under the test server environment, the application program can be directly tested based on the service interface provided by the terminal device under the test server environment.
According to the method for testing the application program, through the terminal equipment provided with the application program to be tested, a testing tool interface for testing assistance of the application program is output according to an interface calling instruction, an environment switching control for controlling and switching the environment of a testing server of the application program is configured on the testing tool interface, and the environment switching control is respectively associated with other server environments which are different from the current server environment of the application program for testing at the current moment; after outputting a testing tool interface configured with an environment switching control according to an interface calling instruction, the terminal equipment starts to monitor development staff of an application program to be tested, acquires a server environment switching instruction triggered based on the time when the instruction triggering event is monitored based on an instruction triggering event input by the environment switching control, correspondingly switches the current server environment of the application program tested at the current moment to other server environments associated with the environment switching control according to the server environment switching instruction, and enables the application program to continue testing under the other server environments.
Compared with the traditional mode of switching the server environment based on modifying codes, compiling programs, packing and uploading programs and downloading programs to test the application programs, the method and the device can be used for realizing switching the server environment to test the application programs based on the simple command control and the different server environments and then according to the server environment switching command triggered based on the command control, so that the processes of code modification, program compiling, packing, uploading programs and downloading and installing programs are not needed, the operation of switching the server environment to test the application programs is simplified to a great extent, the environment switching time is shortened, and the testing efficiency of the application programs is improved.
Further, based on the above first embodiment, a second embodiment of the test method for an application program of the present invention is provided, and in this embodiment, the test method for an application program of the present invention may further include:
and step S40, displaying the service request parameters of the application program on the test tool interface.
In this embodiment, because the interface return data terminal device of the server for the service request cannot be directly displayed when the application is operated by the developer to request the server to provide the service in the test process of the application, in the prior art, the developer only needs to manually search each interface provided by the server one by one under the condition that the developer needs to check the interface return data, so that the interface return data is screened out for analysis, and the whole process is very time-consuming.
In addition, it should be noted that, in this embodiment, the service request parameter includes a request interface when the application program initiates a service request to the background server in the current server environment, and the parameter content returned by the background server through the request interface for the service request, where the terminal device continuously records the request interface when the application program initiates the service request to the background server in the process of providing the service interface for the test of the application program based on any server environment, and the background server returns data based on the parameter content and the detailed interface returned by the request interface.
In the process that the terminal equipment provides a service interface for testing of the application program based on any server environment, once an instruction triggered by a developer based on the requirement of data returned by a check interface is detected, the application program immediately initiates a request interface when a service request is sent to a background server in the current server environment, and the background server outputs and displays the parameter content returned by the request interface based on the parameter content, so that the developer can directly check and analyze the parameter content.
Further, in a possible embodiment, in addition to the above-mentioned processing and configuring one or more environment switching controls on the test tool interface, a view control of the service request parameter may be configured in the same manner as the environment switching control is configured. Step S40, displaying the service request parameters of the application program on the test tool interface may include:
Step S401, when an instruction triggering event input based on the view control is monitored, extracting all request interfaces of the application program and respective parameter contents of all request interfaces;
When monitoring a development staff of an application program to be tested, the terminal equipment immediately determines a background server for providing service for the application program in the current server environment based on a requirement of checking and analyzing data returned by a server interface and utilizing a checking control input instruction trigger event configured on a test tool interface, and extracts all request interfaces for initiating service requests to the background server by the application program and parameter contents returned by all request interfaces.
Specifically, for example, assume that a terminal device is currently in a development server environment, and a service interface is provided for testing of an application program based on a development server. When the terminal equipment monitors that a developer clicks an instruction trigger event input by clicking a view control based on the view control configured on the test tool interface, the terminal equipment immediately determines that a background server providing service for the application program at the current moment is the development server, and the terminal equipment extracts all request interfaces of the application program for initiating service requests to the development server and extracts parameter contents returned by all request interfaces one by one.
And step S402, generating a parameter display list on the test tool interface, and filling all the request interfaces and the parameter content into the parameter display list for associated display.
After the terminal equipment extracts all the request interfaces and the parameter contents returned by all the request interfaces, the terminal equipment further generates a parameter display list on the test tool interface, and sequentially fills the parameter contents of all the request interfaces and the request interfaces into the parameter display list correspondingly, and after filling of all the request interfaces and the parameter contents is completed, the parameter display list is output.
Specifically, for example, on a test tool interface, the terminal device generates a parameter display list by using a request interface and a parameter content as headers, and then sequentially fills all the request interfaces into each cell corresponding to the request interface, and sequentially fills the respective parameter content of all the request interfaces into each cell corresponding to the parameter content so as to perform associated display on the request interfaces and the parameters, so that a developer of an application program can intuitively check the parameter content returned by all the request interfaces and all the request interfaces.
Further, in a possible embodiment, after the step of "filling all the request interfaces and the parameter contents in the parameter presentation list to perform association presentation" in step S402, the method for testing an application program of the present invention may further include:
And step A, outputting detailed interface return data of the request interface pointed by the selection instruction when the selection instruction triggered based on the parameter display list is detected.
It should be noted that, in this embodiment, the terminal device may also configure all the cells filled with the request interface in the parameter display list as instruction controls in the same manner as the environment switching controls are configured, so that the developer may trigger the selection instruction.
After the terminal equipment uses the parameter display list to aim at all request interfaces and the respective parameter content of all request interfaces, if detecting that a developer triggers a selection instruction based on the cell filling the request interface in the parameter display list, the terminal equipment further outputs detailed interface return data of the request interface selected by the selection instruction so as to enable the developer to check the detailed interface return data to carry out test analysis of the application program.
Specifically, for example, assume that there are 5 cells filled with the request interface on the parameter display list output by the terminal device, and the terminal device has previously configured the 5 cells as command controls capable of triggering the selection command, so when detecting that the developer of the application program to be tested clicks the cell 3 in each of the 5 cells by touching to trigger the selection command, the terminal device immediately extracts detailed interface return data of the request interface filled in the cell 3, and then outputs the detailed interface return data in a floating window form for viewing and analysis by the developer.
In this embodiment, in the testing process for the application program, when the application program is operated by the developer to request the server to provide the service, the interface return data terminal device of the server for the service request cannot be directly displayed, so in the prior art, the developer only can search each interface provided by the server one by one in a manual manner under the condition that the developer needs to check the interface return data, and therefore the interface return data is screened out for analysis, and the whole process is very time-consuming.
In this way, in the method for testing the application program, when the developer of the application program to be tested is monitored, based on the requirement of checking and analyzing the return data of the server interface, and when a command trigger event is input by using the checking control configured on the testing tool interface, the terminal equipment immediately determines a background server for providing service for the application program in the current server environment, and extracts all request interfaces for initiating service requests to the background server by the application program and parameter contents returned by all request interfaces; after the terminal equipment extracts all the request interfaces and the parameter contents returned by all the request interfaces, the terminal equipment further generates a parameter display list on the test tool interface, and sequentially fills the parameter contents of all the request interfaces and the request interfaces into the parameter display list correspondingly, and after filling of all the request interfaces and the parameter contents is completed, the parameter display list is output.
After the parameter display list is used for all the request interfaces and the respective parameter content of all the request interfaces, if detecting that the developer triggers a selection instruction based on the cell filling the request interface in the parameter display list, the terminal device further outputs detailed interface return data of the request interface selected by the selection instruction, so that the developer can check the detailed interface return data to perform test analysis of the application program.
Compared with the traditional method of searching each interface provided by the server one by one based on manual operation, the method screens out the mode of analyzing the interface return data, directly displays the interface and the interface parameter output to development staff in a list form, and further outputs the detailed interface return data of the display request interface based on the operation of the development staff for the development staff to carry out the test analysis of the application program, thereby avoiding the situation that a great amount of time is required for manually inquiring the interfaces one by one, further simplifying the operation of testing the application program, shortening the time consumption of environment switching and improving the test efficiency of the application program.
Further, the invention also provides a testing system of the application program, and the testing system of the application program is applied to the terminal equipment provided with the application program to be tested in any embodiment. Referring to fig. 3, fig. 3 is a schematic diagram of a functional module of a testing system for an application program according to an embodiment of the invention. As shown in fig. 3, the test system of the application program of the present invention includes:
The interface output module 10 is configured to output a test tool interface of the application program according to an interface calling instruction, where the test tool interface is configured with an environment switching control, and the environment switching control is associated with other server environments different from the current server environment;
And the test environment switching module 20 is configured to obtain a server environment switching instruction triggered based on the environment switching control, and switch the current server environment to the other server environments according to the server environment switching instruction, so as to test the application program under the other server environments.
Further, the test environment switching module 20 includes:
the instruction analysis unit is used for monitoring an instruction triggering event input based on the environment switching control and analyzing instruction content carried by the instruction triggering event;
the instruction acquisition unit is used for packaging the instruction content and environment identifiers of other server environments associated with the environment switching control to generate a server environment switching instruction and acquiring the server environment switching instruction.
Further, the test environment switching module 20 further includes:
and the environment switching unit is used for switching the current server environment to other server environments corresponding to the environment identifier when the current time is detected to reach the switching time.
Further, the terminal device is configured with a testing tool for assisting in testing the application program, and the testing system of the application program further comprises:
And the instruction triggering module is used for triggering the interface calling instruction of the testing tool when the instruction triggering event input based on the calling control of the testing tool is monitored.
Further, the test system of the application program of the present invention further comprises:
and the interface data display module is used for displaying the service request parameters of the application program on the test tool interface.
Further, the test tool interface is further configured with a view control of service request parameters, where the service request parameters include a request interface and parameter content corresponding to the request interface, and an interface data display module includes:
The extraction unit is used for extracting all request interfaces of the application program and respective parameter contents of all the request interfaces when an instruction triggering event input based on the view control is monitored;
and the first data display unit is used for generating a parameter display list on the test tool interface, and filling all the request interfaces and the parameter content into the parameter display list for associated display.
Further, the interface data display module further includes:
And the second data display unit is used for outputting detailed interface return data of the request interface pointed by the selection instruction when the selection instruction triggered based on the parameter display list is detected.
The function implementation of each module in the test system of the application program corresponds to each step in the test method embodiment of the application program, and the function and implementation process of each module are not described here again.
The present invention also provides a computer storage medium having stored thereon a test program of an application program, which when executed by a processor implements the steps of the test method of an application program according to any of the above embodiments.
The specific embodiments of the computer storage medium of the present invention are substantially the same as the embodiments of the testing method of the application program described above, and will not be described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (7)

1. The application program testing method is characterized in that the application program testing method is applied to terminal equipment, the terminal equipment is provided with an application program to be tested, and the application program testing method comprises the following steps:
outputting a testing tool interface of the application program according to an interface calling instruction, wherein an environment switching control is configured on the testing tool interface and is associated with other server environments different from the current server environment;
Acquiring a server environment switching instruction triggered based on the environment switching control, and switching the current server environment to the other server environments according to the server environment switching instruction so as to test the application program in the other server environments, wherein the step of acquiring the server environment switching instruction triggered based on the environment switching control comprises the following steps:
Monitoring an instruction triggering event input based on the environment switching control, and analyzing instruction content carried by the instruction triggering event;
And encapsulating the instruction content and environment identifiers of other server environments associated with the environment switching control to generate a server environment switching instruction, and acquiring the server environment switching instruction, wherein the test method of the application program further comprises the following steps:
When a preset parameter display instruction is received, displaying service request parameters of the application program on the test tool interface, wherein a view control of the service request parameters is further configured on the test tool interface, the service request parameters comprise a request interface and parameter contents corresponding to the request interface, and the step of displaying the service request parameters of the application program on the test tool interface comprises the following steps:
when an instruction triggering event input based on the check control is monitored, extracting all request interfaces of the application program and respective parameter contents of all request interfaces;
and generating a parameter display list on the test tool interface, and filling all the request interfaces and the parameter content into the parameter display list for associated display.
2. The method for testing an application program according to claim 1, wherein the instruction content includes a switching time of a server environment, and the step of switching the current server environment to the other server environment in accordance with the server environment switching instruction includes:
and when the current time is detected to reach the switching time, switching the current server environment to other server environments corresponding to the environment identifier.
3. The method for testing an application program according to claim 1, wherein the terminal device is provided with a test tool for assisting in testing the application program, and further comprising, before the step of outputting the test tool interface of the application program according to the interface calling instruction:
and triggering an interface calling instruction of the testing tool when an instruction triggering event input based on the calling control of the testing tool is monitored.
4. The method for testing an application program according to claim 1, further comprising, after said step of filling all of said request interfaces and said parameter contents in said parameter presentation list for associated presentation:
And outputting detailed interface return data of the request interface pointed by the selection instruction when the selection instruction triggered based on the parameter display list is detected.
5. The utility model provides a test system of application program, its characterized in that, the test system of application program is applied to terminal equipment, install the application program that waits to test on the terminal equipment, the test system of application program includes:
The interface output module is used for outputting a test tool interface of the application program according to an interface calling instruction, wherein an environment switching control is configured on the test tool interface and is associated with other server environments different from the current server environment;
the test environment switching module is used for acquiring a server environment switching instruction triggered based on the environment switching control, switching the current server environment to the other server environments according to the server environment switching instruction so as to test the application program under the other server environments, wherein the test environment switching module is further used for:
Monitoring an instruction triggering event input based on the environment switching control, and analyzing instruction content carried by the instruction triggering event;
And packaging the instruction content and environment identifiers of other server environments associated with the environment switching control to generate a server environment switching instruction, and acquiring the server environment switching instruction, wherein the test system of the application program further comprises:
When a preset parameter display instruction is received, displaying service request parameters of the application program on the test tool interface, wherein a view control of the service request parameters is further configured on the test tool interface, the service request parameters comprise a request interface and parameter contents corresponding to the request interface, and the step of displaying the service request parameters of the application program on the test tool interface comprises the following steps:
when an instruction triggering event input based on the check control is monitored, extracting all request interfaces of the application program and respective parameter contents of all request interfaces;
and generating a parameter display list on the test tool interface, and filling all the request interfaces and the parameter content into the parameter display list for associated display.
6. A terminal device, characterized in that the terminal device comprises: memory, a processor and a test program for an application program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the method for testing an application program according to any one of claims 1 to 4.
7. A computer storage medium, wherein a test program of an application program is stored on the computer storage medium, which when executed by a processor implements the steps of the method for testing an application program according to any one of claims 1 to 4.
CN202110152815.1A 2021-02-04 2021-02-04 Application program testing method, system, terminal equipment and computer storage medium Active CN112948239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110152815.1A CN112948239B (en) 2021-02-04 2021-02-04 Application program testing method, system, terminal equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110152815.1A CN112948239B (en) 2021-02-04 2021-02-04 Application program testing method, system, terminal equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN112948239A CN112948239A (en) 2021-06-11
CN112948239B true CN112948239B (en) 2024-05-14

Family

ID=76243625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110152815.1A Active CN112948239B (en) 2021-02-04 2021-02-04 Application program testing method, system, terminal equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN112948239B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104168477A (en) * 2014-09-02 2014-11-26 深圳市兆驰股份有限公司 Automatic TV decoding deck test system and method
CN105453052A (en) * 2013-08-16 2016-03-30 国际商业机器公司 Automatically capturing user interactions and evaluating user interfaces in software programs using field testing
CN109388553A (en) * 2017-08-09 2019-02-26 车伯乐(北京)信息科技有限公司 A kind of multi-environment test method, device, equipment and the readable medium of application program
CN109683997A (en) * 2018-12-21 2019-04-26 前锦网络信息技术(上海)有限公司 Pass through the method for sandbox access application interface, sandbox and sandbox equipment
CN109828779A (en) * 2018-12-26 2019-05-31 中国平安人寿保险股份有限公司 Environment changing method, apparatus, terminal installation and storage medium
CN110351134A (en) * 2019-06-28 2019-10-18 北京你财富计算机科技有限公司 A kind of server environment switching method, device and electronic equipment
CN111324441A (en) * 2020-02-19 2020-06-23 深圳乐信软件技术有限公司 Operating environment switching method and device, computer equipment and storage medium
CN111381836A (en) * 2018-12-29 2020-07-07 北京奇虎科技有限公司 Switching method and device of application program deployment environment
CN111897721A (en) * 2020-07-14 2020-11-06 重庆长安汽车股份有限公司 Automatic test method of API interface and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105453052A (en) * 2013-08-16 2016-03-30 国际商业机器公司 Automatically capturing user interactions and evaluating user interfaces in software programs using field testing
CN104168477A (en) * 2014-09-02 2014-11-26 深圳市兆驰股份有限公司 Automatic TV decoding deck test system and method
CN109388553A (en) * 2017-08-09 2019-02-26 车伯乐(北京)信息科技有限公司 A kind of multi-environment test method, device, equipment and the readable medium of application program
CN109683997A (en) * 2018-12-21 2019-04-26 前锦网络信息技术(上海)有限公司 Pass through the method for sandbox access application interface, sandbox and sandbox equipment
CN109828779A (en) * 2018-12-26 2019-05-31 中国平安人寿保险股份有限公司 Environment changing method, apparatus, terminal installation and storage medium
CN111381836A (en) * 2018-12-29 2020-07-07 北京奇虎科技有限公司 Switching method and device of application program deployment environment
CN110351134A (en) * 2019-06-28 2019-10-18 北京你财富计算机科技有限公司 A kind of server environment switching method, device and electronic equipment
CN111324441A (en) * 2020-02-19 2020-06-23 深圳乐信软件技术有限公司 Operating environment switching method and device, computer equipment and storage medium
CN111897721A (en) * 2020-07-14 2020-11-06 重庆长安汽车股份有限公司 Automatic test method of API interface and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种集成化多接口航电网络测试平台设计与实现;刘智武;《电子技术应用》;20140705;第40卷(第7期);第79-81、84页 *

Also Published As

Publication number Publication date
CN112948239A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
CN111026645B (en) User interface automatic test method and device, storage medium and electronic equipment
CN106557424B (en) Memory test method, tested terminal, test client and system
CN109726100A (en) Application performance test method, apparatus, equipment and computer readable storage medium
CN107688529B (en) Component debugging method and device
CN104424089A (en) Terminal testing method and device
CN107515764A (en) Application program page deployment method, terminal and computer-readable recording medium
CN111240973A (en) Simulation-based equipment testing method and system and readable storage medium
CN110825370B (en) Mobile terminal application development method, device and system
CN111898053A (en) Page browsing method, device, equipment and computer readable storage medium
CN106557411B (en) Method and system for testing Hybrid application in Android system
KR101689984B1 (en) Programmable controller, programmable controller system, and execute error information creation method
CN112770108B (en) Performance test method, device and system and computer readable storage medium
CN111104331B (en) Software management method, terminal device and computer readable storage medium
CN114661581A (en) Terminal testing method and device, electronic equipment and computer readable storage medium
CN112948239B (en) Application program testing method, system, terminal equipment and computer storage medium
CN106484604B (en) Application test control method and device
CN112241356B (en) Page test method, device, equipment and storage medium
CN111435328B (en) Application testing method and device, electronic equipment and readable storage medium
CN113900922A (en) Method, device, equipment and medium for testing application program interface of multi-platform application
CN108897689B (en) Embedded application program simulation debugging method and device and readable storage medium
CN108600838B (en) Information source switching method and device for Android television, Android television and readable storage medium
CN110749788A (en) Monitoring method and device for electromagnetic sensitivity test and computer readable storage medium
CN107391354B (en) Method and system for automatically monitoring terminal performance and storage device
CN113672826A (en) Page jump method, device, computer equipment and storage medium
CN115951947A (en) Information interaction method and device 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
TA01 Transfer of patent application right

Effective date of registration: 20240416

Address after: 518000, 19B, Gongkan Building, No. 8 Keji South 8th Road, Gaoxin District, Yuehai Street, Nanshan District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Renkai Network Technology Co.,Ltd.

Country or region after: China

Address before: 518000 1904 gongkan building, South Keji South 8th Road, high tech park, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen Mirror Play Technology Co.,Ltd.

Country or region before: China

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant