CN111988200B - Automatic regression testing method and device based on real flow - Google Patents

Automatic regression testing method and device based on real flow Download PDF

Info

Publication number
CN111988200B
CN111988200B CN202010833351.6A CN202010833351A CN111988200B CN 111988200 B CN111988200 B CN 111988200B CN 202010833351 A CN202010833351 A CN 202010833351A CN 111988200 B CN111988200 B CN 111988200B
Authority
CN
China
Prior art keywords
version
flow
message queue
line
target application
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
CN202010833351.6A
Other languages
Chinese (zh)
Other versions
CN111988200A (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.)
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Original Assignee
Hunan Happly Sunshine Interactive Entertainment Media 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 Hunan Happly Sunshine Interactive Entertainment Media Co Ltd filed Critical Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority to CN202010833351.6A priority Critical patent/CN111988200B/en
Publication of CN111988200A publication Critical patent/CN111988200A/en
Application granted granted Critical
Publication of CN111988200B publication Critical patent/CN111988200B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an automatic regression testing method and device based on real flow, which are used for obtaining on-line effective flow and storing the effective flow into a message queue; updating in response to the target application, and acquiring version information corresponding to the target application, wherein the version information at least comprises an online stable version and a version to be verified; according to the on-line effective flow of the message queue, operating a target application corresponding to the on-line stable version to obtain a noise parameter and first feedback data; running a target application corresponding to the version to be verified according to the on-line effective flow and the noise parameters of the message queue to obtain second playback data; and obtaining a test result of the target application according to the first playback data and the second playback data. The real online flow is guided to the service of the corresponding version for comparison and verification of the response result, so that the coverage range of the test case is wide without writing, and the stability of the service is improved.

Description

