CN115048257A - System service function verification method and device, computer equipment and storage medium - Google Patents

System service function verification method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115048257A
CN115048257A CN202210555643.7A CN202210555643A CN115048257A CN 115048257 A CN115048257 A CN 115048257A CN 202210555643 A CN202210555643 A CN 202210555643A CN 115048257 A CN115048257 A CN 115048257A
Authority
CN
China
Prior art keywords
traffic
response data
flow
playback
service request
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.)
Pending
Application number
CN202210555643.7A
Other languages
Chinese (zh)
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.)
Shanghai Shuhe Information Technology Co Ltd
Original Assignee
Shanghai Shuhe Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Shuhe Information Technology Co Ltd filed Critical Shanghai Shuhe Information Technology Co Ltd
Priority to CN202210555643.7A priority Critical patent/CN115048257A/en
Publication of CN115048257A publication Critical patent/CN115048257A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • 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/3676Test management for coverage analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a method, a device, computer equipment and a storage medium for verifying system service functions, wherein the method comprises the following steps: acquiring traffic related to a service request of a target system, wherein the traffic related to the service request is obtained by recording through a traffic recording component arranged in the target system; sending a flow playback request to a flow playback system so that the flow playback system reads the flow related to the service request and performs flow playback on the flow related to the service request, and obtaining first response data after the flow playback; receiving first response data of a flow playback request fed back by a flow playback system; and verifying the business function of the target system according to the first response data. The method can solve the problem of inaccurate service function verification caused by the function test of incomplete test scene coverage caused by limited test data in the prior art.

Description

