CN110543428B - Application system testing method and device - Google Patents

Application system testing method and device Download PDF

Info

Publication number
CN110543428B
CN110543428B CN201910847243.1A CN201910847243A CN110543428B CN 110543428 B CN110543428 B CN 110543428B CN 201910847243 A CN201910847243 A CN 201910847243A CN 110543428 B CN110543428 B CN 110543428B
Authority
CN
China
Prior art keywords
test
application system
field
request
target
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
CN201910847243.1A
Other languages
Chinese (zh)
Other versions
CN110543428A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201910847243.1A priority Critical patent/CN110543428B/en
Publication of CN110543428A publication Critical patent/CN110543428A/en
Application granted granted Critical
Publication of CN110543428B publication Critical patent/CN110543428B/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/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • G06F11/3656Software debugging using additional hardware using a specific debug interface
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a test method and a test device of an application system, wherein the method comprises the following steps: acquiring a test request of a target application system based on any one of a plurality of preset interfaces, wherein the interface is a functional test interface of an application system with an association relationship with the target application system; determining a target field corresponding to the test request, and determining a response message corresponding to the target field; and generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target system determines whether the target system passes the test according to the test result. The invention can provide stable and controllable alternative interface service in the functional test stage, relieve the interface service dependence among application systems, ensure the smooth running of test work and improve the test efficiency, thereby improving the development speed of the application systems.

Description