Automatic regression testing method and device based on real flow
Technical Field
The invention relates to the technical field of information processing, in particular to an automatic regression testing method and system based on real flow.
Background
After the information system is on-line, iteration upgrading and even reconstruction are usually needed, and how to ensure the correctness of the original service of the modified system is very important. Uncomplicated business systems can be solved by some conventional automated testing tools plus manual testing, but for very complex business systems, regression testing will become a huge project.
At present, an existing regression testing tool is usually adopted, for example, a Diff testing technology is used, but the existing regression testing tool cannot provide services for multiple application accesses at the same time, and cannot realize automatic processing of flow playback, so that the coverage range is narrow, and the stability of testing is reduced.
Disclosure of Invention
In order to solve the problems, the invention provides an automatic regression testing method and device based on real flow, and aims to achieve the purposes of wide coverage range and improvement of testing stability.
In order to achieve the purpose, the invention provides the following technical scheme:
an auto-regression testing method based on real flow comprises the following steps:
obtaining an on-line effective flow and storing the effective flow into a message queue;
responding to the update of a target application, and acquiring version information corresponding to the target application, wherein the version information at least comprises an online stable version and a version to be verified;
operating the target application corresponding to the on-line stable version according to the on-line effective flow of the message queue to obtain a noise parameter and first feedback data;
running a target application corresponding to the version to be verified according to the on-line effective flow of the message queue and the noise parameter to obtain second playback data;
and obtaining a test result of the target application according to the first playback data and the second playback data.
Optionally, the obtaining of the online effective flow includes:
and acquiring the on-line effective flow through predefined target information, wherein the target information comprises a predefined application name, an effective interface, and a service address and a port corresponding to the application.
Optionally, the method further comprises:
and forwarding the effective flow on the line by using a replication system, so that the playback environment is the same as the flow capturing environment.
Optionally, the version information of the target application includes two online stable versions and one version to be verified.
Optionally, the storing the effective traffic to the message queue includes:
and responding to the forwarding of the on-line effective flow to the proxy service, storing the on-line effective flow into a message queue by using the proxy service, and enabling the consumers of the message queue to send the on-line effective flow to the business service of the target application in sequence.
Optionally, the operating the target application corresponding to the on-line stable version according to the on-line effective flow of the message queue to obtain the noise parameter and the first feedback data includes:
forwarding the on-line effective flow of the message queue to the service corresponding to the two on-line stable versions, so that the two on-line stable versions respond;
and adding the inconsistent fields into the noise according to the response result to obtain the noise parameters and the first playback data.
Optionally, the operating the target application corresponding to the version to be verified according to the online effective flow of the message queue and the noise parameter to obtain second playback data includes:
forwarding the on-line effective flow of the message queue to a service corresponding to the version to be verified, so that the version to be verified responds;
and obtaining second playback data according to the noise parameters and the response result.
An auto-regression testing device based on real flow, comprising:
the system comprises a first acquisition unit, a second acquisition unit and a message queue, wherein the first acquisition unit is used for acquiring online effective flow and storing the effective flow to the message queue;
the second obtaining unit is used for responding to the update of a target application and obtaining version information corresponding to the target application, wherein the version information at least comprises an online stable version and a version to be verified;
the first operation unit is used for operating the target application corresponding to the on-line stable version according to the on-line effective flow of the message queue to obtain a noise parameter and first feedback data;
the second operation unit is used for operating the target application corresponding to the version to be verified according to the on-line effective flow of the message queue and the noise parameter to obtain second playback data;
and the third acquisition unit is used for acquiring the test result of the target application according to the first playback data and the second playback data.
An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, implements a real flow based auto-regression testing method as described in any of the above.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements a method for real flow based auto-regression testing as described in any one of the above.
Compared with the prior art, the invention provides an automatic regression testing method and device based on real flow, which are used for acquiring online effective flow and storing the effective flow into a message queue; updating in response to the target application, and acquiring version information corresponding to the target application, wherein the version information at least comprises an online stable version and a version to be verified; according to the on-line effective flow of the message queue, operating a target application corresponding to the on-line stable version to obtain a noise parameter and first feedback data; running a target application corresponding to the version to be verified according to the on-line effective flow and the noise parameters of the message queue to obtain second playback data; and obtaining a test result of the target application according to the first playback data and the second playback data. The real online flow is guided to the service of the corresponding version for comparison and verification of the response result, so that the coverage range of the test case is wide without writing, and the stability of the service is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of an auto-regression testing method based on real traffic according to an embodiment of the present invention;
fig. 2 is a flowchart of recursive comparison of JSON format response results according to an embodiment of the present invention;
fig. 3 is a component relationship diagram based on an online flow regression test according to an embodiment of the present invention;
fig. 4 is a flow chart of a service processing of a proxy server based on a flow auto-regression test according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an auto-regression testing apparatus based on real flow according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first" and "second," and the like in the description and claims of the present invention and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not set forth for a listed step or element but may include steps or elements not listed.
The embodiment of the invention provides an automatic regression testing method based on real flow, which supports simultaneous playback of a plurality of applications by managing basic information and interface information of background configuration applications, supports flow coverage rate statistics of each application, supports independent storage of flow, supports the support of various HTTP protocols such as POST, GET, PUT and the like, is tightly combined with an operation and maintenance platform to automatically execute regression testing, and has a clear result compared with a highlighted display difference on an interface.
Referring to fig. 1, an auto-regression testing method based on real traffic provided in an embodiment of the present invention includes:
s101, obtaining the on-line effective flow and storing the effective flow into a message queue.
The embodiment of the invention can be applied to a test system, the name and effective interface definition of the management background definition application of the test system, and the service address/port corresponding to the target application corresponding to the rear application. The system identifies http _ request _ path and http _ method of the interface according to the traffic, and the http _ request _ path and http _ method are online traffic, and contain illegal requests (the traffic has no meaning in playback) and health detection requests of the operation and maintenance monitoring system (mainly used for health degree check, and playback of the type of interface has no meaning). Thus, the user selects in the background which interfaces are of interest (or service needs). Meanwhile, the first playback 2 does not provide the interface data with the flow, so that the first time the user needs to manually configure the interface in the list, the interface in the list can be used as the effective flow, the interface which is not in the list needs to be manually confirmed by the operator, and the next playback takes effect. The forwarding of the online traffic in the embodiment of the present invention depends on an operation and maintenance replication system, and may also be implemented simply by using GoReplay. The tcp flow forwarding based on the network card, such workers have tcpcopy, goleplay and the like, and the invention uses the goreplay for simplicity. Based on application req/resp traffic forwarding, this type is usually realized by means of agent, interceptor, etc., which can fetch request/response in one step, but it is limited to a few supported languages, for example, java agent is only suitable for java. In fact, goreplay also enables grabbing req/resp, but this requires that the playback environment must be just as effective as the traffic grabbing environment.
And the online traffic of illegal requests and service requirements is excluded as effective online traffic. The active online traffic is forwarded to the proxy service, which stores the traffic in a message queue.
S102, responding to the update of the target application, and obtaining version information corresponding to the target application, wherein the version information at least comprises an online stable version and a version to be verified.
The version information of the target application in the embodiment of the application comprises two online stable versions and one version to be verified. When the application deployment is specified to be updated, the image updating system infrastructure of the operation and maintenance calls three version deployments of the corresponding application, wherein two versions are online stable versions, and the other version is an unstable version to be updated (namely a version to be verified). The purpose of the two on-line stable versions is to automatically identify the noise field for inclusion in the exclusion list. The stable version of the copy on the middle line is to automatically identify the noisy field. The noise refers to parameters, such as a timestamp, a server name, a uuid and the like, which change every time the interface request is made, and these fields are excluded, so that real inconsistent fields can be identified more effectively, and the judgment result is not influenced by the originally inconsistent fields. When there is no intermediate stable version copy, the system is able to perform normally, except that the operator needs to pay more attention to the noise field and add it manually to the exclusion list of the interface.
S103, operating the target application corresponding to the on-line stable version according to the on-line effective flow of the message queue to obtain a noise parameter and first feedback data.
And S104, operating the target application corresponding to the version to be verified according to the on-line effective flow of the message queue and the noise parameter to obtain second playback data.
And S105, obtaining a test result of the target application according to the first playback data and the second playback data.
Correspondingly, the operating the target application corresponding to the on-line stable version according to the on-line effective flow of the message queue to obtain the noise parameter and the first feedback data includes: forwarding the on-line effective flow of the message queue to the service corresponding to the two on-line stable versions, so that the two on-line stable versions respond; and adding the inconsistent fields into the noise according to the response result to obtain the noise parameters and the first playback data. The operating the target application corresponding to the version to be verified according to the on-line effective flow of the message queue and the noise parameter to obtain second playback data includes: forwarding the on-line effective flow of the message queue to a service corresponding to the version to be verified, so that the version to be verified responds; and obtaining second playback data according to the noise parameters and the response result.
And after forwarding the effective flow on the line to the first two stable services, comparing the response, adding the inconsistent fields into the noise, and removing the comparison result to obtain the first playback data. And after the effective flow is forwarded to the third unstable service, comparing the results by combining the noise fields, and storing the inconsistent fields to obtain second playback data. The management background displays the coverage rate of the current flow and the consistent/inconsistent result of each interface according to the flow dimension in real time, and can perform closing control at any time in the process. After the playback operation is closed, an evaluation needs to be performed on the operation, such as: if the fault needs to be repaired, the automatic deployment process of the operation and maintenance system is interrupted, and the online process is restarted after the fault needs to be repaired; and normal online can be continued through verification.
For example, the online stable version 1 is called service a, the online stable version 2 is called service B, and the version 1 to be verified is called service C.
The process of playback is sequentially executed:
(1) sending the current flow to a service A to obtain a response RA;
(2) sending the current flow to a service B to obtain a response RB;
(3) sending the current flow to a service C to obtain a response RC;
(4) responding RA and RB for comparison to obtain inconsistent field list DKeySet
(5) Responses RA and RC are compared, and if the key is inconsistent during the comparison, the inconsistency is ignored in DKeySet. The final obtained inconsistent field is the differentiated changed field.
The specified flow can be played back again in the management background to quickly verify whether the function of the interface is repaired or not, the specified flow can also be added into an automation scene, and the flow request can be executed every time the automation is executed subsequently.
In the embodiment of the invention, the on-line effective flow is stored into the message queue by using the proxy service in response to the forwarding of the on-line effective flow to the proxy service, so that the consumers of the message queue send the on-line effective flow to the business service of the target application in sequence.
Specifically, the online traffic is forwarded to the proxy service, and the proxy service stores the traffic in a message queue to deal with the peak clipping processing of the large concurrency amount; the method comprises the steps that a consumer of a message queue forwards flow to three rear business services, the flow is stored according to a reservoir algorithm of a KEY (VALUE) of a request parameter, all the parameters are important parameters through identification and defaulting, the parameters can also be edited into parameters without concern, and the flow is stored according to a strategy of storing x pieces of the same parameters at most when the request is carried out.
The three major functions of the message queue include: peak clipping and valley filling, asynchronous processing and module decoupling. The peak clipping here means that the proxy service receives the traffic of the geeply and forwards, if it receives the traffic and immediately starts to process, there is no problem when the traffic is small, but if the traffic is suddenly large, the processing capability of the proxy service may not keep up, and indirectly may affect the performance of the on-line diversion server, so that the proxy service does not process the received traffic, stores all the traffic into the MQ message queue, immediately replies that the on-line server is OK, and continues to the next one. The consumers of the latter MQ then do the actual message consumption processing with a fixed thread pool (which can be understood here as the configured concurrency of the three services). Therefore, the system can support a plurality of applications to play back simultaneously and is not interfered mutually. The flow effect of the reservoir dam is similar to that of a reservoir dam, no matter how large the upstream water flow is, the reservoir is advanced, and the gate fixed by the dam is arranged at the downstream to discharge stable flow.
On the basis of the above embodiment, information such as the identification of the application, the notification address of the application administrator, the three service addresses of the application server, the effective interface list of the application, the field type of the interface response, and the like is set. The service addresses of the three applications at the opposite end are provided with specific addresses by an operation and maintenance mirror image updating system, and the service addresses can also be manually set. When the flow of a plurality of applications is sent to the proxy server, the proxy server identifies which application is according to the Header information in the flow, and although the subsequent logic is the same, the data is bound to the statistical data of the application. The comparison of the response interfaces configures the processor according to the configured field type, and if the processor is the JSON type, the processor further analyzes each field in the JSON and compares the fields one by one. Communicating with an operation and maintenance deployment system in the online process, and if the verification process fails, restarting the online process after repairing; and the online operation can be continued until the interface verification passes or the research and development personnel confirm that the modification is not influenced.
Compared with the prior art, the method for the automatic regression test based on the online real flow is characterized in that the flow of the real online server is copied and is guided to three devices to perform comparison verification on the response result in the service provided by the user, so that the effect of service version iteration on the online version can be verified without compiling a test case and with a wide coverage range, the test cost is reduced, and the service stability is improved.
Referring to fig. 2, which shows a flowchart of recursive comparison of response results to JSON format according to an embodiment of the present invention, including:
step 1, acquiring all child nodes at the same level by two JSON objects, and carrying out Equals comparison;
step 2, whether the types and the number of the nodes are consistent or not is judged, and if the types or the number are inconsistent, the two JSONs are inconsistent;
step 3, if the child node is of the specific value type, comparing the values of the specific child node, and continuing to judge the next node when the values are consistent;
and 4, if the child node is the object, recursively judging consistency comparison of the JSonObject or the JSonAlrray.
Referring to fig. 3, a component relationship diagram based on an online flow regression test according to an embodiment of the present invention is shown. The relationship of the system components to each other is described below.
An online traffic forwarding script: the method is integrated with an operation and maintenance system, and the starting copying and forwarding of the flow is triggered when the management background operation starts playback; the bottom layer may use GoReply or other traffic replication tools to integrate this functionality by the operation and maintenance management system.
The mirror image updating system comprises: the service system is in charge of the online process of the business, and the system and the mirror image updating system interact through an API (application programming interface); when a business application initiates an online updating process, a mirror image updating system invokes updating of three version applications of a server, and then a management background (the interior is called as service footprint application) is notified through an API (application programming interface), at the moment, a version online initiating person can apply for flow forwarding operation in the management background, and an application operation and maintenance person approves whether to allow online flow copying operation according to specific load of the application; and after the flow playback on the management background meets the actual test standard (the interface coverage rate reaches an index, and the interface success rate reaches the index), closing flow copying and stopping the playback can be carried out on the operation interface, at the moment, version online initiating personnel is required to give a conclusion according to a result, if the playback verification fails, an API (application programming interface) interface of the mirror image updating system is called, the flow is notified of to fail, a subsequent pre-release link cannot be carried out, and if the conclusion is successful, the mirror image system is notified to continue the next pre-release operation.
Managing a background: the method is a visualized operation interface based on vue-admin-template, and provides an operation interface for edition on-line initiating personnel and operation and maintenance personnel.
The system of autoregressive testing (service footprint) contains three components: proxy service, operation and maintenance management and management background.
Service footprint agent service: receiving the forwarding of the online flow, forwarding the flow data to the MQ according to the Header binding application, simultaneously forwarding the flow to three services behind the service by the consumption end of the MQ, comparing interface responses, and binding the comparison result in the application information for storage.
A service footprint management background: storing data based on MySQL, simultaneously providing the data to all interfaces of the management background API, and carrying out data interaction with the front-end management background interface; and executing a timing task, and sending the flow playback related result to a service manager.
And (5) service footprint operation and maintenance management: and the operation and maintenance system is in interface communication and is responsible for responding to the state updating information of the operation and maintenance system and informing the operation and maintenance system whether to continue to perform the next operation.
Referring to fig. 4, it shows a flow chart of the proxy server service processing based on the traffic auto-regression test according to an embodiment of the present invention, including:
the flow recording tool forwards the flow to a proxy service of the service footprint, the proxy service identifies the application according to the Header/service server IP of the flow and stores the data in the MQ message queue; and the consumers of the MQ message queue store the flow into a warehouse according to the applied interface and update the information of the flow tasks such as the batch, the initial time, the quantity statistics and the like.
The queue consumer sends the application to three servers of the service configuration in case the management background has started traffic replay:
requesting a stabilization server to obtain a response A, requesting a stabilization server copy to obtain a response B, and comparing the response A with the response B to obtain a non-uniform field as noise;
obtaining a response C when the version of the server to be verified is requested, comparing the response A with the response C, adding noise to be eliminated, passing the verification if the comparison result is consistent, and failing the verification if the comparison result is inconsistent;
whether the verification is passed or failed, the statistical state and the result are stored in a storage mode;
correspondingly, the embodiment of the invention also includes a time sequence flow based on the online flow automatic regression test and the communication of the operation and maintenance system, which comprises the following steps:
the operation and maintenance system firstly responds to the operation of an application deployer, updates the gray mirror image, calls an operation and maintenance management interface of the service footprint through an interface API and informs the operation and maintenance management interface that the corresponding states of the three servers are updated; at this point the completion server state is from not ready to ready;
an operator on the online version initiates a flow recording application, the state of the server is changed into a state to be audited, the operation and maintenance manager performs audit, if the audit is passed, the flow recording application is ready, if the audit is not passed, the flow recording application is cancelled, and the flow playback application needs to be initiated again in the cancelled state;
when the audit is passed, simultaneously informing the on-line server to start to initiate a flow recording and replaying function to the service footprint agent, and changing the state of the server into recording;
after receiving the flow, the service footprint agent starts to use MQ to carry out next playback and result comparison, and displays the result to the version online initiating personnel, and the version online initiating personnel evaluates whether the current modification meets the expectation;
in the process, the operation and maintenance system can poll the service footprint operation and maintenance management terminal all the time to obtain the current progress and the final state, and carry out the subsequent next processing according to the final state.
In the embodiment of the invention, the management background can also generate JSON to compare with the highlight result graph, and the generated page refers to the realization of code highlight in the github, so that the difference is displayed more friendly and more efficiently.
Referring to fig. 5, in an embodiment of the present invention, an auto-regression testing apparatus based on real flow is further provided, including:
a first obtaining unit 10, configured to obtain an effective traffic on a line, and store the effective traffic in a message queue;
a second obtaining unit 20, configured to respond to a target application for updating, and obtain version information corresponding to the target application, where the version information at least includes an online stable version and a version to be verified;
a first operation unit 30, configured to operate a target application corresponding to the on-line stable version according to the on-line effective flow of the message queue, so as to obtain a noise parameter and first playback data;
a second operation unit 40, configured to operate, according to the online effective flow of the message queue and the noise parameter, a target application corresponding to the version to be verified, so as to obtain second playback data;
a third obtaining unit 50, configured to obtain a test result of the target application according to the first playback data and the second playback data.
On the basis of the above embodiment, the first acquisition unit includes:
the system comprises a first obtaining subunit, configured to obtain an online valid traffic according to predefined target information, where the target information includes a predefined application name, a valid interface, and a service address and a port corresponding to the application.
On the basis of the above embodiment, the apparatus further includes:
and the forwarding unit is used for forwarding the effective flow on the line by using the replication system, so that the playback environment is the same as the flow capturing environment.
On the basis of the above embodiment, the version information of the target application includes two online stable versions and one version to be verified.
On the basis of the above embodiment, the first acquisition unit includes:
and the storage subunit is used for responding to the forwarding of the on-line effective flow to the proxy service, storing the on-line effective flow into the message queue by using the proxy service, and enabling the consumers of the message queue to send the on-line effective flow to the business service of the target application in sequence.
On the basis of the foregoing embodiment, the first operation subunit is specifically configured to:
forwarding the on-line effective flow of the message queue to the service corresponding to the two on-line stable versions, so that the two on-line stable versions respond;
and adding the inconsistent fields into the noise according to the response result to obtain the noise parameters and the first playback data.
On the basis of the foregoing embodiment, the second operation subunit is specifically configured to:
forwarding the on-line effective flow of the message queue to a service corresponding to the version to be verified, so that the version to be verified responds;
and obtaining second playback data according to the noise parameters and the response result.
Based on the foregoing embodiments, embodiments of the application provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the real flow based auto-regression testing method as any one of the above.
The embodiment of the invention also provides electronic equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and is characterized in that the processor executes the program and realizes the steps of the automatic regression testing method based on the real flow.
The Processor or the CPU may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understood that the electronic device implementing the above-mentioned processor function may be other electronic devices, and the embodiments of the present application are not particularly limited.
The computer storage medium/Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic Random Access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); but may also be various terminals such as mobile phones, computers, tablet devices, personal digital assistants, etc., that include one or any combination of the above-mentioned memories.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit. Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable Memory device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. An auto-regression testing method based on real flow is characterized by comprising the following steps:
obtaining an on-line effective flow and storing the effective flow into a message queue;
responding to the update of a target application, and acquiring version information corresponding to the target application, wherein the version information at least comprises an online stable version and a version to be verified;
operating the target application corresponding to the on-line stable version according to the on-line effective flow of the message queue to obtain a noise parameter and first feedback data;
running a target application corresponding to the version to be verified according to the on-line effective flow of the message queue and the noise parameter to obtain second playback data;
obtaining a test result of the target application according to the first playback data and the second playback data;
the storing the effective flow to the message queue includes:
and responding to the forwarding of the on-line effective flow to the agent service, identifying the application corresponding to the on-line effective flow by using the agent service, and storing the on-line effective flow into a message queue, so that the consumers of the message queue send the on-line effective flow to the service of the target application in sequence.
2. The method of claim 1, wherein the obtaining the on-line effective traffic comprises:
and acquiring the on-line effective flow through predefined target information, wherein the target information comprises a predefined application name, an effective interface, and a service address and a port corresponding to the application.
3. The method of claim 1, further comprising:
and forwarding the effective flow on the line by using a replication system, so that the playback environment is the same as the flow capturing environment.
4. The method of claim 1, wherein the version information of the target application comprises two online stable versions and one version to be verified.
5. The method according to claim 4, wherein the operating the target application corresponding to the online stable version according to the online effective traffic of the message queue to obtain the noise parameter and the first playback data comprises:
forwarding the on-line effective flow of the message queue to the service corresponding to the two on-line stable versions, so that the two on-line stable versions respond;
and adding the inconsistent fields into the noise according to the response result to obtain the noise parameters and the first playback data.
6. The method according to claim 5, wherein the operating the target application corresponding to the version to be verified according to the online effective traffic of the message queue and the noise parameter to obtain second playback data includes:
forwarding the on-line effective flow of the message queue to a service corresponding to the version to be verified, so that the version to be verified responds;
and obtaining second playback data according to the noise parameters and the response result.
7. An auto-regressive test device based on real flow, comprising:
the system comprises a first acquisition unit, a second acquisition unit and a message queue, wherein the first acquisition unit is used for acquiring online effective flow and storing the effective flow to the message queue;
the second obtaining unit is used for responding to the update of a target application and obtaining version information corresponding to the target application, wherein the version information at least comprises an online stable version and a version to be verified;
the first operation unit is used for operating the target application corresponding to the on-line stable version according to the on-line effective flow of the message queue to obtain a noise parameter and first feedback data;
the second operation unit is used for operating the target application corresponding to the version to be verified according to the on-line effective flow of the message queue and the noise parameter to obtain second playback data;
a third obtaining unit, configured to obtain a test result of the target application according to the first playback data and the second playback data;
storing the effective traffic to a message queue comprises: and responding to the forwarding of the on-line effective flow to the agent service, identifying the application corresponding to the on-line effective flow by using the agent service, and storing the on-line effective flow into a message queue, so that the consumers of the message queue send the on-line effective flow to the service of the target application in sequence.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the real flow based auto-regression testing method as claimed in any one of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for real flow based auto-regression testing as claimed in any one of claims 1 to 6.
CN202010833351.6A 2020-08-18 2020-08-18 Automatic regression testing method and device based on real flow Active CN111988200B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010833351.6A CN111988200B (en) 2020-08-18 2020-08-18 Automatic regression testing method and device based on real flow

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010833351.6A CN111988200B (en) 2020-08-18 2020-08-18 Automatic regression testing method and device based on real flow