System service function verification method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for verifying a system service function, a computer device, and a storage medium.
Background
In order to support the needs of business development more quickly and better, an enterprise core system is established based on micro-service atomization, single responsibility and the like. All interfaces of the core system process specific service data logic, and the positioning of the interfaces provides data support for an external system, and does not relate to a service flow.
For such a core system with extremely large external dependence, tens of millions of interface call volumes, many system data tables and extremely large data volume, it is a very challenging matter how to ensure system quality through system verification quickly without test scene omission.
Disclosure of Invention
Therefore, it is necessary to provide a method, an apparatus, a computer device and a storage medium for verifying a system service function, which can solve the problem of inaccurate service function verification caused by a function test with incomplete test scenario coverage, which is caused by limited test data in the prior art.
A system service function verification method comprises the following steps: acquiring traffic related to a service request of a target system, wherein the traffic related to the service request is obtained by recording through a traffic recording component arranged in the target system; sending a flow playback request to a flow playback system so that the flow playback system reads the flow related to the service request and performs flow playback on the flow related to the service request, and obtaining first response data after the flow playback; receiving first response data of a flow playback request fed back by a flow playback system; and verifying the business function of the target system according to the first response data.
In one embodiment, the traffic related to the service request includes request data of the service request and second response data of the service request, and the traffic playback system performs traffic playback based on the request data of the service request and the second response data.
In one embodiment, acquiring traffic related to a service request of a target system includes: monitoring traffic reporting data of a traffic recording component; and when the monitored traffic report data contains traffic related to the service request, acquiring the traffic related to the service request.
In one embodiment, sending a traffic playback request to a traffic playback system includes: identifying an interface route of a traffic playback system; and triggering interface call of the flow playback system according to the interface route so as to send a flow playback request to the flow playback system.
In one embodiment, verifying the business function of the target system based on the first response data includes: comparing the second response data of the service request with the first response data; and determining the service function of the target system according to the data comparison.
In one embodiment, determining the business function of the target system based on the data comparison comprises: if the first response data is matched with the second response data according to the data comparison, the service function verification of the target system is determined to be passed; and if the first response data is determined not to be matched with the second response data according to the data comparison, determining that the service function verification of the target system fails.
In one embodiment, a method for verifying system service function further includes: if the first response data are determined not to be matched with the second response data according to the data comparison, generating a data difference table according to the first response data and the second response data; and associating the data difference table with the service function of the target system.
A system service function verification apparatus, comprising: the acquisition module is used for acquiring traffic related to a service request of a target system, and the traffic related to the service request is obtained by recording a traffic recording component arranged in the target system; the sending module is used for sending a flow playback request to the flow playback system so that the flow playback system reads the flow related to the service request and performs flow playback on the flow related to the service request, and first response data are obtained after the flow playback; the receiving module is used for receiving first response data of the flow playback request fed back by the flow playback system; and the verification module is used for verifying the service function of the target system according to the first response data.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any of the above embodiments when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above embodiments.
The system service function verification method, the device, the computer equipment and the storage medium acquire the traffic related to the service request of the target system, and the traffic related to the service request is obtained by recording through a traffic recording component arranged in the target system; sending a flow playback request to a flow playback system so that the flow playback system reads the flow related to the service request and performs flow playback on the flow related to the service request; receiving first response data of a flow playback request fed back by a flow playback system; and verifying the business function of the target system according to the first response data. Therefore, the online flow of the service request can be directly recorded from the target system, so that the test data of each test scene can be obtained, and all the test scenes can be covered without omission. In addition, an external flow playback system is adopted to perform flow playback to obtain first response data, and the business function of the target system is verified based on the first response data, so that the online flow can be copied to another internal environment to perform flow playback, the absolute safety of the target system is guaranteed, and the technical risk of the target system is reduced.
Drawings
FIG. 1 is a diagram of an application environment of a system service function verification method in an embodiment;
FIG. 2 is a flow chart illustrating a system service function verification method according to an embodiment;
fig. 3 is a schematic diagram of data flow processing of a system service function verification method based on an application framework in a specific implementation scenario;
fig. 4 is a schematic flowchart of a method for verifying a system service function in an implementation scenario;
FIG. 5 is a block diagram of a system service function verification apparatus according to an embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The system service function verification method provided by the application is applied to the application environment shown in fig. 1. As shown in FIG. 1, the target system interacts data with the upstream system. E.g., receive a service request from an upstream application and respond to the service request. In an actual application scenario, the target system has many external dependencies, tens of millions of interface call volumes, many data tables in the system and a particularly large data volume. All interfaces of the target system are used for processing specific service data logic, and the positioning of the interfaces is used for providing data support for an external system, so that the service process is not involved. Therefore, when testing a service scenario of a target system, the target system is traditionally tested by covering a limited service scenario manually or by using an interface automation tool.
The method adopts a system service function verification method to carry out service function test on a target system so as to verify the service function of the target system. Specifically, as shown in fig. 1, the traffic playback control system executes a system service function verification method of the present application. As shown in fig. 1, a traffic recording component is arranged in a target system, and the traffic recording component is configured to record traffic related to a service request in the target system, and send the traffic related to the service request to a message queue after traffic processing. The flow playback control system acquires the flow related to the service request of the target system from the message queue, sends the flow playback request to the flow playback system, enables the flow playback system to read the flow related to the service request and perform flow playback on the flow related to the service request, receives first response data of the flow playback request fed back by the flow playback system, and verifies the service function of the target system according to the first response data. Further, the verification result can be sent to the message queue, so that the external system reads the verification result from the message queue, and the test verification condition of the service function of the target system can be obtained.
In one embodiment, as shown in fig. 2, a method for verifying service functions of a system is provided, which is described by taking the method as an example for being applied to the traffic playback control system in fig. 1, and includes the following steps:
s202, obtaining the flow related to the service request of the target system, wherein the flow related to the service request is obtained by recording through a flow recording component arranged in the target system.
In this embodiment, the target system may be a system serving a credit service. The service request may be related to a credit service. The target system is provided with a flow recording component, and the flow recording component can also be called a flow copying component. The flow recording component is a functional component integrated in the target system and is used for recording the requested flow of the target system. The identification information of the service request requiring traffic recording is set in the traffic recording component, so as to customize the service request to be tested. And when the target system receives the service request, responding to the service request. The flow recording component records the flow related to the service request. For example, the traffic related to the service request includes the service request and the response data of the target system corresponding to the service request.
The traffic recording component may encapsulate traffic related to the service request, such as the service request and its response data, to generate a message. The message is sent to a message queue, which may be a kafka message queue, through which recorded request information is asynchronously saved. And the flow playback control system acquires the flow related to the service request of the target system from the message queue. Therefore, the flow recording and the flow playback are decoupled through the message queue, the uploading and the flow playback of the flow related to the service request of the target system are decoupled, and the stability of the system is further ensured.
And S204, sending a flow playback request to the flow playback system so that the flow playback system reads the flow related to the service request and performs flow playback on the flow related to the service request, and obtaining first response data after the flow playback.
In this embodiment, an interface route of the flow playback system is configured in the flow playback control system, and the interface route triggers an interface call of the flow playback system to call the interface of the flow playback system, so as to send a flow playback request to the flow playback system. The traffic playback request is used for requesting the traffic playback system to perform traffic playback on traffic related to the service request.
When receiving the flow playback request, the flow playback system reads the flow related to the service request and performs flow playback on the flow related to the service request. And obtaining first response data after the flow playback is finished, and feeding back the first response data to the flow playback control system.
And S206, receiving first response data of the flow playback request fed back by the flow playback system.
In this embodiment, the traffic playback system feeds back the first response data to the traffic playback control system through the interface. The first response data may be response data of a service request determined after the playback of the traffic. That is, after the traffic playback system performs traffic playback on the service request of the target system, the first response data is determined based on the traffic playback result. And then, feeding back the first response data to the flow playback control system through the interface.
And S208, verifying the business function of the target system according to the first response data.
In this embodiment, the traffic playback control system verifies the service function of the target system based on the first response data. If the first response data is the same as the response data of the target system when responding to the service request, it may be verified that the service function of the target service is normal. Otherwise, the service function of the target service is verified to be abnormal. The traffic playback system performs traffic playback on the service request of the target system, tests the service function of the target system based on the traffic playback mode, and verifies the performance of the service function of the target system.
The system service function verification method obtains the flow related to the service request of the target system, and the flow related to the service request is obtained by recording through a flow recording component arranged in the target system; sending a flow playback request to a flow playback system so that the flow playback system reads the flow related to the service request and performs flow playback on the flow related to the service request; receiving first response data of a flow playback request fed back by a flow playback system; and verifying the business function of the target system according to the first response data. Therefore, the online flow of the service request can be directly recorded from the target system, so that the test data of each test scene can be obtained, and all the test scenes can be covered without omission. In addition, an external flow playback system is adopted to perform flow playback to obtain first response data, and the service function of the target system is verified based on the first response data, so that the online flow can be copied to another internal environment to perform flow playback, the absolute safety of the target system is guaranteed, and the technical risk of the target system is reduced.
In one embodiment, the traffic related to the service request comprises request data of the service request and second response data of the service request, and the traffic playback system performs traffic playback based on the request data of the service request and the second response data.
In this embodiment, the traffic playback system performs traffic playback based on the request data of the service request and the second response data, and obtains the first response data. It should be noted that the second response data refers to response data generated when the target system responds to an external service request, and the first response data refers to response data obtained after the traffic playback system performs traffic playback. It may be that the business function of the target system is verified based on the first response data and the second response data. Therefore, the complete online traffic corresponding to the service function of the target system can be recorded, and the traffic playback test is performed based on the online traffic, so as to perform the verification of the service function based on the test result, such as the second response data. Therefore, each test data of each test scene of the target system can be acquired through the flow recording assembly, and the problem of incomplete coverage of the test scenes caused by insufficient test data is solved.
In an embodiment, the acquiring traffic related to the service request of the target system includes: monitoring traffic reporting data of a traffic recording component; and when the monitored traffic report data contains traffic related to the service request, acquiring the traffic related to the service request.
In this embodiment, after the traffic recording component finishes recording the traffic related to the service request, the traffic related to the service request is reported. The traffic playback control system may monitor the traffic reported data of the traffic recording component. For example, the traffic recording component reports traffic to the message queue, the traffic playback control system monitors traffic reporting data in the message queue, and when it is monitored that the traffic reporting data includes traffic related to the service request, the traffic related to the service request is acquired. Therefore, the flow related to the service request is obtained in a monitoring mode, real-time flow playback of the online flow can be realized, and the efficiency of service function verification can be improved.
In an embodiment, the sending a traffic playback request to a traffic playback system includes: identifying an interface route of a traffic playback system; and triggering interface call of the flow playback system according to the interface route so as to send a flow playback request to the flow playback system.
In this embodiment, interface information of the traffic playback system is configured in the traffic playback control system, and corresponding routing information is configured. When the flow playback control system monitors and acquires the flow related to the service request, the interface of the flow playback system is triggered to call according to the interface route of the flow playback system, so that the flow playback request is sent to the flow playback system.
In an embodiment, the verifying the business function of the target system according to the first response data includes: comparing the second response data of the service request with the first response data; and determining the service function of the target system according to the data comparison.
In this embodiment, the traffic playback control system stores second response data of the target system in response to the service request, and further receives first response data obtained when the traffic playback system performs traffic playback on traffic related to the service request, and the service function of the target system can be determined by performing data comparison on the first response data and the second response data. Therefore, the service test can be performed on the target system by performing the flow playback on the online flow of the target system, and the test result (such as the first response data) is compared with the response result (such as the second response data) of the target system to determine the service function of the target system, so that the accuracy of the verification of the service function is improved.
In an embodiment, the determining the service function of the target system according to the data comparison includes: if the first response data is matched with the second response data according to the data comparison, the service function verification of the target system is determined to be passed; and if the first response data is determined not to be matched with the second response data according to the data comparison, determining that the service function verification of the target system fails.
In this embodiment, the matching of the first response data and the second response data means: the first response data and the second response data satisfy a preset matching rule. If the first response data and the second response data are the same, the first response data and the second response data match. Otherwise, if the first response data is not the same as the second response data, the first response data does not match the second response data.
If the first response data is matched with the second response data, it is determined that the test result of the service request is consistent with the response result of the target system actually responding to the service request in a flow playback mode, and it is determined that the service function of the target system passes verification, that is, the service function of the target system is abnormal. Otherwise, if the first response data and the second response data are not matched, it is determined that the test result of the service request is inconsistent with the response result of the target system actually responding to the service request in a flow playback manner, and it is determined that the service function verification of the target system fails, that is, the service function of the target system is abnormal. Therefore, the business function of the target system can be quickly verified.
In an embodiment, after the step of determining the service function of the target system according to the data comparison, the method further includes: if the first response data are determined not to be matched with the second response data according to the data comparison, generating a data difference table according to the first response data and the second response data; and associating the data difference table with the service function of the target system.
In this embodiment, if the first response data and the second response data are not matched, it is determined that the test result of the service request is inconsistent with the response result of the target system actually responding to the service request in a traffic playback manner, and it is determined that the service function verification of the target system fails, that is, the service function of the target system is abnormal. At this time, a data difference table is generated from the first response data and the second response data. The data difference table includes first response data, second response data, and difference data indicating a difference between the first response data and the second response data. Therefore, the abnormality of the service request can be determined through the data difference table. Further, the data difference table is associated with a business function of the target system. Therefore, when the business function of the target system is determined to be abnormal, the data difference table is obtained based on the relevance, and the reason of the business function abnormality is further determined based on the data difference table.
In summary, the method for verifying the system service function can be used for playing back the online real flow based on the target system, and can realize coverage test of the full-service scene of the service function of the target system without increasing the human cost. In addition, the online traffic of the target system is copied to another internal environment for playback, and the method is absolutely safe, although the other internal environment can consume certain system resources, the service request of a production user can be truly simulated, and no influence is caused on the production data and the service of the target system. In addition, the flow playback technology can be used in a service regression scene during system reconstruction, can provide the capability of automatically performing pressure test, and greatly improves the productivity and efficiency of testers compared with the traditional pressure test. Moreover, there is no code intrusion on the traffic playback system, and the upstream system is not sensitive to operation, reducing technical risks.
A specific embodiment is given below, which implements a system service function verification method of any of the above embodiments based on an application architecture:
as shown in fig. 3, fig. 3 shows an application framework and a flowchart of an implementation of a system service function verification method, where the modules in fig. 3 are described as follows:
an upstream system: upstream Application is a service object of an old core system, and an Upstream system comprises a peripheral system which interacts with the old core system through various network protocols.
Old core system: the Old Core System is a specific implementation module applied in the present invention, that is, a System that needs to be recorded without leakage to record all traffic of service requests, and is specifically the target System described in the above embodiment.
The flow recording component: namely, the traffic replication component, is a functional component integrated in the old core system, and is used for recording the traffic of the service request of the old core system.
The flow playback control system comprises: and the Traffic playback System is used for solving the problem that the recorded Traffic related to the service request is played back in the new core System so as to perform service function verification of the old core System.
The new core system: core System, in which flow playback is required, i.e., the flow playback System described in the above embodiments.
Message queue: and the kafka message queue is used for decoupling middleware of traffic recording and traffic playback, and asynchronously storing the recorded request information through the kafka message queue.
A bin counting platform: a platform for big data storage and offline data verification comparison of request and response data for traffic recording and playback; directly collecting data in the kafka message queue through a large data flash (log collection system) and storing the data in an OSS file, and then importing the data in the OSS file into a Hive library; after the data acquisition is completed, the data in the Hive table is read regularly through a big data Airflow (a dispatching and monitoring workflow platform), and the response data of the new system and the old system are compared and verified.
It should be noted that, in this embodiment, the response data is compared and verified in a data warehouse manner, and in practical application, the response data may also be compared and verified in the flow playback control system. As shown in fig. 3, xxxService denotes a certain service, xxx _ http _ old denotes messages sent by the old core system to the message queue, and xxx _ http _ new denotes messages sent by the traffic playback control system to the message queue. Kafka _ Consumer indicates consumption of the Kafka message queue, and Kafka _ sender indicates sending of messages to the Kafka message queue. xxxServiceCopy denotes traffic replication of a certain service, and xxxServiceNew denotes service processing of a new core system.
Based on the application framework shown in fig. 3, a specific implementation flow is shown in fig. 4. Therefore, the contradiction between a large amount of extra workload and service risks caused by the adoption of a traditional testing method covering a limited service scene is solved through recording and replaying the real flow of the online system. Finally, the treatment target of the full coverage service scene of the online system is realized under the conditions of no increase of workload and no sense of service operation.
It should be understood that, although the steps in the flowchart are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the sub-steps or stages of other steps.
The present application further provides a system service function verification apparatus, as shown in fig. 5, the apparatus includes an obtaining module 502, a sending module 504, a receiving module 506, and a verification module 508. An obtaining module 502, configured to obtain traffic related to a service request of a target system, where the traffic related to the service request is obtained by recording a traffic recording component arranged in the target system; a sending module 504, configured to send a traffic playback request to a traffic playback system, so that the traffic playback system reads traffic related to the service request and performs traffic playback on the traffic related to the service request, where first response data is obtained after the traffic playback; a receiving module 506, configured to receive first response data of a traffic playback request fed back by a traffic playback system; and the verification module 508 is configured to verify the service function of the target system according to the first response data.
In one embodiment, the traffic related to the service request includes request data of the service request and second response data of the service request, and the traffic playback system performs traffic playback based on the request data of the service request and the second response data.
In one embodiment, acquiring traffic related to a service request of a target system includes: monitoring flow reporting data of a flow recording component; and when the monitored traffic report data contains traffic related to the service request, acquiring the traffic related to the service request.
In one embodiment, sending a traffic playback request to a traffic playback system includes: identifying an interface route of a traffic playback system; and triggering interface call of the flow playback system according to the interface route so as to send a flow playback request to the flow playback system.
In one embodiment, verifying the business function of the target system based on the first response data includes: comparing the second response data of the service request with the first response data; and determining the service function of the target system according to the data comparison.
In one embodiment, determining the business function of the target system based on the data comparison comprises: if the first response data are matched with the second response data according to the data comparison, determining that the service function of the target system is verified; and if the first response data is determined not to be matched with the second response data according to the data comparison, determining that the service function verification of the target system fails.
In one embodiment, the system service function verifying apparatus further includes an association module, configured to generate a data difference table according to the first response data and the second response data if it is determined that the first response data does not match the second response data according to the data comparison; and associating the data difference table with the service function of the target system.
For specific limitations of the system service function verification apparatus, reference may be made to the above limitations of the system service function verification method, which is not described herein again. All or part of each module in the system service function verification device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, and the computer device may be a server supporting a traffic playback control system, and the internal structure diagram of the computer device may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used to connect with the traffic playback system to send requests to the traffic playback system and to receive responses from the traffic playback system. The computer program is executed by a processor to implement a system service function verification method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: acquiring traffic related to a service request of a target system, wherein the traffic related to the service request is obtained by recording through a traffic recording component arranged in the target system; sending a flow playback request to a flow playback system so that the flow playback system reads the flow related to the service request and performs flow playback on the flow related to the service request, and obtaining first response data after the flow playback; receiving first response data of a flow playback request fed back by a flow playback system; and verifying the business function of the target system according to the first response data.
In one embodiment, the traffic related to the service request includes request data of the service request and second response data of the service request, and the traffic playback system performs traffic playback based on the request data of the service request and the second response data.
In one embodiment, when the processor executes the computer program to implement the step of acquiring the traffic related to the service request of the target system, the following steps are specifically implemented: monitoring traffic reporting data of a traffic recording component; and when the monitored traffic report data contains traffic related to the service request, acquiring the traffic related to the service request.
In one embodiment, when the processor executes the computer program to implement the step of sending the traffic playback request to the traffic playback system, the following steps are specifically implemented: identifying an interface route of a traffic playback system; and triggering interface call of the flow playback system according to the interface route so as to send a flow playback request to the flow playback system.
In one embodiment, when the processor executes the computer program to implement the above step of verifying the service function of the target system according to the first response data, the following steps are specifically implemented: comparing the second response data of the service request with the first response data; and determining the service function of the target system according to the data comparison.
In one embodiment, when the processor executes the computer program to implement the step of determining the service function of the target system according to the data comparison, the following steps are specifically implemented: if the first response data are matched with the second response data according to the data comparison, determining that the service function of the target system is verified; and if the first response data is determined not to be matched with the second response data according to the data comparison, determining that the service function verification of the target system fails.
In one embodiment, the processor when executing the computer program further performs the steps of: if the first response data are determined not to be matched with the second response data according to the data comparison, generating a data difference table according to the first response data and the second response data; and associating the data difference table with the service function of the target system.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring traffic related to a service request of a target system, wherein the traffic related to the service request is obtained by recording through a traffic recording component arranged in the target system; sending a flow playback request to a flow playback system so that the flow playback system reads the flow related to the service request and performs flow playback on the flow related to the service request, and obtaining first response data after the flow playback; receiving first response data of a flow playback request fed back by a flow playback system; and verifying the business function of the target system according to the first response data.
In one embodiment, the traffic related to the service request includes request data of the service request and second response data of the service request, and the traffic playback system performs traffic playback based on the request data of the service request and the second response data.
In one embodiment, when the computer program is executed by the processor to implement the step of acquiring the traffic related to the service request of the target system, the following steps are specifically implemented: monitoring traffic reporting data of a traffic recording component; and when the monitored traffic report data contains traffic related to the service request, acquiring the traffic related to the service request.
In one embodiment, when the computer program is executed by the processor to implement the step of sending the traffic playback request to the traffic playback system, the following steps are specifically implemented: identifying an interface route of a traffic playback system; and triggering interface call of the flow playback system according to the interface route so as to send a flow playback request to the flow playback system.
In one embodiment, when the computer program is executed by the processor to implement the above step of verifying the business function of the target system according to the first response data, the following steps are specifically implemented: comparing the second response data of the service request with the first response data; and determining the service function of the target system according to the data comparison.
In one embodiment, when the computer program is executed by the processor to implement the step of determining the service function of the target system according to the data comparison, the following steps are specifically implemented: if the first response data is matched with the second response data according to the data comparison, the service function verification of the target system is determined to be passed; and if the first response data is determined not to be matched with the second response data according to the data comparison, determining that the service function verification of the target system fails.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the first response data are determined not to be matched with the second response data according to the data comparison, generating a data difference table according to the first response data and the second response data; and associating the data difference table with the business function of the target system.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for system business function validation, the method comprising:
acquiring traffic related to a service request of a target system, wherein the traffic related to the service request is obtained by recording through a traffic recording component arranged in the target system;
sending a flow playback request to a flow playback system so that the flow playback system reads the flow related to the service request and performs flow playback on the flow related to the service request, and obtaining first response data after the flow playback;
receiving the first response data of the traffic playback request fed back by the traffic playback system;
and verifying the service function of the target system according to the first response data.
2. The method of claim 1, wherein the traffic related to the service request comprises request data of the service request and second response data of the service request, and wherein the traffic playback system performs traffic playback based on the request data of the service request and the second response data.
3. The method of claim 1, wherein the obtaining traffic related to the service request of the target system comprises:
monitoring the traffic reporting data of the traffic recording component;
and when the monitored traffic reported data comprises the traffic related to the service request, acquiring the traffic related to the service request.
4. The method of claim 1, wherein sending a traffic replay request to a traffic replay system comprises:
identifying an interface route of the traffic playback system;
and triggering the interface call of the flow playback system according to the interface route so as to send a flow playback request to the flow playback system.
5. The method of claim 2, wherein verifying the business function of the target system based on the first response data comprises:
comparing the second response data of the service request with the first response data;
and determining the service function of the target system according to the data comparison.
6. The method of claim 5, wherein determining the business function of the target system based on the data comparison comprises:
if the first response data are matched with the second response data according to the data comparison, determining that the service function of the target system is verified;
and if the first response data is determined not to be matched with the second response data according to the data comparison, determining that the service function verification of the target system fails.
7. The method of claim 6, further comprising:
if the first response data is determined not to be matched with the second response data according to the data comparison, generating a data difference table according to the first response data and the second response data;
and associating the data difference table with the service function of the target system.
8. A system service capability verification apparatus, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring traffic related to a service request of a target system, and the traffic related to the service request is obtained by recording a traffic recording component arranged in the target system;
the sending module is used for sending a flow playback request to a flow playback system so that the flow playback system reads the flow related to the service request and performs flow playback on the flow related to the service request, and first response data are obtained after the flow playback;
a receiving module, configured to receive the first response data of the traffic playback request fed back by the traffic playback system;
and the verification module is used for verifying the service function of the target system according to the first response data.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202210555643.7A 2022-05-19 2022-05-19 System service function verification method and device, computer equipment and storage medium Pending CN115048257A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210555643.7A CN115048257A (en) 2022-05-19 2022-05-19 System service function verification method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210555643.7A CN115048257A (en) 2022-05-19 2022-05-19 System service function verification method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115048257A true CN115048257A (en) 2022-09-13