Application system testing method and device
Technical Field
The invention relates to the technical field of computers, in particular to a testing method and device of an application system.
Background
Within an enterprise, the application systems are associated with each other through interfaces. When the function is updated, the application system with the updated function needs to be tested, and in the test, the new function depends on the interface service synchronously developed by the application system and the interface service is not ready, so that the verification is interrupted, and the new function of the system cannot be completely verified. The agreed interface services generally pass through the joint test, and an automatic test script can be written for the new function for subsequent regression verification.
However, although the dependent interface service can return data, the data dependent test environment is unstable, which can affect the success rate of the automated test and increase the cost of automated implementation, for example: the data instability only causes 1% of automation failure with low probability, but the total number of scripts is 1000, so that 10 script errors need to be analyzed for complete scheduling once a day, and the analysis cost is high in the long term. Meanwhile, the interface service among all systems in the enterprise has the condition of non-uniform interface protocol and interface message format due to technical architecture, historical technical liabilities and the like. In a specific test process, when different functional modules call the same service interface, different fixed data can be expected to be returned, and even the return time is expected to be controlled to meet the requirement of verifying a timeout scene.
Therefore, a solution for effectively solving the interface service dependency between application systems and ensuring the smooth performance of the test is needed.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a testing method and device of an application system, and a method and device thereof, which provide stable and controllable alternative interface service in a testing stage and improve testing efficiency.
In order to solve the technical problems, the invention provides the following technical scheme:
in a first aspect, the present invention provides a method for testing an application system, including:
acquiring a test request of a target application system based on any one of a plurality of preset interfaces, wherein the interface is a functional test interface of an application system with an association relationship with the target application system;
determining a target field corresponding to the test request, and determining a response message corresponding to the target field;
and generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target system determines whether the target system passes the test according to the test result.
Further, before the obtaining the test request of the target application system based on any interface of the preset multiple interfaces, the method further includes:
and receiving a connection request sent by a test script, and establishing a communication connection relation with the target application system according to the connection request, so that the target application system sends out a test request and receives the test request after receiving an initiation verification request sent by the test script.
Further, after the corresponding test result is generated according to the response message, the method further includes:
and delaying the test result for a preset time and then sending the delayed test result to a target application system corresponding to the test request, so that the test request determines whether the test request passes the overtime test according to the delayed test result.
Wherein the determining the target field corresponding to the test request includes:
analyzing the test request by adopting a first analyzer to obtain request data carried by the test request; the first parser is a parser corresponding to an interface to which the test request belongs;
analyzing the request data according to a second analyzer to obtain a target field corresponding to the test request; the second resolvers are resolvers corresponding to the types of the request data.
Further, the determining the response message corresponding to the target field includes:
matching the target field with a field stored in a preset field library; acquiring a first field which is the same as the target field in the preset field library;
determining the value corresponding to the first field as a response message corresponding to the determination target field;
Wherein, each field and the value corresponding to each field are stored in the preset field library.
The test request is a request sent by the corresponding target application system in a functional test stage and/or an automatic test stage.
In a second aspect, the present invention provides a test apparatus for an application system, including:
the interface unit is used for acquiring a test request of a target application system based on any one of a plurality of preset interfaces, wherein the interface is a functional test interface of an application system with an association relationship with the target application system;
the searching unit is used for determining a target field corresponding to the test request and determining a response message corresponding to the target field;
and the response unit is used for generating a corresponding test result according to the response message and sending the test result to the target application system corresponding to the test request so that the target system determines whether the target system passes the test according to the test result.
Further, the method further comprises the following steps:
the connection unit is used for receiving the connection request sent by the test script, and establishing a communication connection relation with the target application system according to the connection request, so that the target application system sends out the test request and receives the test request after receiving the verification initiating request sent by the test script.
Further, the method further comprises the following steps:
and the delay unit is used for delaying the test result for a preset time and then sending the delayed test result to the target application system corresponding to the test request, so that the test request determines whether the test request passes the overtime test according to the test result sent in a delayed manner.
Wherein the search unit includes:
the first analysis module is used for analyzing the test request by adopting a first analyzer to obtain request data carried by the test request; the first parser is a parser corresponding to an interface to which the test request belongs;
the second analysis module is used for analyzing the request data according to a second analyzer to obtain a target field corresponding to the test request; the second resolvers are resolvers corresponding to the types of the request data.
Further, the search unit further includes:
the matching module is used for matching the target field with the fields stored in a preset field library; acquiring a first field which is the same as the target field in the preset field library;
the message module is used for determining the value corresponding to the first field as a response message corresponding to the determination target field;
Wherein, each field and the value corresponding to each field are stored in the preset field library.
The test request is a request sent by the corresponding target application system in a functional test stage and/or an automatic test stage.
In a third aspect, the present invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method for testing an application system when executing the program.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for testing an application system.
As can be seen from the above technical solution, the present invention provides a method and an apparatus for testing an application system, where a test request of a target application system is obtained through any interface based on a preset plurality of interfaces, where the interface is a functional test interface of an application system having an association relationship with the target application system; determining a target field corresponding to the test request, and determining a response message corresponding to the target field; and generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target system determines whether the target system passes the test according to the test result, and provides stable and controllable alternative interface service in a functional test stage, so that the interface service dependence among application systems is relieved, the smooth performance of test work is ensured, the test efficiency is improved, and the development speed of the application system is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a first flow chart of a test method of an application system in an embodiment of the invention.
Fig. 2 is a second flow chart of a test method of an application system according to an embodiment of the invention.
Fig. 3 is a third flow chart of a test method of an application system according to an embodiment of the invention.
Fig. 4 is a schematic diagram of a first structure of a testing device of an application system according to an embodiment of the present invention.
Fig. 5 is a second flow chart of the test device of the application system in the embodiment of the invention.
Fig. 6 is a third flow chart of a testing apparatus of an application system according to an embodiment of the invention.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides an embodiment of a test method of an application system, referring to fig. 1, the test method of the application system specifically comprises the following contents:
s101: acquiring a test request of a target application system based on any one of a plurality of preset interfaces, wherein the interface is a functional test interface of an application system with an association relationship with the target application system;
in this step, multiple interfaces and interface protocols corresponding to the interfaces are preset, and the interfaces are monitored and processed through the interface protocols, so as to obtain a test request of the target application system. For example, the interface is a 9080 interface or an 80 interface, and the corresponding interface protocol is an http protocol.
It should be noted that the test request is a request sent by the corresponding target application system in the functional test stage and/or the automation test stage.
S102: determining a target field corresponding to the test request, and determining a response message corresponding to the target field;
in this step, after the test request is obtained, the test request is parsed to obtain the corresponding target field. It should be noted that, according to the analysis requirement for the test request, the test request may be analyzed twice and more than three times.
When a response message corresponding to the target field is determined, matching the target field with the fields stored in a preset field library; the method comprises the steps that a first field which is the same as a target field can be determined in a preset field library, and a value corresponding to the first field is determined to be a response message corresponding to the target field; the first field is used for indicating that corresponding user data with the target field as a unique identifier is stored.
Matching the target field with the field stored in the preset field library; and if the first field which is the same as the target field cannot be determined in the preset field library, determining a value corresponding to a preset second field as a response message for determining the target field, wherein the second field is used for indicating that the corresponding user data taking the target field as the unique identifier is not stored.
In specific implementation, a first analyzer is adopted to analyze a test request to obtain request data carried by the test request; the first analyzer is an analyzer corresponding to the interface to which the test request belongs; analyzing the request data according to the second analyzer to obtain a target field corresponding to the test request; the second resolvers are resolvers corresponding to the types of the request data.
S103: and generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target system determines whether the target system passes the test according to the test result.
In the step, the response message is converted into a test result corresponding to the test request, the test result is sent to the target application system, and the target application system analyzes the test result to obtain the corresponding response message. And comparing the result corresponding to the response message with the actual result to determine whether the response message passes the test.
The corresponding result of the response message comprises: corresponding user data with the target field as a unique identifier and corresponding user data without the target field as a unique identifier are stored.
As can be seen from the above description, in the test method for an application system provided by the embodiment of the present invention, a test request of a target application system is obtained through any interface among a plurality of interfaces that are preset, where the interface is a functional test interface of an application system that has an association relationship with the target application system; determining a target field corresponding to the test request, and determining a response message corresponding to the target field; and generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target system determines whether the target system passes the test according to the test result, and provides stable and controllable alternative interface service in a functional test stage, so that the interface service dependence among application systems is relieved, the smooth performance of test work is ensured, the test efficiency is improved, and the development speed of the application system is further improved.
In an embodiment of the present invention, referring to fig. 2, step S100 is further included before step S101 of the testing method of the application system, and specifically includes the following steps:
and receiving a connection request sent by a test script, and establishing a communication connection relation with the target application system according to the connection request, so that the target application system sends out a test request and receives the test request after receiving an initiation verification request sent by the test script.
In this step, a connection request sent by the test script needs to be received, and a connection relationship with the target application system can be established according to the connection request. The test script sends a verification request to the target application system, and the target application system sends a test request to a system establishing a communication relationship with the target application system after receiving the verification request.
The test script replaces a tester to test, so that the test efficiency of the target application system can be improved.
In an embodiment of the present invention, referring to fig. 3, step S104 is further included before step S103 of the test method of the application system, and specifically includes the following steps:
s104: and delaying the test result for a preset time and then sending the delayed test result to a target application system corresponding to the test request, so that the test request determines whether the test request passes the overtime test according to the delayed test result.
In this step, a period of time is preset, and after the test result is delayed by the preset period of time, the test result is sent to the target application system corresponding to the test request. The target application system can determine whether the target application system passes the overtime test according to the test result received by the delay, specifically: whether the target application system has a time-out flag for the test result received by the delay.
As can be seen from the above description, in the test method for an application system provided by the embodiment of the present invention, a test request of a target application system is obtained through any interface among a plurality of interfaces that are preset, where the interface is a functional test interface of an application system that has an association relationship with the target application system; determining a target field corresponding to the test request, and determining a response message corresponding to the target field; and generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target system determines whether the target system passes the test according to the test result, and provides stable and controllable alternative interface service in a functional test stage, so that the interface service dependence among application systems is relieved, the smooth performance of test work is ensured, the test efficiency is improved, and the development speed of the application system is further improved.
In order to further explain the scheme, the invention provides a specific example of a testing method of an application system, which specifically comprises the following contents:
test description:
the target application system supports the functionality of adding a new class of accounts for a given customer. The function requires that the customer not have a class of accounts before a class of accounts can be added. The target application system is used as one of the new channels of the accounts, and the account information of the accounts is managed by the system B. System B provides an online interface for querying and maintaining a class of account information.
In the target application system, it is required to verify that one type of account cannot be newly added for the client who has one type of account, and verify that one type of account can be newly added for the client who has no one type of account.
It should be noted that, in the test method provided in this embodiment, a B1 interface needs to be provided, where the B1 interface is used to query one type of account information according to a client information number, and the B1 interface aggregates the query functions of multiple types of accounts, and the following description of interface technical features is applicable to a scene of querying one type of account:
(1) Communication is carried out through an http protocol and specific xml, and communication is carried out through a 9080 port, namely, an interface request needs to be initiated to an http:// { ip }:9080/acc.
(2) The interface is sent up, and comprises three fields, namely:
flowc=ACC.FLOWC;
opg=QRY;
data=<qryInfo><custId>09823434</custId><accType>1</accType></qryInfo>;
wherein, flow c and opg are two necessary fields required by technical architecture, data is a text in xml format, and two service query parameters are packed: the custId is a client information number, which is a unique identifier of a client, and the value 09823434 of the custId is taken as an example; accType is an account type, and when the value is 1, the accType is indicated to inquire account information of one type, and the account information is a fixed value in the requirement scene.
(3) The interface returns, directly returns xml message strings, for example as follows:
when there is a class of account, return message 1: < accList > < acc > < custId >09823434</custId > < accType >1</accType > < accNo >6222123456789012345> </accNo > </accList >.
When no account is available, returning a message 2: < accList > </accList >.
In the test process, a specified customer information number custId needs to be provided, and one type of account information can be returned for verification, wherein the verification is that one type of account cannot be newly added for the customer with the existing one type of account in the tested system; or providing a specified customer information number custId, and returning no account information in the result for verifying that "in the tested system, a new account can be added for the customer without the account.
The specific test process comprises the following steps:
by invoking the http protocol, the port starts listening at 9080. And receiving an http request through a 9080 port, and starting the flow;
judging that the request address is uri and/acc, transmitting original protocol data to an analysis layer for further processing through a master control, otherwise, directly rejecting the request;
firstly, the defaulthttpeextractor is called to analyze the request data transmitted from the master control, and three fields are obtained:
flowc:ACC.FLOWC;
opg:QRY;
data:<qryInfo><custId>09823434</custId><accType>1</accType></qryInfo>;
the parsing layer calls the text of the XmlExactor on the data field, parses the xml field, and accumulates the xml field to obtain a field:
flowc:ACC.FLOWC;
opg:QRY;
data:<qryInfo><custId>09823434</custId><accType>1</accType></qryInfo>;
custId:44444444;
accType:1;
according to user settings, the "whether the custId field exists and the value is 33333333" is matched first: although the custId exists, the value is not 33333333 and the match fails. The match is passed again "if the custId field is present and the value is 44444444".
The response layer generates a response message "< accList > </accList >", sends the response message to the target application system, and ends the processing.
Based on the specific test process, the time delay is 2 seconds before the response message is generated, so that a test scene returned by overtime can be simulated.
It should be noted that the defaulthttpeextractor uses the field uploading rule agreed by the http protocol to analyze the parameters carried by the http request. The xmlxector parses the value of the data field as an xml message.
The embodiment of the invention provides a specific implementation manner of a testing device of an application system, which can realize all contents in a testing method of the application system, and referring to fig. 4, the testing device of the application system specifically comprises the following contents:
an interface unit 10, configured to obtain a test request of a target application system based on any one of a preset plurality of interfaces, where the interface is a functional test interface of an application system that has an association relationship with the target application system;
the searching unit 20 is configured to determine a target field corresponding to the test request, and determine a response packet corresponding to the target field;
and the response unit 30 is configured to generate a corresponding test result according to the response message, and send the test result to the target application system corresponding to the test request, so that the target system determines whether to pass the test according to the test result.
Wherein the search unit includes:
the first analysis module is used for analyzing the test request by adopting a first analyzer to obtain request data carried by the test request; the first parser is a parser corresponding to an interface to which the test request belongs;
The second analysis module is used for analyzing the request data according to a second analyzer to obtain a target field corresponding to the test request; the second resolvers are resolvers corresponding to the types of the request data.
Further, the search unit further includes:
the matching module is used for matching the target field with the fields stored in a preset field library; acquiring a first field which is the same as the target field in the preset field library;
the message module is used for determining the value corresponding to the first field as a response message corresponding to the determination target field;
wherein, each field and the value corresponding to each field are stored in the preset field library.
The test request is a request sent by the corresponding target application system in a functional test stage and/or an automatic test stage.
In an embodiment of the present invention, referring to fig. 5, the test device of the application system further includes:
and the connection unit 40 is configured to receive a connection request sent by the test script, and establish a communication connection relationship with the target application system according to the connection request, so that the target application system sends a test request and receives the test request after receiving an initiation verification request sent by the test script.
In an embodiment of the present invention, referring to fig. 6, the test device of the application system further includes:
and the delay unit 50 is used for delaying the test result for a preset time and then sending the delayed test result to the target application system corresponding to the test request, so that the test request determines whether the test request passes the overtime test according to the test result sent in a delayed manner.
The embodiment of the testing device for an application system provided by the present invention may be specifically used to execute the processing flow of the embodiment of the testing method for an application system in the above embodiment, and the functions thereof are not described herein in detail, and reference may be made to the detailed description of the above method embodiment.
According to the test device of the application system, provided by the embodiment of the invention, the test request of the target application system is obtained through any interface in a plurality of interfaces, wherein the interface is a functional test interface of the application system with an association relation with the target application system; determining a target field corresponding to the test request, and determining a response message corresponding to the target field; and generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target system determines whether the target system passes the test according to the test result, and provides stable and controllable alternative interface service in a functional test stage, so that the interface service dependence among application systems is relieved, the smooth performance of test work is ensured, the test efficiency is improved, and the development speed of the application system is further improved.
The application provides an embodiment of an electronic device for realizing all or part of contents in a test method of an application system, which specifically comprises the following contents:
a processor (processor), a memory (memory), a communication interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete communication with each other through the bus; the communication interface is used for realizing information transmission between related devices; the electronic device may be a desktop computer, a tablet computer, a mobile terminal, etc., and the embodiment is not limited thereto. In this embodiment, the electronic device may be implemented with reference to an embodiment of the method for implementing the test method of the application system and an embodiment of the test apparatus for implementing the application system, and the contents thereof are incorporated herein, and are not repeated here.
Fig. 7 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 7, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this fig. 7 is exemplary; other types of structures may also be used in addition to or in place of the structures to implement telecommunications functions or other functions.
In one embodiment, the test functions of the application system may be integrated into the central processor 9100. The central processor 9100 may be configured to perform the following control: acquiring a test request of a target application system based on any one of a plurality of preset interfaces, wherein the interface is a functional test interface of an application system with an association relationship with the target application system; determining a target field corresponding to the test request, and determining a response message corresponding to the target field; and generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target system determines whether the target system passes the test according to the test result.
As can be seen from the above description, the electronic device provided by the embodiment of the present application obtains a test request of a target application system through any one of a plurality of interfaces that are preset, where the interface is a functional test interface of an application system that has an association relationship with the target application system; determining a target field corresponding to the test request, and determining a response message corresponding to the target field; and generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target system determines whether the target system passes the test according to the test result, and provides stable and controllable alternative interface service in a functional test stage, so that the interface service dependence among application systems is relieved, the smooth performance of test work is ensured, the test efficiency is improved, and the development speed of the application system is further improved.
In another embodiment, the testing device of the application system may be configured separately from the cpu 9100, for example, the testing device of the application system may be configured as a chip connected to the cpu 9100, and the testing function of the application system is implemented by the control of the cpu.
As shown in fig. 7, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 need not include all of the components shown in fig. 7; in addition, the electronic device 9600 may further include components not shown in fig. 7, and reference may be made to the related art.
As shown in fig. 7, the central processor 9100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, which central processor 9100 receives inputs and controls the operation of the various components of the electronic device 9600.
The memory 9140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information about failure may be stored, and a program for executing the information may be stored. And the central processor 9100 can execute the program stored in the memory 9140 to realize information storage or processing, and the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, but not limited to, an LCD display.
The memory 9140 may be a solid state memory such as Read Only Memory (ROM), random Access Memory (RAM), SIM card, etc. But also a memory which holds information even when powered down, can be selectively erased and provided with further data, an example of which is sometimes referred to as EPROM or the like. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 storing application programs and function programs or a flow for executing operations of the electronic device 9600 by the central processor 9100.
The memory 9140 may also include a data store 9143, the data store 9143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, address book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. A communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, as in the case of conventional mobile communication terminals.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, etc., may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and to receive audio input from the microphone 9132 to implement usual telecommunications functions. The audio processor 9130 can include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100 so that sound can be recorded locally through the microphone 9132 and sound stored locally can be played through the speaker 9131.
The embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the test method of an application system in the above embodiment, the computer-readable storage medium storing thereon a computer program which, when executed by a processor, implements all the steps in the test method of an application system in the above embodiment, for example, the processor implements the following steps when executing the computer program: acquiring a test request of a target application system based on any one of a plurality of preset interfaces, wherein the interface is a functional test interface of an application system with an association relationship with the target application system; determining a target field corresponding to the test request, and determining a response message corresponding to the target field; and generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target system determines whether the target system passes the test according to the test result.
As can be seen from the above description, the computer readable storage medium provided by the embodiments of the present invention obtains a test request of a target application system through any one of a plurality of interfaces that are preset, where the interface is a functional test interface of an application system that has an association relationship with the target application system; determining a target field corresponding to the test request, and determining a response message corresponding to the target field; and generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target system determines whether the target system passes the test according to the test result, and provides stable and controllable alternative interface service in a functional test stage, so that the interface service dependence among application systems is relieved, the smooth performance of test work is ensured, the test efficiency is improved, and the development speed of the application system is further improved.
Although the invention provides method operational steps as described in the examples or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented by an actual device or client product, the instructions may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment) as shown in the embodiments or figures.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, apparatus (system) or computer program product. Accordingly, the present specification embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments. In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. The orientation or positional relationship indicated by the terms "upper", "lower", etc. are based on the orientation or positional relationship shown in the drawings, are merely for convenience of description and to simplify the description, and are not indicative or implying that the apparatus or elements in question must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the present invention. Unless specifically stated or limited otherwise, the terms "mounted," "connected," and "coupled" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances. It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other. The present invention is not limited to any single aspect, nor to any single embodiment, nor to any combination and/or permutation of these aspects and/or embodiments. Moreover, each aspect and/or embodiment of the invention may be used alone or in combination with one or more other aspects and/or embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention, and are intended to be included within the scope of the appended claims and description.