Publications (2)

Publication Number Publication Date
CN111988200A CN111988200A (en) 2020-11-24
CN111988200B true CN111988200B (en) 2022-03-08

Family

ID=73435538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010833351.6A Active CN111988200B (en) 2020-08-18 2020-08-18 Automatic regression testing method and device based on real flow

Country Status (1)

Country Link
CN (1) CN111988200B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650688B (en) * 2020-12-30 2024-06-14 深圳前海微众银行股份有限公司 Automated regression testing method, associated device and computer program product
CN113032255B (en) * 2021-03-19 2024-03-01 广州虎牙科技有限公司 Response noise identification method, model, electronic device and computer storage medium
CN112948271B (en) * 2021-04-09 2024-06-25 腾讯科技(深圳)有限公司 Code testing method, device, equipment and storage medium
CN113312257B (en) * 2021-05-24 2023-09-22 深圳市中科明望通信软件有限公司 Version identification method and device, storage medium and computer equipment
CN113568795B (en) * 2021-07-30 2024-04-26 杭州时趣信息技术有限公司 Static service testing method, device, equipment and storage medium
CN113590497A (en) * 2021-09-27 2021-11-02 腾讯科技(深圳)有限公司 Business service test method and device, electronic equipment and storage medium
CN115022174B (en) * 2022-06-20 2024-03-26 北京奇艺世纪科技有限公司 Request processing method and device, readable storage medium and electronic equipment
CN115203063B (en) * 2022-09-16 2023-04-07 平安银行股份有限公司 Playback method and system of production flow re-running risk program based on real-time recording
CN117555809B (en) * 2024-01-09 2024-03-22 舟谱数据技术南京有限公司 Automatic testing method and related device based on flow replication playback

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6697964B1 (en) * 2000-03-23 2004-02-24 Cisco Technology, Inc. HTTP-based load generator for testing an application server configured for dynamically generating web pages for voice enabled web applications
CN101124565A (en) * 2005-01-06 2008-02-13 思科技术公司 Data traffic load balancing based on application layer messages
CN103283209A (en) * 2011-04-18 2013-09-04 北京新媒传信科技有限公司 Application service platform system and implementation method thereof
CN107181698A (en) * 2016-03-10 2017-09-19 谷歌公司 The system and method for single queue multi-stream service shaping
CN107924361A (en) * 2015-05-12 2018-04-17 麦纳斯有限公司 Method and system for automated software application test process
CN108512889A (en) * 2018-01-12 2018-09-07 深圳壹账通智能科技有限公司 A kind of application response method for pushing and proxy server based on HTTP

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9842045B2 (en) * 2016-02-19 2017-12-12 International Business Machines Corporation Failure recovery testing framework for microservice-based applications
US10614221B2 (en) * 2016-11-16 2020-04-07 International Business Machines Corporation Method and apparatus for security testing of application flows that cannot be automated through HTTP replay
US10678683B2 (en) * 2018-03-07 2020-06-09 Jpmorgan Chase Bank, N.A. System and method for automated service layer testing and regression
CN111274117B (en) * 2018-12-04 2023-04-18 阿里巴巴集团控股有限公司 Recommended service experiment and management method, device and system thereof
CN109831357B (en) * 2019-01-30 2020-12-29 北京大米科技有限公司 Service verification method, device, storage medium and server
CN110083543B (en) * 2019-05-07 2022-08-19 江苏满运软件科技有限公司 Regression testing method, device, electronic equipment and storage medium
CN111258897A (en) * 2020-01-15 2020-06-09 网银在线(北京)科技有限公司 Service platform testing method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6697964B1 (en) * 2000-03-23 2004-02-24 Cisco Technology, Inc. HTTP-based load generator for testing an application server configured for dynamically generating web pages for voice enabled web applications
CN101124565A (en) * 2005-01-06 2008-02-13 思科技术公司 Data traffic load balancing based on application layer messages
CN103283209A (en) * 2011-04-18 2013-09-04 北京新媒传信科技有限公司 Application service platform system and implementation method thereof
CN107924361A (en) * 2015-05-12 2018-04-17 麦纳斯有限公司 Method and system for automated software application test process
CN107181698A (en) * 2016-03-10 2017-09-19 谷歌公司 The system and method for single queue multi-stream service shaping
CN108512889A (en) * 2018-01-12 2018-09-07 深圳壹账通智能科技有限公司 A kind of application response method for pushing and proxy server based on HTTP

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Record and playback of inertial signals for in-the-loop testing of location based services;I. Partzsch;《2014 DGON Inertial Sensors and Systems (ISS)》;20150226;全文 *
基于流量回放的Web应用自动化测试工具的设计及实现;高晓慧;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20170615;全文 *
网络应用流量模拟技术;曹龙江等;《软件》;20150215(第02期);全文 *