Family

ID=83159562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210555643.7A Pending CN115048257A (en) 2022-05-19 2022-05-19 System service function verification method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115048257A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116719750A (en) * 2023-08-11 2023-09-08 海马云(天津)信息技术有限公司 Software testing method and device, server equipment and storage medium
CN117130941A (en) * 2023-10-24 2023-11-28 易方信息科技股份有限公司 Interface automation method, system, equipment and medium based on browser plug-in

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116719750A (en) * 2023-08-11 2023-09-08 海马云(天津)信息技术有限公司 Software testing method and device, server equipment and storage medium
CN116719750B (en) * 2023-08-11 2023-12-22 海马云(天津)信息技术有限公司 Software testing method and device, server equipment and storage medium
CN117130941A (en) * 2023-10-24 2023-11-28 易方信息科技股份有限公司 Interface automation method, system, equipment and medium based on browser plug-in
CN117130941B (en) * 2023-10-24 2024-03-26 易方信息科技股份有限公司 Interface automation method, system, equipment and medium based on browser plug-in

Similar Documents

Publication Publication Date Title
CN111221743B (en) Automatic test method and system
CN115048257A (en) System service function verification method and device, computer equipment and storage medium
US9170821B1 (en) Automating workflow validation
CN110764998B (en) Data comparison method, device, equipment and storage medium based on Django framework
CN111522728A (en) Method for generating automatic test case, electronic device and readable storage medium
US20160274997A1 (en) End user monitoring to automate issue tracking
CN111611172A (en) Project test defect analysis method, device, equipment and storage medium
CN112363920B (en) Repair method and device for test cases, computer equipment and storage medium
CN112115005B (en) Test data acquisition method and device, computer equipment and storage medium
CN105068935B (en) Method and device for processing software test result
CN112395202B (en) Interface automation test method and device, computer equipment and storage medium
CN111045935A (en) Automatic version auditing method, device, equipment and storage medium
CN109324968B (en) System testing method and device
WO2019074687A1 (en) Method for replicating production behaviours in a development environment
CN111651342A (en) HTTP interface automation testing framework based on Charles recording session
CN113010413A (en) Automatic interface testing method and device
CN113535538A (en) Application full-link automatic testing method and device, electronic equipment and storage medium
CN110908903B (en) Test method based on editable YAML file
CN113360389A (en) Performance test method, device, equipment and storage medium
CN112416762A (en) API test method and device, equipment and computer readable storage medium
CN112486824B (en) Case code generation method, device, computer equipment and storage medium
CN111198798B (en) Service stability measuring method and device
CN115757138A (en) Method and device for determining script abnormal reason, storage medium and electronic equipment
CN115269424A (en) Automatic regression testing method, device, equipment and storage medium for production flow
CN115587041A (en) Mobile application delivery task processing method and device, electronic equipment and storage medium

Legal Events

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