CN109271325B - Application testing method, system, electronic device and storage medium - Google Patents

Application testing method, system, electronic device and storage medium Download PDF

Info

Publication number
CN109271325B
CN109271325B CN201811255838.XA CN201811255838A CN109271325B CN 109271325 B CN109271325 B CN 109271325B CN 201811255838 A CN201811255838 A CN 201811255838A CN 109271325 B CN109271325 B CN 109271325B
Authority
CN
China
Prior art keywords
data
application
request
mock
subsystem
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
CN201811255838.XA
Other languages
Chinese (zh)
Other versions
CN109271325A (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.)
Ctrip Travel Network Technology Shanghai Co Ltd
Original Assignee
Ctrip Travel Network Technology Shanghai 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 Ctrip Travel Network Technology Shanghai Co Ltd filed Critical Ctrip Travel Network Technology Shanghai Co Ltd
Priority to CN201811255838.XA priority Critical patent/CN109271325B/en
Publication of CN109271325A publication Critical patent/CN109271325A/en
Application granted granted Critical
Publication of CN109271325B publication Critical patent/CN109271325B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Abstract

The application provides a test method, a test system, electronic equipment and a storage medium of an application, wherein the method comprises the following steps: constructing a test environment comprising an application to be released and a Mock subsystem; acquiring running data of published applications in an online environment, wherein the running data comprises actual request data, associated service data and actual response data, and storing the associated service data to a Mock subsystem; the actual request data are played back in the test environment in sequence, and simulated response data obtained by processing the actual request data according to the associated service data by the application to be issued are obtained; and comparing the simulation response data with the actual response data, and screening each functional unit of the application to be issued. According to the method and the system, the related service data which are depended by the request when the mobile subsystem runs in an online environment are recorded in real time, the corresponding related service data are returned when the test environment replays the request, the difference of related services in different environments is eliminated, and the test screening based on real data streams is carried out on the application to be issued.

Description