Also Published As

Publication number Publication date
CN111988200A (en) 2020-11-24

Similar Documents

Publication Publication Date Title
CN111988200B (en) Automatic regression testing method and device based on real flow
US10990369B2 (en) Repurposing serverless application copies
CN106528224B (en) Content updating method, server and system for Docker container
CN115190035B (en) System, method, apparatus, and medium for providing mobile device support services
US20230161694A1 (en) Orchestration for automated performance testing
US20120266135A1 (en) On-demand software test environment generation
CN104765678A (en) Method and device for testing applications on mobile terminal
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN113141412B (en) Domain name switching method, system, device, equipment and storage medium
CN115632706B (en) FC link management method, device, equipment and readable storage medium
CN113407383A (en) Main/standby system switching method and device, server and main/standby system
CN112650688A (en) Automated regression testing method, associated device and computer program product
CN108897646B (en) Switching method of BIOS (basic input output System) chips and substrate management controller
CN112561506B (en) Live broadcast data processing method, system, equipment and medium based on virtual currency
CN113282501A (en) Block chain testing method and device and electronic equipment
US8639983B1 (en) Self-service testing
CN110502238A (en) A kind of method and device of front and back end joint debugging
US12020039B2 (en) Compute instance warmup operations
CN112905415B (en) Serial port log file acquisition method and device and related components
CN112650666B (en) Software testing system, method, device, control equipment and storage medium
CN113742239A (en) Terminal reader regression test system, regression test method and interaction method
CN118132120B (en) Service system updating method and device, electronic equipment and storage medium
CN113452550A (en) Information acquisition device, firmware updating method and system of embedded system device
WO2024146184A1 (en) Cloud database management method and related system
CN112565917B (en) Node selection 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