Claims (12)

1. A method for testing an application system, comprising:
acquiring a test request sent by a target application system based on any one of a plurality of preset interfaces, wherein the interface is a functional test interface of the application system with an association relationship with the target application system;
analyzing the test request to determine a target field corresponding to the test request, and determining a response message corresponding to the target field; generating a corresponding test result according to the response message, and sending the test result to the target application system corresponding to the test request, so that the target application system analyzes the test result to obtain a corresponding response message, and comparing the result corresponding to the response message with an actual result to determine whether the test result passes the test;
The determining the response message corresponding to the target field includes:
matching the target field with a field stored in a preset field library; the method comprises the steps that a first field identical to a target field can be determined in a preset field library, and the first field identical to the target field in the preset field library is obtained; determining the value corresponding to the first field as a response message corresponding to the determination target field; wherein, each field and the value corresponding to each field are stored in the preset field library;
if the first field which is the same as the target field cannot be determined in the preset field library, determining a value corresponding to a preset second field as a response message for determining the target field, wherein the second field is used for indicating that the corresponding user data taking the target field as the unique identifier is not stored.
2. The method for testing an application system according to claim 1, wherein before the step of obtaining the test request of the target application system based on any one of the preset interfaces, the method further comprises:
and receiving a connection request sent by a test script, and establishing a communication connection relation with the target application system according to the connection request, so that the target application system sends out a test request and receives the test request after receiving an initiation verification request sent by the test script.
3. The method for testing an application system according to claim 1, wherein after generating the corresponding test result according to the response message, further comprises:
and delaying the test result for a preset time and then sending the delayed test result to a target application system corresponding to the test request, so that the test request determines whether the test request passes the overtime test according to the delayed test result.
4. The method for testing an application system according to claim 1, wherein determining the target field corresponding to the test request includes:
analyzing the test request by adopting a first analyzer to obtain request data carried by the test request; the first parser is a parser corresponding to an interface to which the test request belongs;
analyzing the request data according to a second analyzer to obtain a target field corresponding to the test request; the second resolvers are resolvers corresponding to the types of the request data.
5. The method according to claim 1, wherein the test request is a request issued by the corresponding target application system in a functional test phase and/or an automated test phase.
6. A test device for an application system, comprising:
the interface unit is used for acquiring a test request sent by a target application system based on any one of a plurality of preset interfaces, wherein the interface is a functional test interface of the application system with an association relationship with the target application system;
the searching unit is used for analyzing the test request to determine a target field corresponding to the test request and determining a response message corresponding to the target field;
the response unit is used for generating a corresponding test result according to the response message, sending the test result to the target application system corresponding to the test request, analyzing the test result by the target application system to obtain a corresponding response message, comparing the result corresponding to the response message with an actual result, and determining whether the test result passes the test;
the search unit further includes:
the matching module is used for matching the target field with the fields stored in a preset field library; the method comprises the steps that a first field identical to a target field can be determined in a preset field library, and the first field identical to the target field in the preset field library is obtained;
The message module is used for determining the value corresponding to the first field as a response message corresponding to the determination target field; wherein, each field and the value corresponding to each field are stored in the preset field library; if the first field which is the same as the target field cannot be determined in the preset field library, determining a value corresponding to a preset second field as a response message for determining the target field, wherein the second field is used for indicating that the corresponding user data taking the target field as the unique identifier is not stored.
7. The application system testing apparatus of claim 6, further comprising:
the connection unit is used for receiving the connection request sent by the test script, and establishing a communication connection relation with the target application system according to the connection request, so that the target application system sends out the test request and receives the test request after receiving the verification initiating request sent by the test script.
8. The application system testing apparatus of claim 6, further comprising:
and the delay unit is used for delaying the test result for a preset time and then sending the delayed test result to the target application system corresponding to the test request, so that the test request determines whether the test request passes the overtime test according to the test result sent in a delayed manner.
9. The apparatus according to claim 6, wherein the search unit includes:
the first analysis module is used for analyzing the test request by adopting a first analyzer to obtain request data carried by the test request; the first parser is a parser corresponding to an interface to which the test request belongs;
the second analysis module is used for analyzing the request data according to a second analyzer to obtain a target field corresponding to the test request; the second resolvers are resolvers corresponding to the types of the request data.
10. The device for testing an application system according to claim 6, wherein the test request is a request issued by the corresponding target application system in a functional test phase and/or an automated test phase.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method for testing an application system according to any one of claims 1 to 5 when the program is executed by the processor.
12. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the test method of an application system according to any one of claims 1 to 5.
CN201910847243.1A 2019-09-09 2019-09-09 Application system testing method and device Active CN110543428B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910847243.1A CN110543428B (en) 2019-09-09 2019-09-09 Application system testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910847243.1A CN110543428B (en) 2019-09-09 2019-09-09 Application system testing method and device