Application testing method, system, electronic device and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and a system for testing an application, an electronic device, and a storage medium.
Background
After the application is developed, the system and each module of the system need to be tested. During testing, a test case is constructed by a developer, and then the output of the system is compared with the expected output to judge whether the feedback of the system for the test case reaches the expectation.
The above test has at least the following problems: firstly, the test case constructed by the developer has limitation and can not reproduce the input data in the production environment; secondly, the workload of the developer for constructing test cases with considerable number is large, and the development work is greatly influenced.
In addition, after an application program in a production environment fails, in order to ensure the availability of the system, the system needs to be immediately rolled back to a normal working state, and then the system failure is located on line. Doing so can affect the fault diagnosis and also slow down the development progress.
It is noted that the information applied in the above background section is only for enhancement of understanding of the background of the present application and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present application provides an application test method, an application test system, an electronic device, and a storage medium, and is expected to solve the problems that in the prior art, a test case is limited in construction, a fault cannot be located in real time, and application development efficiency is affected.
According to an aspect of the present application, there is provided a method of testing an application, including: constructing a test environment comprising an application to be released and a Mock subsystem; acquiring running data of published applications in an online environment, wherein the running data comprises actual request data, associated service data and actual response data, and storing the associated service data to the Mock subsystem; sequentially playing back the actual request data in the test environment, and acquiring simulated response data obtained by processing the actual request data by the application to be issued according to the associated service data; and comparing the simulated response data with the actual response data, and screening each functional unit of the application to be released.
Preferably, the test method further comprises: playing back actual request data in the test environment according to a preset request rate, and acquiring output data of the application to be issued for processing the actual request data according to the associated service data; and acquiring a pressure test result of the application to be issued based on the preset request rate according to the output data.
Preferably, the test method further comprises: and adjusting the request rate, and acquiring pressure test results of the application to be issued based on different request rates.
Preferably, the test method further comprises: acquiring abnormal request data of published applications in an online environment in real time; the abnormal request data is played back in the test environment, and a data stream generated by the application to be issued for processing the abnormal request data is obtained; and carrying out fault analysis on the published application according to the data flow.
Preferably, in the above test method, the built Mock subsystem includes a Redis Mock subsystem and an SOA Mock subsystem.
According to another aspect of the present application, there is provided a test system for an application, comprising: the test environment comprises an application to be released and a Mock subsystem; the data acquisition module is used for acquiring running data of published applications in an online environment, including actual request data, associated service data and actual response data, and storing the associated service data to the Mock subsystem; the production testing module is used for sequentially playing back the actual request data in the testing environment and acquiring simulated response data obtained by processing the actual request data by the application to be issued according to the associated service data; and comparing the simulated response data with the actual response data, and screening each functional unit of the application to be released.
Preferably, the test system further comprises: the pressure testing module is used for playing back actual request data in the testing environment according to a preset request rate and acquiring output data of the application to be issued for processing the actual request data according to the associated service data; and acquiring a pressure test result of the application to be issued based on the preset request rate according to the output data.
Preferably, the test system further comprises: and the rate adjusting module is used for adjusting the request rate and acquiring the pressure test result of the application to be issued based on different request rates.
Preferably, the test system further comprises: the fault analysis module is used for acquiring abnormal request data of published applications in an online environment in real time; the abnormal request data is played back in the test environment, and a data stream generated by the application to be issued for processing the abnormal request data is obtained; and performing fault analysis on the published application according to the data stream.
Preferably, in the test system, the Mock subsystem of the test environment includes a Redis Mock subsystem and an SOA Mock subsystem.
According to another aspect of the present application, there is provided an electronic device including: a processor; and a memory for storing executable instructions; wherein the processor is configured to perform the steps of the method of testing an application described above via execution of the executable instructions.
According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method for testing an application as described above.
This application lies in with prior art's beneficial effect:
the method records the associated service data depended by the request in the online environment in real time through the Mock subsystem, returns the corresponding associated service data when the request is played back in the test environment, and eliminates the difference of the associated services in different environments;
and testing and screening the application to be issued based on the real data stream by playing back the actual request data of the online environment in the testing environment.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 to 3 are schematic diagrams illustrating steps of a test method for several applications in an embodiment of the present application;
FIG. 4 is a block diagram of a test system for an application in an embodiment of the present application;
FIG. 5 is a schematic diagram showing an architecture of a test system applied in an embodiment of the present application;
FIG. 6 is a schematic diagram of an electronic device in an embodiment of the application;
fig. 7 shows a schematic diagram of a computer-readable storage medium in an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar structures, and thus, a repetitive description thereof will be omitted.
Fig. 1 to 3 illustrate steps of a testing method applied to several embodiments of the present application, and the numbering in the figures is only used for distinguishing different steps, and does not limit the logic relationship and execution sequence among the steps.
Referring to FIG. 1, in some embodiments of the present application, the applied test method includes, but is not limited to, the following steps:
and S10, constructing a test environment comprising the application to be released and the Mock subsystem.
The application to be released refers to a version updated for the released application on the line. The Mock subsystem is a set of simulation systems and is used for simulating the function realization of each functional unit of the application to be released. The Mock subsystem can reduce the dependence among the functional units and ensure the stability and the test independence of the functions of the functional units.
S20, acquiring running data of the published application in the online environment, wherein the running data comprises actual request data, associated service data and actual response data, and storing the associated service data to the Mock subsystem.
In some preferred embodiments, the built Mock subsystems include a Redis Mock subsystem and an SOA Mock subsystem. Redis is an open source log-type and Key-Value database which is written by using ANSI C language, supports network, can be based on memory and can also be persistent, and provides API of multiple languages. The Redis Mock subsystem can store some cache data used by the published application to run the processing request in the online environment, and the cache data is called when the to-be-published application processes the same request in the test environment. An SOA (Service-Oriented Architecture) is a component model that ties different functional units of an application (also called services) through well-defined interfaces and contracts between these services. The SOA Mock subsystem can store some service data used by the issued application to run and process the requests of different functional units in the online environment, and the service data is called when the application to be issued processes the requests of the same functional units in the test environment.
Wherein the running data of the published application in the online environment is stored in a database. The online environment pushes the running data of the published application (namely the log generated by the running of the published application) to a message queue according to a certain format, and then pulls the message to a database through a flow. The operation data of the published application comprises actual request data and actual response data, and related associated service data, including service data of SOA, service data of Redis and the like.
Through the Redis Mock subsystem and the SOA Mock subsystem, when the relevant service is called in the test environment, the relevant service data consistent with the online environment can be returned, so that the difference of the relevant service in different environments is eliminated, and the test accuracy is ensured.
And S30, sequentially playing back the actual request data in the test environment, and acquiring simulated response data obtained by processing the actual request data by the application to be issued according to the associated service data.
By intercepting the real data stream of the online environment and replaying the actual request data in the test environment, the performance of the real input of the online environment in the test environment can be reproduced, thereby observing the output and positioning the possible problems of the application to be issued.
And S40, comparing the simulation response data with the actual response data, and screening each functional unit of the application to be issued.
In a preferred embodiment, the actual request data within a certain time is taken out from the database, and is put into a test environment to sequentially request again, meanwhile, the Redis Mock subsystem and the SOA Mock subsystem are used for simulating the return data of Redis and the return data of SOA in the online environment, the associated service data is completely returned according to the online environment, and the simulated response data obtained by the application processing request to be issued is obtained. By comparing the simulated response data returned from the test environment with the actual response data returned from the online environment stored in the database, the functional units of the application to be issued can be tested and screened, and the problem of the application to be issued can be found in time.
Further, in some embodiments, referring to fig. 2, the applied test method further includes:
s50, playing back the actual request data in a test environment according to a preset request rate, and acquiring output data of the application to be issued for processing the actual request data according to the associated service data; and S60, acquiring a pressure test result of the application to be issued based on the preset request rate according to the output data.
Intercepting a large amount of request data from an online environment, leading the request data into the application to be issued, observing, outputting, collecting and analyzing various performance indexes of the application to be issued, and carrying out pressure test on the application to be issued.
Further, in some embodiments, the applied test method further comprises: and S70, adjusting the request rate, and acquiring pressure test results of the application to be issued based on different request rates. The speed of the request data of the online environment during the playback of the test environment is adjusted according to the requirement through a speed adjusting mechanism of the request data stream, so that the performance of the application to be issued at different request speeds is comprehensively evaluated.
Further, in some embodiments, referring to fig. 3, the applied testing method further includes:
s80, acquiring abnormal request data of published applications in an online environment in real time;
s90, the abnormal request data is played back in the test environment, a data stream generated by the application to be issued for processing the abnormal request data is obtained, and fault analysis is carried out on the issued application according to the data stream.
After the online environment has failed, the system needs to be immediately rolled back to normal operation in order to ensure the usability of the published application. Meanwhile, the data stream generated by processing the abnormal request by the application to be issued is obtained by intercepting the abnormal request of the online environment in real time and requesting again in the test environment, and the fault point of the issued application can be quickly and accurately positioned and the fault source can be deeply analyzed by means of the breakpoint of the test environment and the like. Therefore, normal use of published applications in an online environment is guaranteed, abnormal requests are played back in real time through a test environment, data stream records of the abnormal requests in the life cycle of the abnormal requests are restored, developers are helped to quickly locate system faults, and the abnormal requests are backtracked and analyzed.
According to the testing method of the application, the output of the associated service depended on when the request runs in the online environment is recorded in real time through the Mock subsystem, and the corresponding associated service data is returned when the request is played back in the testing environment, so that the difference of the associated service in different environments is eliminated, and the testing accuracy is ensured; the speed of the on-line environment request data during the test environment replay can be adjusted through a speed adjusting mechanism of the request data stream, so that the performance of the application to be issued under different conditions can be comprehensively evaluated; by welcoming data flow records of abnormal requests in the life cycle of the data flow records, developers can be helped to quickly locate system faults, and meanwhile, the usability of online environments is guaranteed.
The embodiment of the application also provides an application test system. Referring to the block diagram of fig. 4 and the architecture diagram of fig. 5, in some embodiments, the applied test system 3 mainly includes:
and the test environment comprises an application to be released 31 and a Mock subsystem 32. The Mock subsystem may further include a Redis Mock subsystem 321 and a SOA Mock subsystem 322. And the application to be issued acquires the associated service data from the Redis Mock subsystem 321 and the SOA Mock subsystem 322 through a third-party data interface.
And the data acquisition module 33 is configured to acquire the running data of the published application 1 in the online environment, including the actual request data, the associated service data and the actual response data, and store the associated service data in the Mock subsystem 32.
Specifically, the published application 1 in the online environment pushes log data (including a request log, an SOA return log, a Redis return log, a response log, etc.) generated by running to a message queue according to a certain format, for example, into the Kafka or works distributed publish-subscribe message system 12, and then pulls the log data into the database 2 through the Storm streaming data processing framework 13. The data acquiring module 33 can acquire real data of the online environment from the database 2.
The data obtaining module 33 may further include a request data obtaining module 331, configured to obtain actual request data in the database 2, that is, a request log in real time; the associated data acquisition module 332 is configured to acquire associated service data in the database 2 in real time, where the associated service data includes an SOA return log, a Redis return log, and the like; the response data obtaining module 333 is configured to obtain actual response data in the database 2, i.e. a response log, in real time.
The production test module 34 is configured to sequentially play back the actual request data in the test environment, and obtain simulated response data obtained by processing the actual request data according to the associated service data by the application to be issued 31; and comparing the simulated response data with the actual response data, and screening each functional unit of the application 31 to be issued.
In a preferred embodiment, the request data obtaining module 331 includes a first obtaining module 3311, configured to take out actual request data from the database 2 within a period of time, and place the actual request data into a test environment to perform a simulation request, that is, the actual request data are requested again in the application 31 to be issued in sequence. The Redis Mock subsystem 321 and the SOA Mock subsystem 322 simulate SOA service data and Redis service data of an online environment, the application to be released obtains associated service data from the Redis Mock subsystem 321 and the SOA Mock subsystem 322, and actual request data are processed to obtain simulated response data. The production test module 34 can screen each functional unit of the application 31 to be issued by comparing the simulated response data returned by the test environment with the actual response data returned by the online environment stored in the database 2, and find the problem of the application 31 to be issued in time.
Further, in some embodiments, the applied test system 3 further comprises: the pressure test module 35 is configured to playback the actual request data in the test environment at a preset request rate, and acquire output data of the application to be issued 31 processing the actual request data according to the associated service data; and obtains the pressure test result of the application to be issued 31 based on the preset request rate according to the output data.
Specifically, the request data obtaining module 331 further includes a second obtaining module 3312, configured to intercept a large amount of request data from the database 2, and put the request data into the application to be issued 31 for performing a simulation request. The pressure test module 35 analyzes the performance index of the to-be-issued application 31 when processing a large amount of request data simultaneously according to the output data of the to-be-issued application 31. By simulating the request of the online environment and simultaneously performing mock on the associated service interface, the accuracy of the performance test can be ensured.
Further, the pressure testing module 35 may be provided with a rate adjusting module 351, configured to adjust the request rate, and obtain the pressure testing result of the application 31 to be issued based on different request rates. By adjusting the rate of the request data of the on-line environment during the playback of the test environment, the performance of the application 31 to be issued at different request rates can be measured.
Further, in some embodiments, the applied test system 3 further comprises: a fault analysis module 36, configured to obtain, in real time, abnormal request data of the published application 1 in the online environment; replaying the abnormal request data in the test environment, and acquiring a data stream generated by processing the abnormal request data by the application to be issued 31; and performs failure analysis on the published application 1 according to the data flow.
Specifically, the request data obtaining module 331 further includes a third obtaining module 3313, configured to intercept exception request data of the online environment in real time, and put the exception request data into the test environment again for requesting. The fault analysis module 36 analyzes the fault of the environment on the troubleshooting line according to the data stream generated by processing the abnormal request data by the application to be issued 31.
The test system of the application of the embodiment integrates the log data of the database, the Redis and the SOA, provides functions of function test, pressure test, fault diagnosis and the like for the application, realizes real-time acquisition of request data of an online environment, simulates the online environment in a test environment in real time, tests and diagnoses abnormity of the online environment, and quickly locates a fault position. The method and the device can find the function abnormity of the application to be published in time, provide the fault backtracking analysis of the published application, and improve the operation guarantee capability and the problem handling efficiency of the online environment.
The embodiment of the present application further provides an electronic device, which includes a processor and a memory, where the memory stores executable instructions, and the processor is configured to execute the steps of the test method of the application in the foregoing embodiment by executing the executable instructions.
As described above, the electronic device of the present application can obtain request data of an online environment in real time, and can simulate the online environment in real time in a test environment, find a problem of an application to be released in time, and diagnose a fault of the released application.
Fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the present application, and it should be understood that fig. 6 only schematically illustrates various modules, which may be virtual software modules or actual hardware modules, and the combination, the splitting, and the addition of the remaining modules of these modules are within the scope of the present application.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module, "or" platform.
The electronic device 400 of the present application is described below with reference to fig. 6. The electronic device 400 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, electronic device 400 is embodied in the form of a general purpose computing device. The components of electronic device 400 may include, but are not limited to: at least one processing unit 410, at least one memory unit 420, a bus 430 connecting different platform components (including memory unit 420 and processing unit 410), a display unit 440, and the like.
Wherein the storage unit stores a program code, which can be executed by the processing unit 410, so that the processing unit 410 performs the steps of the testing method of the application described in the above embodiments. For example, the processing unit 410 may perform the steps as shown in fig. 1 to 3.
The storage unit 420 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM) 4201 and/or a cache memory unit 4202, and may further include a read only memory unit (ROM) 4203.
Storage unit 420 may also include a program/utility 4204 having a set (at least one) of program modules 4205, such program modules 4205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment.
Bus 430 may be any bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 400 may also communicate with one or more external devices 500 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 400, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 400 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interfaces 450. Also, the electronic device 400 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) through the network adapter 460. The network adapter 460 may communicate with other modules of the electronic device 400 via the bus 430. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, to name a few.
The embodiment of the present application further provides a computer-readable storage medium for storing a program, and when the program is executed, the steps of the method for testing an application described in the above embodiment are implemented. In some possible embodiments, the various aspects of the present application may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps of the method for testing an application described in the above embodiments, when the program product is run on the terminal device.
As described above, the computer-readable storage medium of the present application can acquire request data of an online environment in real time, and can simulate the online environment in a test environment in real time, find a problem of an application to be released in time, and diagnose a fault of the released application.
Fig. 7 is a schematic structural diagram of a computer-readable storage medium of the present application. Referring to fig. 7, a program product 600 for implementing the above method according to an embodiment of the present application is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present application is not so limited, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to external computing devices (e.g., through the internet using an internet service provider).
The foregoing is a further detailed description of the present application in connection with specific preferred embodiments and it is not intended to limit the present application to the particular forms set forth herein. For those skilled in the art to which the present application pertains, several simple deductions or substitutions may be made without departing from the concept of the present application, and all should be considered as belonging to the protection scope of the present application.

