CN114356785B - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114356785B
CN114356785B CN202210235240.4A CN202210235240A CN114356785B CN 114356785 B CN114356785 B CN 114356785B CN 202210235240 A CN202210235240 A CN 202210235240A CN 114356785 B CN114356785 B CN 114356785B
Authority
CN
China
Prior art keywords
data
information
processed
request
request response
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
CN202210235240.4A
Other languages
Chinese (zh)
Other versions
CN114356785A (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.)
China Travelsky Mobile Technology Co Ltd
Original Assignee
China Travelsky Mobile 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 China Travelsky Mobile Technology Co Ltd filed Critical China Travelsky Mobile Technology Co Ltd
Priority to CN202210235240.4A priority Critical patent/CN114356785B/en
Publication of CN114356785A publication Critical patent/CN114356785A/en
Application granted granted Critical
Publication of CN114356785B publication Critical patent/CN114356785B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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/3696Methods or tools to render software testable

Abstract

The invention provides a data processing method, a data processing device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring information to be processed from the request response server; determining a target interface corresponding to the request data; the target interface belongs to the request response server; in the production environment of the request response server, sending a to the target interface interval twice at a first time interval to respectively obtain first response data b1 and second response data b 2; obtaining f (b1, b 2); in the gray scale environment of the request response server, a is sent to the target interface once to obtain third response data b 3; obtaining g (b1, b 3); and under the condition that g (b1, b3) is less than or equal to f (b1, b2), storing information to be processed as a test sample into a sample set, and establishing an association relation between the information to be processed and the target interface, wherein each test sample in the sample set has a corresponding target interface.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of information acquisition and processing, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
With the rapid progress of internet technology, background systems supporting services have become more and more complex. When a system is subjected to reconstruction and splitting, business regression testing is particularly important. Although many automatic regression testing schemes exist at present, the schemes are all established in the way that workers need to write and prepare large and complete regression testing cases by themselves to perform normal regression testing, otherwise, if the number of the regression testing cases is insufficient, the purpose of testing cannot be achieved. Therefore, the preparation of regression test cases is still a great problem at present.
Disclosure of Invention
In view of the above, the present invention provides a data processing method, an apparatus, an electronic device and a storage medium, which at least partially solve the problems in the prior art.
According to one aspect of the application, a data processing method is provided and applied to a data acquisition server, wherein the data acquisition server is in communication connection with a request response server, and the request response server is in communication connection with at least one client;
the method comprises the following steps:
acquiring information to be processed from the request response server; the information to be processed comprises request data a sent by the client to the request response server and original response data b0 fed back to the client by the request response server aiming at the request data;
determining a target interface corresponding to the request data; the target interface belongs to the request response server;
in the production environment of the request response server, sending a to the target interface interval twice at a first time interval to respectively obtain first response data b1 and second response data b 2;
obtaining f (b1, b2), wherein f () is a preset first comparison function stored in a configuration file;
in the gray scale environment of the request response server, a is sent to the target interface once to obtain third response data b 3;
obtaining g (b1, b3), wherein g () is a preset second comparison function stored in a configuration file;
and under the condition that g (b1, b3) is less than or equal to f (b1, b2), storing information to be processed as a test sample into a sample set, and establishing an association relation between the information to be processed and the target interface, wherein each test sample in the sample set has a corresponding target interface.
In an exemplary embodiment of the present application, before the determining the target interface corresponding to the request data, the method further includes:
generating identification information for the information to be processed through an identification generator;
embedding the identification information into request data a of the information to be processed;
the establishing of the incidence relation between the information to be processed and the target interface comprises the following steps:
and storing the identification information corresponding to the information to be processed into an identification list, and establishing the association relationship between the identification information and the target interface.
In an exemplary embodiment of the present application, after the obtaining of the information to be processed from the request response server, the method further includes:
determining whether the information to be processed contains corresponding identification information;
and if not, discarding the information to be processed.
In an exemplary embodiment of the present application, the method further comprises:
receiving a data packet to be online; the data packet to be online is used for being installed in the request response server;
installing the data packet to be online into a gray environment of the response server;
determining an interface to be tested according to the data packet to be online;
determining a plurality of target identification information corresponding to the interfaces to be tested according to the identification list, wherein the target identification information and the interfaces to be tested have an association relationship;
sequentially acquiring a test sample corresponding to each target identification information from the sample set, and performing interface test on the interface to be tested according to the test sample;
and generating a test report corresponding to the interface to be tested, wherein the test report comprises the number y1 of the test samples, the number y2 of the test successes and the number y3 of the test failures.
In an exemplary embodiment of the present application, the interface testing the interface to be tested according to the test sample includes:
in the gray scale environment of the request response server, sending the request data in the test sample to the interface to be tested;
acquiring fourth response data c1 fed back by the request response server according to the request data of the test sample;
acquiring h (c0, c1), wherein c0 is original response data in the test sample, and h () is a preset third comparison function stored in a configuration file;
in the case that h (c0, c1) is greater than a, marking the test sample as test failure;
and in the case that h (c0, c1) is less than or equal to alpha, marking the test sample as successful.
In an exemplary embodiment of the present application, the method further comprises:
acquiring k (y1, y2, y3), wherein k () is a preset processing function stored in a configuration file;
and in the case that k (y1, y2, y3) is larger than beta, installing the data packet to be online to the request response server.
In an exemplary embodiment of the present application, the method further comprises:
in the case where k (y1, y2, y3) is less than or equal to β, a reference data set is generated from the test sample marked as test failed.
According to one aspect of the application, a data processing device is provided and applied to a data acquisition server, wherein the data acquisition server is in communication connection with a request response server, and the request response server is in communication connection with at least one client;
the device comprises:
the acquisition module is used for acquiring the information to be processed from the request response server; the information to be processed comprises request data a sent by the client to the request response server and original response data b0 fed back to the client by the request response server aiming at the request data;
the determining module is used for determining a target interface corresponding to the request data; the target interface belongs to the request response server;
a first sending module, configured to send a to the target interface twice at a first time interval in a production environment of the request response server, so as to obtain first response data b1 and second response data b2, respectively;
a first comparison module, configured to obtain f (b1, b2), where f () is a preset first comparison function stored in a configuration file;
the second sending module is used for sending a to the target interface once in the gray scale environment of the request response server to obtain third response data b 3;
a second comparison module, configured to obtain g (b1, b3), where g () is a preset second comparison function stored in the configuration file;
the storage module is configured to, when g (b1, b3) is less than or equal to f (b1, b2), store information to be processed as a test sample into a sample set, and establish an association relationship between the information to be processed and the target interface, where each test sample in the sample set has a corresponding target interface.
According to one aspect of the present application, there is provided an electronic device comprising a processor and a memory;
the processor is configured to perform the steps of any of the above methods by calling a program or instructions stored in the memory.
According to an aspect of the present application, there is provided a computer-readable storage medium storing a program or instructions for causing a computer to perform the steps of any of the above methods.
The data processing method provided by the application can automatically acquire the information to be processed from the request response server, respectively send the request data a in the information to be processed to the target port twice in the production environment and send the request data a to the target port once in the gray scale environment, so as to reach b1, b2 and b3, and determine whether the information to be processed can be used as the test sample according to the comparison result of g (b1, b3) and f (b1, b2), thereby achieving the effect of automatically generating the test sample. The problem that workers manually write a large number of test samples is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a data processing method according to this embodiment.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be noted that, in the case of no conflict, the features in the following embodiments and examples may be combined with each other; moreover, all other embodiments that can be derived by one of ordinary skill in the art from the embodiments disclosed herein without making any creative effort fall within the scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to or other than one or more of the aspects set forth herein.
Referring to fig. 1, according to an aspect of the present application, there is provided a data processing method applied to a data acquisition server, where the data acquisition server is communicatively connected to a request response server, and the request response server is communicatively connected to at least one client;
the method comprises the following steps:
and step S100, obtaining the information to be processed from the request response server. The information to be processed includes request data a sent by the client to the request response server and original response data b0 fed back to the client by the request response server for the request data.
Specifically, in this embodiment, acquiring the information to be processed from the request response server may be regarded as performing traffic recording on the online traffic, that is, acquiring communication data between the request response server and the client, and using a set of corresponding request data and original response data as one piece of data, that is, the information to be processed. Specifically, the function of recording online traffic can be realized based on an jvm-sandbox-repeater tool, and when a user accesses an APP (i.e., a client), requested data of the user enters an internal system of a server through a gateway. The kafka can be used as a data pipeline to receive data requested by an online user, all the data are forwarded to the flink, and the flink is processed in real time and then stored in a database.
And step S200, determining a target interface corresponding to the request data. The target interface belongs to the request response server.
When the client-side access server is used for accessing some functions, the client-side access server sends request data to an interface corresponding to the request response service, so that the request access server generates corresponding response data and feeds the response data back. In this embodiment, the function of requesting data access may be determined by analyzing the request data, so as to determine the target interface. The target interface may be determined directly through port information directly embedded in the pending message, where the port information embedded in the pending message may be directly embedded by the request response server when the pending message is generated.
Step S300, in the production environment of the request response server, sending a to the target interface interval twice at a first time interval to respectively obtain first response data b1 and second response data b 2. Wherein the first time interval may be 0.1s-10 s.
In step S400, f (b1, b2) is obtained, where f () is a preset first comparison function stored in the configuration file.
Step S500, in the gray-scale environment of the request response server, sending a to the target interface once to obtain third response data b 3.
Step S600, g (b1, b3) is obtained, and g () is a preset second comparison function stored in a configuration file.
Wherein the first comparison function is used for comparing the number of fields with different contents in b1 and b2, and the second comparison function is used for comparing the number of fields with different contents in b1 and b 3. The first and second comparison functions may be the same or different. The fields with different contents may be corresponding fields of a timestamp, a randomly generated number, and the like. In this embodiment, the first comparison function and the second comparison function are the same.
Step S700, when g (b1, b3) is less than or equal to f (b1, b2), storing information to be processed as a test sample into a sample set, and establishing an association relationship between the information to be processed and the target interface, where each test sample in the sample set has a corresponding target interface.
The regression test is to compare the response data of the same interface in different iterations, and if the results are different, the test sample fails to be executed. In fact, dynamic information such as time stamps, randomly generated numbers and the like may be involved in the real response data, and differences caused by the dynamic information should not affect the test result. Therefore, we need to determine whether the information to be processed is suitable as a test sample. In the present embodiment, by transmitting the same request data to the target interface at different times and under different environments, and according to the relationship between the number of different points (i.e., f (b1, b2), g (b1, b 3)) between the respective response information transmitted each time, it is determined whether the different points are fixed positions such as time stamps or random numbers, and each time are different data, instead of the high random number which is different in each time in each position and in each number. Therefore, only simple comparison with the same field is needed, and the information to be processed suitable for being used as the test sample can be determined. And the information to be processed suitable for being used as the test sample can be determined by accurately analyzing each field of each information to be processed according to the function and the like corresponding to the information to be processed without independently setting an analysis function, so that the working pressure of the server is greatly reduced, and the processing speed is improved.
The data processing method provided by the application can automatically acquire the information to be processed from the request response server, respectively send the request data a in the information to be processed to the target port twice in the production environment and send the request data a to the target port once in the gray scale environment, so as to obtain the data to be processed to b1, b2 and b3, and determine whether the information to be processed can be used as the test sample according to the comparison result of g (b1, b3) and f (b1, b2), so that the effect of automatically generating the test sample is achieved. The problem that workers manually write a large number of test samples is solved.
According to an aspect of the application, before the determining the target interface corresponding to the request data, the method further includes:
generating identification information for the information to be processed by an identification generator;
embedding the identification information into request data a of the information to be processed;
correspondingly, the establishing of the association relationship between the information to be processed and the target interface includes:
and storing the identification information corresponding to the information to be processed into an identification list, and establishing the association relationship between the identification information and the target interface.
In this embodiment, each piece of information to be processed is assigned unique identification information (traceID) by an identification generator (which may be a traceID generator). Meanwhile, storing identification information corresponding to the information to be processed into an identification list, and establishing an association relation between the identification information and the target interface. Therefore, when the corresponding test sample is determined according to the interface subsequently, the search can be directly carried out according to the identification list with smaller data volume, namely, the identification information is directly used as the index of the test sample, so that the data volume needing to be traversed during the search is reduced, and the search speed is improved.
According to an aspect of the application, after the obtaining of the information to be processed from the request response server, the method further comprises:
determining whether the information to be processed contains corresponding identification information;
if yes, executing the subsequent steps;
and if not, discarding the information to be processed.
In this embodiment, before the information to be processed is processed and analyzed to determine whether it is suitable for being used as the test sample, whether the request data of the information to be processed includes the identification information may be directly determined, so as to determine whether the information to be processed is newly generated data from a user (without the identification information therein) or is used for performing the regression test sample (with the identification information therein), thereby avoiding repeated and invalid work before the test sample is still used as new information to determine whether it is suitable for being used as the test sample when the test sample is used for performing the regression test, improving the work efficiency, and reducing the resource waste.
According to one aspect of the application, the method further comprises:
and receiving a data packet to be online. And the data packet to be online is used for installation in the request response server.
And installing the data packet to be online into a gray environment of the response server.
And determining an interface to be tested according to the data packet to be online.
And determining a plurality of target identification information corresponding to the interfaces to be tested according to the identification list, wherein the target identification information and the interfaces to be tested have an association relationship.
And sequentially acquiring a test sample corresponding to each target identification information from the sample set, and performing interface test on the interface to be tested according to the test sample.
And generating a test report corresponding to the interface to be tested, wherein the test report comprises the number y1 of the test samples, the number y2 of the test successes and the number y3 of the test failures.
The data processing method provided by the application can also directly receive the data packet to be online, and does not directly perform online on the data packet. But automatically installing the data packet to be online into the gray environment of the response server. And determining the to-be-tested interface corresponding to the data packet to be online, namely the interface to be called in the actual work of the data packet to be online. Specifically, there may be one or more interfaces to be tested, and in this embodiment, when there are multiple interfaces to be tested, the processing procedure corresponding to each interface to be tested may be processed independently and in parallel.
The interfaces to be tested are subjected to interface test (namely regression test) through all or at least part of test samples corresponding to each interface to be tested in the sample set, and a test report is generated according to a test result so as to be watched and analyzed by subsequent processing or working personnel.
Specifically, the present embodiment provides a method for testing an interface, which is used in the above-mentioned testing process. According to an aspect of the application, the interface testing the interface to be tested according to the test sample includes:
in the gray scale environment of the request response server, sending the request data in the test sample to the interface to be tested;
acquiring fourth response data c1 fed back by the request response server according to the request data of the test sample;
and h (c0, c1) is obtained, wherein c0 is original response data in the test sample, and h () is a preset third comparison function stored in a configuration file. The third comparison function may be the same as the first comparison function.
In the case that h (c0, c1) is greater than a, marking the test sample as test failure; where α = f (b1, b 2).
And in the case that h (c0, c1) is less than or equal to alpha, marking the test sample as successful.
Therefore, a test report is generated according to the test result of each interface to be tested aiming at all the test samples corresponding to the interface to be tested. Thus, the interface test of each interface to be tested is completed.
According to one aspect of the application, the method further comprises:
acquiring k (y1, y2, y3), wherein k () is a preset processing function stored in a configuration file;
and in the case that k (y1, y2, y3) is larger than beta, installing the data packet to be online to the request response server. Wherein k (y1, y2, y3) can be (y2-y3)/y 1. The value range of beta is 0.8-1.
In the case where k (y1, y2, y3) is less than or equal to β, a reference data set is generated from the test sample marked as test failed.
In this embodiment, when k (y1, y2, y3) is greater than β, it can be regarded as a pass test, so that the data packet to be uplinked can be directly uplinked. When k (y1, y2, y3) is greater than β, the test may not pass, and at this time, the method generates the reference data set by using the test sample and the corresponding original response data and the fourth response data, which are recorded as a failure. For subsequent failure reason analysis and other work.
According to one aspect of the application, a data processing device is provided and applied to a data acquisition server, wherein the data acquisition server is in communication connection with a request response server, and the request response server is in communication connection with at least one client;
the device comprises:
the acquisition module is used for acquiring the information to be processed from the request response server; the information to be processed comprises request data a sent by the client to the request response server and original response data b0 fed back to the client by the request response server aiming at the request data;
the determining module is used for determining a target interface corresponding to the request data; the target interface belongs to the request response server;
a first sending module, configured to send a to the target interface twice at a first time interval in a production environment of the request response server, so as to obtain first response data b1 and second response data b2, respectively;
a first comparison module, configured to obtain f (b1, b2), where f () is a preset first comparison function stored in a configuration file;
the second sending module is used for sending a to the target interface once in the gray scale environment of the request response server to obtain third response data b 3;
a second comparison module, configured to obtain g (b1, b3), where g () is a preset second comparison function stored in the configuration file;
the storage module is configured to, when g (b1, b3) is less than or equal to f (b1, b2), store information to be processed as a test sample into a sample set, and establish an association relationship between the information to be processed and the target interface, where each test sample in the sample set has a corresponding target interface.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device according to this embodiment of the invention. The electronic device is only an example and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
The electronic device is in the form of a general purpose computing device. Components of the electronic device may include, but are not limited to: the at least one processor, the at least one memory, and a bus connecting the various system components (including the memory and the processor).
Wherein the storage stores program code executable by the processor to cause the processor to perform steps according to various exemplary embodiments of the present invention as described in the "exemplary methods" section above.
The memory may include readable media in the form of volatile memory, such as Random Access Memory (RAM) and/or cache memory, and may further include Read Only Memory (ROM).
The storage may also include a program/utility having a set (at least one) of program modules including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The bus may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
The electronic device may also communicate with one or more external devices (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface. Also, the electronic device may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via a network adapter. As shown, the network adapter communicates with other modules of the electronic device over a bus. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, and may also be implemented by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to external computing devices (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed, for example, synchronously or asynchronously in multiple modules.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A data processing method is characterized in that the method is applied to a data acquisition server, the data acquisition server is in communication connection with a request response server, and the request response server is in communication connection with at least one client;
the method comprises the following steps:
acquiring information to be processed from the request response server; the information to be processed comprises request data a sent by the client to the request response server and original response data b0 fed back to the client by the request response server aiming at the request data;
determining a target interface corresponding to the request data; the target interface belongs to the request response server;
in the production environment of the request response server, sending a to the target interface interval twice at a first time interval to respectively obtain first response data b1 and second response data b 2;
obtaining f (b1, b2), wherein f () is a preset first comparison function stored in a configuration file;
in the gray scale environment of the request response server, a is sent to the target interface once to obtain third response data b 3;
obtaining g (b1, b3), wherein g () is a preset second comparison function stored in a configuration file;
under the condition that g (b1, b3) is less than or equal to f (b1, b2), storing information to be processed as a test sample into a sample set, and establishing an association relationship between the information to be processed and the target interface, wherein each test sample in the sample set has a corresponding target interface; the first comparison function is used to compare the number of fields in b1 and b2 that differ in content, and the second comparison function is used to compare the number of fields in b1 and b3 that differ in content.
2. The data processing method of claim 1, wherein prior to the determining the target interface to which the requested data corresponds, the method further comprises:
generating identification information for the information to be processed through an identification generator;
embedding the identification information into request data a of the information to be processed;
the establishing of the incidence relation between the information to be processed and the target interface includes:
and storing the identification information corresponding to the information to be processed into an identification list, and establishing the association relationship between the identification information and the target interface.
3. The data processing method of claim 2, wherein after the obtaining of the information to be processed from the request response server, the method further comprises:
determining whether the information to be processed contains corresponding identification information;
and if not, discarding the information to be processed.
4. The data processing method of claim 2, wherein the method further comprises:
receiving a data packet to be online; the data packet to be online is used for being installed in the request response server;
installing the data packet to be online into a gray environment of the response server;
determining an interface to be tested according to the data packet to be online;
determining a plurality of target identification information corresponding to the interfaces to be tested according to the identification list, wherein the target identification information and the interfaces to be tested have an association relationship;
sequentially acquiring a test sample corresponding to each target identification information from the sample set, and performing interface test on the interface to be tested according to the test sample;
and generating a test report corresponding to the interface to be tested, wherein the test report comprises the number y1 of the test samples, the number y2 of the test successes and the number y3 of the test failures.
5. The data processing method of claim 4, wherein the interface testing the interface to be tested according to the test sample comprises:
in the gray scale environment of the request response server, sending the request data in the test sample to the interface to be tested;
acquiring fourth response data c1 fed back by the request response server according to the request data of the test sample;
acquiring h (c0, c1), wherein c0 is original response data in the test sample, and h () is a preset third comparison function stored in a configuration file; the third comparison function is the same as the first comparison function;
in the case that h (c0, c1) is greater than a, marking the test sample as test failure; α = f (b1, b 2);
and in the case that h (c0, c1) is less than or equal to alpha, marking the test sample as successful.
6. The data processing method of claim 4, wherein the method further comprises:
acquiring k (y1, y2, y3), wherein k () is a preset processing function stored in a configuration file; k (y1, y2, y3) is (y2-y3)/y 1;
and in the case that k (y1, y2, y3) is greater than beta, the value range of installing the data packet to be online to the request response server beta is 0.8-1.
7. The data processing method of claim 6, wherein the method further comprises:
in the case where k (y1, y2, y3) is less than or equal to β, a reference data set is generated from the test sample marked as test failed.
8. The data processing device is applied to a data acquisition server, wherein the data acquisition server is in communication connection with a request response server, and the request response server is in communication connection with at least one client;
the device comprises:
the acquisition module is used for acquiring information to be processed from the request response server; the information to be processed comprises request data a sent by the client to the request response server and original response data b0 fed back to the client by the request response server aiming at the request data;
the determining module is used for determining a target interface corresponding to the request data; the target interface belongs to the request response server;
a first sending module, configured to send a to the target interface twice at a first time interval in a production environment of the request response server, so as to obtain first response data b1 and second response data b2, respectively;
a first comparison module, configured to obtain f (b1, b2), where f () is a preset first comparison function stored in a configuration file;
the second sending module is used for sending a to the target interface once in the gray scale environment of the request response server to obtain third response data b 3;
a second comparison module, configured to obtain g (b1, b3), where g () is a preset second comparison function stored in the configuration file;
the storage module is used for storing information to be processed as a test sample into a sample set under the condition that g (b1, b3) is less than or equal to f (b1, b2), and establishing an association relation between the information to be processed and the target interface, wherein each test sample in the sample set has a corresponding target interface; the first comparison function is used to compare the number of fields in b1 and b2 that differ in content, and the second comparison function is used to compare the number of fields in b1 and b3 that differ in content.
9. An electronic device comprising a processor and a memory;
the processor is adapted to perform the steps of the method of any one of claims 1 to 7 by calling a program or instructions stored in the memory.
10. A computer-readable storage medium, characterized in that it stores a program or instructions for causing a computer to carry out the steps of the method according to any one of claims 1 to 7.
CN202210235240.4A 2022-03-11 2022-03-11 Data processing method and device, electronic equipment and storage medium Active CN114356785B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210235240.4A CN114356785B (en) 2022-03-11 2022-03-11 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210235240.4A CN114356785B (en) 2022-03-11 2022-03-11 Data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114356785A CN114356785A (en) 2022-04-15
CN114356785B true CN114356785B (en) 2022-05-20

Family

ID=81094492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210235240.4A Active CN114356785B (en) 2022-03-11 2022-03-11 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114356785B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185721B (en) * 2022-07-08 2023-01-31 北京天华星航科技有限公司 Data processing method and system based on artificial intelligence
CN116401089B (en) * 2023-04-23 2024-01-26 中航信移动科技有限公司 Interface fusing method based on increment iteration, storage medium and electronic equipment
CN116383083B (en) * 2023-04-23 2024-01-12 中航信移动科技有限公司 Multi-interface connection-based abnormal data source determining method and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243489A (en) * 2010-05-12 2011-11-16 上海微电子装备有限公司 Cross-platform data processing system and method
CN103312551A (en) * 2012-03-12 2013-09-18 腾讯科技(深圳)有限公司 Test method and test device of common gateway interface
CN105224461A (en) * 2015-10-23 2016-01-06 网易(杭州)网络有限公司 A kind of generation method and apparatus of integration testing use-case
JP2016062136A (en) * 2014-09-16 2016-04-25 三菱電機株式会社 Testing apparatus and testing program
CN109308266A (en) * 2018-11-30 2019-02-05 北京微播视界科技有限公司 Construction method, test method, device, equipment and the medium of test case
CN110532169A (en) * 2019-07-08 2019-12-03 平安科技(深圳)有限公司 Interface testing case generation method, device, computer equipment and storage medium
CN111679990A (en) * 2020-06-17 2020-09-18 北京字节跳动网络技术有限公司 Test data generation method and device, readable medium and electronic equipment
CN112436980A (en) * 2020-11-10 2021-03-02 中国平安人寿保险股份有限公司 Method, device and equipment for reading test data packet and storage medium
CN112463605A (en) * 2020-11-26 2021-03-09 杭州网易云音乐科技有限公司 Automatic testing method and device, storage medium and electronic equipment
CN112860569A (en) * 2021-02-23 2021-05-28 腾讯科技(深圳)有限公司 Automatic testing method and device, electronic equipment and storage medium
CN113342667A (en) * 2021-06-18 2021-09-03 杭州网易再顾科技有限公司 Data processing method, data processing device, electronic equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291387B2 (en) * 2005-11-22 2012-10-16 International Business Machines Corporation Method and system for testing a software application interfacing with multiple external software applications in a simulated test environment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243489A (en) * 2010-05-12 2011-11-16 上海微电子装备有限公司 Cross-platform data processing system and method
CN103312551A (en) * 2012-03-12 2013-09-18 腾讯科技(深圳)有限公司 Test method and test device of common gateway interface
JP2016062136A (en) * 2014-09-16 2016-04-25 三菱電機株式会社 Testing apparatus and testing program
CN105224461A (en) * 2015-10-23 2016-01-06 网易(杭州)网络有限公司 A kind of generation method and apparatus of integration testing use-case
CN109308266A (en) * 2018-11-30 2019-02-05 北京微播视界科技有限公司 Construction method, test method, device, equipment and the medium of test case
CN110532169A (en) * 2019-07-08 2019-12-03 平安科技(深圳)有限公司 Interface testing case generation method, device, computer equipment and storage medium
CN111679990A (en) * 2020-06-17 2020-09-18 北京字节跳动网络技术有限公司 Test data generation method and device, readable medium and electronic equipment
CN112436980A (en) * 2020-11-10 2021-03-02 中国平安人寿保险股份有限公司 Method, device and equipment for reading test data packet and storage medium
CN112463605A (en) * 2020-11-26 2021-03-09 杭州网易云音乐科技有限公司 Automatic testing method and device, storage medium and electronic equipment
CN112860569A (en) * 2021-02-23 2021-05-28 腾讯科技(深圳)有限公司 Automatic testing method and device, electronic equipment and storage medium
CN113342667A (en) * 2021-06-18 2021-09-03 杭州网易再顾科技有限公司 Data processing method, data processing device, electronic equipment and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Natural language requirement specification for web service testing;Harry M. Sneed等;《Natural language requirement specification for web service testing》;20131024;第5-14页 *
基于Charles 录制会话的HTTP 接口自动化测试框架设计与实现;刘国庆等;《计算机应用与软件》;20190602;第36卷(第6期);第7-13页 *

Also Published As

Publication number Publication date
CN114356785A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
CN114356785B (en) Data processing method and device, electronic equipment and storage medium
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
CN111221743B (en) Automatic test method and system
US8429610B2 (en) Computer method and apparatus for providing version-aware impact analysis
CN111309343B (en) Development deployment method and device
CN112817853A (en) Automatic test method, system and electronic equipment
CN110995538B (en) Network data acquisition method, device, system, equipment and storage medium
CN113127356A (en) Pressure measurement method and device, electronic equipment and storage medium
CN112612697A (en) Software defect testing and positioning method and system based on byte code technology
US8429458B2 (en) Method and apparatus for system analysis
CN116450511A (en) Information updating method, device, electronic equipment and computer readable medium
CN115454856A (en) Multi-application security detection method, device, medium and electronic equipment
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN111651330B (en) Data acquisition method, data acquisition device, electronic equipment and computer readable storage medium
CN114553663A (en) Abnormity detection method, device, equipment and storage medium
CN113760696A (en) Program problem positioning method and device, electronic equipment and storage medium
CN114531345A (en) Method, device and equipment for storing flow comparison result and storage medium
CN112084114A (en) Method and apparatus for testing an interface
CN116627849B (en) System test method, device, equipment and storage medium
CN114760218B (en) Link sampling method and related device thereof
US11288177B2 (en) Systems and methods for mobile application accessibility testing
US20230208743A1 (en) Automated network analysis using a sensor
CN115484200A (en) Embedded point testing method, device, server, storage medium and system
CN116614398A (en) Method, device, equipment and storage medium for automatically filling task parameters
CN117520197A (en) Front-end processor testing 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
GR01 Patent grant
GR01 Patent grant