Publications (2)

Publication Number Publication Date
CN110543428A CN110543428A (en) 2019-12-06
CN110543428B true CN110543428B (en) 2023-11-24

Family

ID=68713118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910847243.1A Active CN110543428B (en) 2019-09-09 2019-09-09 Application system testing method and device

Country Status (1)

Country Link
CN (1) CN110543428B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143221B (en) * 2019-12-28 2024-01-30 中国银行股份有限公司 Test method and device
CN111782452A (en) * 2020-07-03 2020-10-16 携程商旅信息服务(上海)有限公司 Method, system, device and medium for interface contrast test
CN117148018B (en) * 2023-10-27 2024-03-26 南方电网数字电网研究院有限公司 Function test system and method for power distribution module

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155891A (en) * 2015-04-02 2016-11-23 阿里巴巴集团控股有限公司 Interface test method, interface description data library generating method and device
CN107659949A (en) * 2017-09-26 2018-02-02 上海斐讯数据通信技术有限公司 A kind of wireless router cloud service functional interface method of testing and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155891A (en) * 2015-04-02 2016-11-23 阿里巴巴集团控股有限公司 Interface test method, interface description data library generating method and device
CN107659949A (en) * 2017-09-26 2018-02-02 上海斐讯数据通信技术有限公司 A kind of wireless router cloud service functional interface method of testing and system