Claims (4)

1. A method for testing an application, comprising:
constructing a test environment comprising an application to be released and a Mock subsystem, wherein the Mock subsystem comprises a Redis Mock subsystem and an SOA Mock subsystem;
acquiring running data of published applications in an online environment, wherein the running data comprises actual request data, associated service data and actual response data, and storing the associated service data to the Mock subsystem; the system comprises a Redis Mock subsystem, an SOA Mock subsystem and an application to be issued, wherein the Redis Mock subsystem stores the associated service data, the published application runs cache data used for processing requests in an online environment so as to be called when the to-be-published application processes the same requests in a test environment, the SOA Mock subsystem stores the associated service data, and the published application runs service data used for processing requests of different functional units in the online environment so as to be called when the to-be-published application processes the requests of the same functional units in the test environment;
sequentially playing back actual request data in the test environment, and returning the associated service data according to the online environment by using the Redis Mock subsystem and the SOA Mock subsystem so as to obtain simulated response data obtained by processing the actual request data by the application to be issued according to the associated service data;
comparing the simulated response data with the actual response data, and screening each functional unit of the application to be issued;
acquiring abnormal request data of published applications in an online environment in real time, replaying the abnormal request data in the test environment, acquiring a data stream generated by processing the abnormal request data by the application to be published, and performing fault analysis on the published applications according to the data stream;
playing back actual request data in the test environment according to a preset request rate, and acquiring output data of the application to be issued for processing the actual request data according to the associated service data;
acquiring a pressure test result of the application to be issued based on the preset request rate according to the output data;
and adjusting the request rate, and acquiring pressure test results of the application to be issued based on different request rates.
2. A test system for an application, comprising:
the system comprises a test environment and a plurality of modules, wherein the test environment comprises an application to be released and a Mock subsystem, and the Mock subsystem comprises a Redis Mock subsystem and an SOA Mock subsystem;
the data acquisition module is used for acquiring running data of published applications in an online environment, wherein the running data comprises actual request data, associated service data and actual response data, and storing the associated service data to the Mock subsystem; the Redis Mock subsystem stores cache data used by the published application to run a processing request in an online environment in the associated service data so as to be called when the to-be-published application processes the same request in a test environment, the SOA Mock subsystem stores the cache data used by the published application to run the request for processing different functional units in the associated service data so as to be called when the to-be-published application processes the request for processing the same functional unit in the test environment;
the production test module is used for sequentially playing back actual request data in the test environment, and returning the associated service data according to the online environment by using the Redis Mock subsystem and the SOA Mock subsystem so as to obtain simulated response data obtained by processing the actual request data according to the associated service data by the application to be issued; comparing the simulated response data with the actual response data, and screening each functional unit of the application to be issued;
the fault analysis module is used for acquiring abnormal request data of published applications in an online environment in real time, playing back the abnormal request data in the test environment, acquiring a data stream generated by the to-be-published applications processing the abnormal request data, and performing fault analysis on the published applications according to the data stream;
the pressure testing module is used for replaying actual request data in the testing environment according to a preset request rate and acquiring output data of the application to be issued for processing the actual request data according to the associated service data; acquiring a pressure test result of the application to be issued based on the preset request rate according to the output data;
and the rate adjusting module is used for adjusting the request rate and acquiring the pressure test result of the application to be issued based on different request rates.
3. An electronic device, comprising:
a processor; and
a memory for storing executable instructions;
wherein the processor is configured to perform the steps of the method of testing of an application of claim 1 via execution of the executable instructions.
4. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of a method for testing an application of claim 1.
CN201811255838.XA 2018-10-26 2018-10-26 Application testing method, system, electronic device and storage medium Active CN109271325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811255838.XA CN109271325B (en) 2018-10-26 2018-10-26 Application testing method, system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811255838.XA CN109271325B (en) 2018-10-26 2018-10-26 Application testing method, system, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN109271325A CN109271325A (en) 2019-01-25
CN109271325B true CN109271325B (en) 2022-11-04