Also Published As

Publication number Publication date
CN110543428A (en) 2019-12-06

Similar Documents

Publication Publication Date Title
CN110543428B (en) Application system testing method and device
US10630671B2 (en) Dynamic web services server
US11360737B2 (en) Method and apparatus for providing speech service
CN109376088B (en) Automatic test system and automatic test method
CN110413528B (en) Intelligent configuration method and system for test environment
CN114172662A (en) Block chain external data acquisition method and device
CN110941563A (en) Automatic script testing method and device
US8880108B2 (en) Short message processing method and apparatus
US7925952B1 (en) Distributed midlet testing
CN105072082A (en) Method and device for transmitting verification code
CN111897738B (en) Automatic testing method and device based on atomic service
CN113612825A (en) Internet of things message middleware server cluster expansion method and system
CN112988600A (en) Service scene testing method and device, electronic equipment and storage medium
CN112328413A (en) Application service calling method, device and system
CN112905460A (en) Device and method for simulating three-party receipt by automatic interface test
CN110399305B (en) BTT module testing method and device
CN111930625B (en) Log acquisition method, device and system based on cloud service platform
CN111930626B (en) Automatic testing method and device based on PaaS cloud service
CN113626321B (en) Bridging test method, device, system and storage medium
CN113438083B (en) Signature adding and checking method and device based on interface automatic test
CN113438251A (en) Protocol conversion method, device and system
CN111796958A (en) Transaction anti-hanging method and device under Dubbo frame
CN113986335A (en) Version package verification stage distribution method and device
CN114285658B (en) System mutual jump login-free method based on WeChat authorization login
CN111158744B (en) Cross-platform heterogeneous data integration method and device

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