Family

ID=65193584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811255838.XA Active CN109271325B (en) 2018-10-26 2018-10-26 Application testing method, system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN109271325B (en)

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522727B (en) * 2019-02-01 2023-04-14 阿里巴巴集团控股有限公司 Simulation object test method, device and system
CN109739680A (en) * 2019-02-02 2019-05-10 广州视源电子科技股份有限公司 Trouble shoot method, apparatus, equipment and the medium of application system
CN110309064A (en) * 2019-05-30 2019-10-08 重庆金融资产交易所有限责任公司 Unit test method, device, equipment and storage medium based on log recording
CN110347591A (en) * 2019-06-19 2019-10-18 平安普惠企业管理有限公司 Method, apparatus, electronic equipment and storage medium based on use-case test macro
CN110471696B (en) * 2019-07-05 2024-04-05 平安证券股份有限公司 Clearing data playback comparison method, device, computer equipment and storage medium
CN110489334A (en) * 2019-07-24 2019-11-22 贝壳技术有限公司 A kind of system integration and test test processing method and device
CN112306845A (en) * 2019-07-31 2021-02-02 腾讯科技(深圳)有限公司 Concurrent testing method, device, equipment and medium
CN110765004A (en) * 2019-09-26 2020-02-07 北京你财富计算机科技有限公司 Testing method and device based on sandbox system and electronic equipment
CN110825636B (en) * 2019-11-05 2021-03-30 腾讯科技(深圳)有限公司 Matching algorithm performance test method, device, equipment, system and medium
CN111045942A (en) * 2019-12-12 2020-04-21 同盾控股有限公司 Application testing method, system, storage medium and electronic equipment
CN111010316B (en) * 2019-12-17 2021-08-06 广州唯品会信息科技有限公司 Flow playback method, device and system
CN113268391A (en) * 2020-02-14 2021-08-17 北京沃东天骏信息技术有限公司 Method, apparatus, device and storage medium for data playback
CN113434384B (en) * 2020-03-23 2023-09-22 北京京东振世信息技术有限公司 Pressure testing method and device
CN111641534B (en) * 2020-05-28 2021-08-03 深圳华锐金融技术股份有限公司 Data transmission equipment testing method and device, computer equipment and storage medium
CN112422648B (en) * 2020-11-05 2023-02-24 北京字节跳动网络技术有限公司 Data synchronization method and system
CN112363938A (en) * 2020-11-12 2021-02-12 平安普惠企业管理有限公司 Data processing method and device, electronic equipment and storage medium
CN112615759B (en) * 2020-12-17 2023-03-31 上海哔哩哔哩科技有限公司 Full link voltage measurement assembly, full link voltage measurement method and device
CN112532747B (en) * 2020-12-23 2023-04-18 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for outputting information
CN112631934A (en) * 2020-12-30 2021-04-09 上海高顿教育科技有限公司 Method and device for testing software online problems
CN113422794A (en) * 2021-02-09 2021-09-21 阿里巴巴集团控股有限公司 Traffic recording and playback processing method and device and electronic equipment
CN113553260B (en) * 2021-07-22 2022-07-19 工银科技有限公司 Test method, test apparatus, device, and medium
CN113672513A (en) * 2021-08-23 2021-11-19 四川新网银行股份有限公司 System and method for automatically generating test baffle
CN114265618A (en) * 2021-11-30 2022-04-01 重庆富民银行股份有限公司 Method for publishing and rolling back by applying one key
CN114553929B (en) * 2022-01-10 2024-04-12 多点生活(成都)科技有限公司 Recording playback enhancement method and device for recording call dynamic Mock

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107517139A (en) * 2016-06-17 2017-12-26 阿里巴巴集团控股有限公司 Data processing method and system, device test system and bus test system
CN106603283B (en) * 2016-12-13 2019-09-13 广州品唯软件有限公司 A kind of method, apparatus and centralized management platform of analog service
CN107329890A (en) * 2017-06-06 2017-11-07 北京金山安全软件有限公司 Test method and device based on Mock and server
CN108170612B (en) * 2018-01-23 2021-01-15 百度在线网络技术(北京)有限公司 Automatic testing method and device and server

Also Published As

Publication number Publication date
CN109271325A (en) 2019-01-25

Similar Documents

Publication Publication Date Title
CN109271325B (en) Application testing method, system, electronic device and storage medium
CN110083543B (en) Regression testing method, device, electronic equipment and storage medium
US8578340B1 (en) Recording and replaying computer program execution with recorded execution event breakpoints
US8433733B2 (en) Web application record-replay system and method
US9465718B2 (en) Filter generation for load testing managed environments
US20140317602A1 (en) Graphical User Interface Debugger with User Defined Interest Points
US20140331209A1 (en) Program Testing Service
US9594670B2 (en) Managing software dependencies during software testing and debugging
CN111309343B (en) Development deployment method and device
CN111124919A (en) User interface testing method, device, equipment and storage medium
US9928163B2 (en) Dynamic test topology visualization
KR20210049033A (en) Method for fault injection, device, electronic equipment and storage medium
Roehm et al. Monitoring user interactions for supporting failure reproduction
US11294803B2 (en) Identifying incorrect variable values in software testing and development environments
CN111309570A (en) Pressure testing method, medium, device and computing equipment
US11249880B1 (en) Debugging and simulating application runtime execution
CN111488275B (en) UI (user interface) automatic testing method and device, storage medium and electronic equipment
US10417116B2 (en) System, method, and apparatus for crowd-sourced gathering of application execution events for automatic application testing and replay
CN111309606A (en) Page exception handling method and device, computer equipment and storage medium
CN113641575B (en) Test method, device, equipment and storage medium
CN112506772B (en) Web automatic test method, device, electronic equipment and storage medium
CN110609786A (en) Software testing method and device, computer equipment and storage medium
CN115509925A (en) Automatic interface testing method and related device
Machado et al. Minha: Large-scale distributed systems testing made practical
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium

Legal Events

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