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

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

Info

Publication number
CN108345543B
CN108345543B CN201810174902.5A CN201810174902A CN108345543B CN 108345543 B CN108345543 B CN 108345543B CN 201810174902 A CN201810174902 A CN 201810174902A CN 108345543 B CN108345543 B CN 108345543B
Authority
CN
China
Prior art keywords
uniform resource
resource locator
simulation data
data
simulation
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
CN201810174902.5A
Other languages
Chinese (zh)
Other versions
CN108345543A (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.)
Tenpay Payment Technology Co Ltd
Original Assignee
Tenpay Payment 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 Tenpay Payment Technology Co Ltd filed Critical Tenpay Payment Technology Co Ltd
Priority to CN201810174902.5A priority Critical patent/CN108345543B/en
Publication of CN108345543A publication Critical patent/CN108345543A/en
Application granted granted Critical
Publication of CN108345543B publication Critical patent/CN108345543B/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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a data processing method, a device, equipment and a storage medium, wherein the method comprises the following steps: sending an acquisition request of a uniform resource locator; intercepting an acquisition request of the uniform resource locator, and sending the acquisition request to an agent tool; enabling the agent tool to acquire the uniform resource locator according to a plug-in interface provided by the packet capturing tool; sending a query request of the simulation data matched with the uniform resource locator; and when the simulation data matched with the uniform resource locator is inquired through the agent tool, outputting the simulation data. The invention can reduce coupling of front-end and back-end development to realize parallel development, and improve the whole development efficiency of the front end; the simulation data of the back end is accurate and stable, the scenes are rich, and the development efficiency is further improved.

Description

Data processing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of front-end testing technologies, and in particular, to a data processing method, apparatus, device, and storage medium.
Background
In the evolution process of the internet, the website content is developed from static state to dynamic state. The role of Web front-end development in the product development link becomes more and more important, and its main role is to better present the interface of the website to the user. The Web front-end development technology mainly comprises three elements: HTML (an application under standard universal markup language), CSS (cascading style sheet), and JavaScript style elements; the development process is to use these elements to make web pages, develop websites, and the like.
The Web front end needs to interact with the background in the development process, page data needs to be inquired from the background, a user needs to submit the data to the background, and in the development mode with the front end and the back end separated, the development rhythm of the front end and the back end is inconsistent, so that the following problems are caused:
(1) the front end needs to wait for the background development to finish the development
(2) The back-end service is often abnormal and unavailable, and the front-end needs to wait for the background repair
(3) The back end data creation process is complex, and the front end needs the back end to create the test data in a matching way
(4) Various scene test data are frequently created in the test process of testers, the process is complicated, and the efficiency is low
(5) And a bug appears on the line, a developer cannot simulate error scene data and verify whether the UI logic is normal or not.
Disclosure of Invention
In order to solve the above technical problem, the present invention provides a data processing method, apparatus, device and storage medium, specifically:
a first aspect provides a method of data processing, the method comprising:
sending an acquisition request of a uniform resource locator;
intercepting an acquisition request of the uniform resource locator, and sending the acquisition request to an agent tool; enabling the agent tool to acquire the uniform resource locator according to a plug-in interface provided by the packet capturing tool;
sending a query request of the simulation data matched with the uniform resource locator;
and when the simulation data matched with the uniform resource locator is inquired through the agent tool, outputting the simulation data.
A second aspect provides a data processing apparatus, characterized in that the apparatus comprises:
the uniform resource locator request module is used for sending a uniform resource locator acquisition request;
a uniform resource locator obtaining module, configured to intercept an obtaining request of the uniform resource locator, and send the obtaining request to an agent, so that the agent obtains the uniform resource locator according to a plug-in interface provided by a packet capturing tool;
the analog data query request module is used for sending a query request of analog data matched with the uniform resource locator;
and the simulation data output module is used for outputting the simulation data when the simulation data matched with the uniform resource locator is inquired through the agent tool.
A third aspect provides a data processing apparatus comprising a processor and a memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the data processing method according to the first aspect.
A fourth aspect provides a computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the data processing method according to the first aspect.
The data processing method, the device, the equipment and the storage medium provided by the invention have the following technical effects:
the agent tool can agent all http requests, and analog data corresponding to the requests are obtained from a background management system through the agent tool, so that the front end and the back end are developed in parallel, and coupling is reduced; thereby improving the testing efficiency of the front end and the overall development efficiency.
The simulation data of the invention is accurate and stable, so that the development interference caused by data problems can not occur in the front-end development, and the development efficiency is further improved; and the scenes corresponding to the simulation data are rich, so that the development process of the front end can cover the required test in a full path, and the robustness of the front end code is improved.
In addition to front-end developers, testers and product experience technicians can also quickly test and experience UI logic; when an error program (bug) appears on the line, the data of the error program (bug) can be rapidly simulated, the error occurrence range is further positioned, time and energy are saved for developers, convenient service is further provided for rapid testing and online debugging, and the practicability is high.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic representation of a prior art agent for a bale plucking tool with its own simulator;
FIG. 2 is a schematic diagram of simulation data corresponding to a plug-in of a prior art bale plucker;
FIG. 3 is a flow chart of a data processing method according to an embodiment of the present invention;
FIG. 4 is an interface of user project management provided by an embodiment of the present invention;
fig. 5 is an interface of a common gateway interface management according to an embodiment of the present invention;
FIG. 6(a) is a normal scenario diagram of a test case corresponding to a "fractional query" common gateway interface in the embodiment of the present invention;
FIG. 6(b) is a code diagram of a high level programming language object representation of the test case in an embodiment of the present invention;
FIG. 7 is a test flow presentation diagram obtained by sequentially arranging test cases corresponding to the common gateway interface in FIG. 5;
FIG. 8 is a representation of a corresponding page format of a specified use case access page selected by the bale plucker in an open embodiment;
FIG. 9 is a flow chart of another data processing method provided by an embodiment of the invention;
FIG. 10 is a flow chart of a method for modeling a query request for data provided by an embodiment of the present invention;
FIG. 11 is a corresponding diagram of project-common gateway interface-use case data in an embodiment of the present invention;
FIG. 12 is a flow chart of another data processing method provided by embodiments of the present invention;
FIG. 13 is a diagram illustrating information transmission between a client and a server according to an embodiment of the present invention;
FIG. 14 is a flow chart of a start-up phase of the bale plucking tool provided in the embodiment of the present invention;
FIG. 15 is a diagram illustrating a URL request phase according to an embodiment of the present invention;
fig. 16 is a block diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 17 is a block diagram of an alternative data processing apparatus according to an embodiment of the present invention;
FIG. 18 is a schematic diagram of another data processing apparatus according to an embodiment of the present invention;
fig. 19 is a block diagram of a data processing system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the prior art, there are a variety of data proxy processing methods: FIG. 1 is a schematic diagram of a proxy for a capture tool with a self-contained simulator, wherein a plug-in tool Fiddler data self-contained simulator; the data agent tool carried by Fiddler can intercept and simulate the URL request, and the simulated data can be supported by means of files and the like; FIG. 2 is a schematic diagram of simulation data corresponding to a plug-in of a prior art bale plucking tool; that is, a diagram of simulation data corresponding to Willow plug-in, where mock. js: js is a data simulation js library, data is generated based on a data template, and a data agent effect is realized by intercepting an ajax request and simulating the ajax request; node transfer: the interception and simulation of data are realized by creating Node services.
However, the problems in the prior art are: the data of Fiddler and Willow are managed in a file without layering, and the data are difficult to manage and cannot be shared when the data volume is large and can be used by only one person; js data does not have a landing database, and the problems of no layering, difficult management and incapability of sharing exist as well; node transfer: the environment is complex, Node service needs to be established, and the development cost is high.
An embodiment of the present invention provides a data processing method, as shown in fig. 3, the method includes:
s101, sending an acquisition request of a uniform resource locator;
in step S101, a user requests an HTTP request corresponding to a Uniform Resource Locator (URL), for example, a CGI request, from the background management system at the client; the client executes the corresponding JS code (code of script file written by JavaScript) to initiate the CGI request.
The CGI is a common gateway interface, belongs to an interface standard between an external application program (CGI program) and a Web server, and is a process of transferring information between the CGI program and the Web server. The CGI specification allows Web servers to execute external programs and send their output to clients, and as such, CGI is used to turn a simple set of static hypermedia documents of the Web into a complete new interactive media. It should be noted that the execution object may also be a browser.
S102, intercepting an acquisition request of the uniform resource locator, and sending the acquisition request to an agent tool; enabling the agent tool to acquire the uniform resource locator according to a plug-in interface provided by the packet capturing tool;
for example, a request for acquiring a uniform resource locator is made by using a packet capturing tool, wherein the packet capturing tool is Fiddler, and the proxy tool is CGIProxy; in addition, the bale plucker in this embodiment may provide a bale plucking function, and also have a function of providing an interface for the proxy tool CGIProxy.
Fiddler is an HTTP proxy located on the client and server sides and is one of the most common HTTP packet capturing tools currently. The system can record all HTTP requests between the client and the server, can analyze request data, set breakpoints, debug Web application and modify the requested data aiming at specific HTTP requests, can modify the data returned by the server, and belongs to a Web debugging tool.
Correspondingly, in the step S102, the package capture tool Fiddler in the client intercepts the acquisition request of the CGI sent from the background management system, and sends the acquisition request to the proxy tool CGIProxy according to an interface provided by the package capture tool Fiddler to the proxy tool CGIProxy, so that the proxy tool CGIProxy acquires data information of the CGI.
S103, sending a query request of the analog data matched with the uniform resource locator;
after the client acquires the CGI, querying corresponding simulation data to a background management system; and a special database is arranged in the background management system for storing all the simulation data, and the client sends a query request of the simulation data to the database for storing the simulation data by using the proxy tool CGIProxy.
The description is given for a database storing simulation data: the method comprises the following steps that a front-end developer sequentially carries out 'project-CGI-test case' to add and input data in a background management system, so that a simulation data set with clear logic and complete data is obtained in a hierarchical management mode, and the method specifically comprises the following steps:
a first step of adding user items; fig. 4 shows an interface for managing user items, wherein the user items are TSW test, micro credit-business information, Tencent credit V2, Tencent credit internal platform, witness letter in the APP list in fig. 4; the figure has not only the name of each user item but also the category name, creator, description of the user item, and whether or not to pay attention to the user item. In addition, the user items can be subjected to addition operation and deletion operation on the interface, and the user items can be classified into 'my collection'.
Secondly, adding data of uniform resource locators corresponding to each user item; for example, data of a CGI corresponding to each user item is added, fig. 5 is an interface for common gateway interface management, that is, an interface for CGI management, to which "flight credit V2" is added, the interface obtained by the CGI data corresponding to the user item, where a CGI list in the drawing includes: robbery points, privilege feedback lists, inquiry user information (mask), inquiry user activation & authorization status, delay insurance inquiry policy information, record inquiry of pending violations and historical violations, inquiry of pending violations and historical violations details, point inquiry, authorization status inquiry and authorization inquiry; the figure has not only the name of each CGI, but also the corresponding URL address and description of the CGI; and, adding operation and deleting operation can be performed on the CGIs in the CGI list.
Thirdly, adding test case data corresponding to each uniform resource locator; for example, test case data corresponding to each CGI is added, where the test case is divided into a normal scenario and an abnormal scenario, as shown in fig. 6(a), the normal scenario of the test case corresponding to the CGI is "fractional query" in the second step, the diagram also has a data type, and a Json returning operation is performed, where the Json returning operation part can perform viewing, copying, and editing of corresponding Json; and moreover, the addition operation and the deletion operation can be carried out on the use case. And (b) as shown in fig. 6, displaying the JSON code for viewing the test case.
Fourthly, combining all the use case data of the CGI with the corresponding CGI respectively to generate a corresponding test flow; fig. 7 shows a test flow obtained by sequentially arranging the test cases corresponding to the CGI in fig. 5.
Specifically, at a server side, a simulation data set is obtained in a hierarchical management mode according to the addition input of a project, namely CGI (common gateway interface) -test case; and storing the simulation data set in a database to prepare for data query of a client. Wherein, the client opens a specified use case access page selected by Fiddler, the corresponding page form is shown in FIG. 8,
the simulation data set is obtained through hierarchical management and construction, and clear and complete simulation data are provided for front-end development; the simulation data is stored in the database in a mode of establishing and storing the data once, and the effects of reusing the data and sharing the data among different users are achieved.
S104, when the simulation data matched with the uniform resource locator is inquired through the agent tool, the simulation data is output.
And the client displays the simulation data on a display interface of the client after receiving the simulation data.
It should be noted that, when a bug (computer program error) occurs on a test thread, the technical solution can also quickly create simulation data and locate the error occurrence range.
In the embodiment, a comprehensive simulation data set is provided for the client through the agent tool, and the simulation data is accurate and stable, so that the problem of development interference caused by inaccurate data can be avoided in the front-end development, and the development efficiency is further improved; the simulation data corresponds to rich scenes, can comprehensively cover the test requirements, and improves the robustness of the front-end code.
An embodiment of the present invention provides a data processing method, as shown in fig. 9, the method includes:
s201, sending an acquisition request of a uniform resource locator;
s202, intercepting an acquisition request of the uniform resource locator, and sending the acquisition request to an agent tool; enabling the agent tool to acquire the uniform resource locator according to a plug-in interface provided by the packet capturing tool;
the request for acquiring the uniform resource locator can correspond to all HTTP requests, and the proxy is performed according to different HTTP requests.
S203, sending a query request of the simulation data matched with the uniform resource locator;
after the client acquires the CGI request information, the client queries corresponding analog data to a background management system, a special database stores all analog data in the background management system, and the client sends a query request of the analog data to the database of the background management system by using the proxy tool CGIProxy.
In step S203, querying the simulation data corresponding to the uniform resource locator, as shown in fig. 10, includes:
s2a, reading local account information by using the agent tool;
the local account information is the user name of Windows, i.e. the Rtx name; step S2a, specifically, a proxy tool CGIProxy of the client queries the current Windows user name through an interface provided by NETFramework.
NET is an operation platform, which allows people to build various application modes on the NET, so that people can acquire information from websites in a diversified and maximum way in a simple mode, solve the cooperative work among the websites, and break the obstacles among computers, equipment, websites, various large organizations and the industry, namely the so-called 'digital island', thereby realizing the full potential of the Internet and building a third-generation Internet platform. From a technical point of view, a.net application is an application running on a.net Framework.
S2b, sending a query request of a simulation data set to a background management system according to the account information, wherein the simulation data set comprises a plurality of simulation data;
the method comprises the following steps that a query request of a simulation data set is sent to a background management system, namely, a user name is used as a parameter to query simulation data to an internal database of the background management system; and under the condition that the client queries the analog data, all the queried analog data can be cached in the local memory, so that convenience is provided for the next query of the analog data, the consumption of flow is reduced, and the efficiency of querying the analog data is further improved.
S2c, when response information of the simulation data matched with the uniform resource locator is obtained, the simulation data is taken out.
In detail, in step S2b, a query request for simulating a data set is sent to the background management system according to the local account information; in contrast to the process of hierarchically forming the simulation data set by the background management system, the step S2b specifically includes:
and inquiring a target item according to the account information, inquiring a corresponding uniform resource locator according to the target item, and locating the simulation data set according to the information of the uniform resource locator. The target items are multiple, and each target item corresponds to multiple uniform resource locators. For example, if the shopping website is used as a target item, it includes a request for logging in the website, a request for querying a commodity list, and so on. Because the data returned by each URL request is different in different scenarios, each URL corresponds to a plurality of use case data, for example, on the shopping website, a URL request for purchasing a commodity may return data corresponding to a successful order, may also return data corresponding to a failed order, and so on. And further combining each uniform resource locator and the use case data corresponding to the uniform resource locator to form a simulation data set, wherein the simulation data set comprises information of a plurality of use case data.
S204a, when the simulation data matched with the uniform resource locator is inquired through the agent tool, the simulation data is output.
The simulation data is output, that is, the simulation data is returned to the client instead of the real data, and the processing after the return is controlled by the requester of the client.
In step S203, the sending a query request of the simulation data matched with the uniform resource locator further includes:
and S204b, when the simulation data matched with the uniform resource locator is not inquired through the plug-in tool, acquiring real data corresponding to the uniform resource locator and outputting the real data.
In step S204b, when the required simulation data is not queried by the plug-in tool, that is, the CGI is not configured before, the real data information corresponding to the uniform resource locator may be directly obtained from the real server, and the real data information is returned, so that the front-end test progress is performed in a orderly manner. The background management system is used for managing simulation data, and the real server is used for managing real data.
The client terminal of the embodiment hierarchically queries the simulation data in a mode of 'project-CGI-use case data', and combines a packet capturing tool to enable the query strategy to be simple and efficient; the front end acquires the simulation data from the back end, and the simulation service for conveniently adjusting the background data is provided. And under the condition that the simulation data is not inquired from the simulation data set of the background management system, the corresponding real data can be directly acquired from the real server, so that the request of the front end can be responded in time.
An embodiment of the present invention further provides a data processing method, as shown in fig. 12, the method includes:
s301, a background management system establishes a target data set, wherein the target data set comprises a plurality of simulation data matched with uniform resource locators;
s302, the client sends a request for acquiring the uniform resource locator to the background management system;
s303, the client intercepts an acquisition request of the uniform resource locator by using a packet capturing tool and sends the acquisition request to an agent tool; enabling the agent tool to acquire the uniform resource locator according to a plug-in interface provided by the packet capturing tool;
s304, the client sends a query request of the simulation data matched with the uniform resource locator to a background management system;
s305, the background management system inquires the simulation data matched with the uniform resource locator and returns the simulation data to the client;
s306, the client side obtains the simulation data and outputs the simulation data.
Fig. 13 is a schematic diagram of a client and a backend management system making an information request and a packet capture tool obtaining simulation data. And when the background management system does not acquire the simulation data matched with the uniform resource locator, acquiring corresponding real data from a real server on the line. The description is given specifically from the technical architecture:
1. the method includes the steps that a background management system configured based on Apache + Mysql + PHP + CI + ext.js establishes the simulation data set in the background management system, and specifically includes the following steps:
(1) project management, in which each user has a plurality of projects;
(2) CGI management, wherein each project has a plurality of background CGIs;
(3) case management, namely, each CGI has a plurality of cases;
(4) and (4) flow management, wherein the CGI and the arrangement and combination of the use cases form a flow, namely a simulation data set is formed.
Fiddler plugin, the main workflow is as follows:
the start-up phase, as shown in fig. 14:
a) the CGIProxy queries the current Windows user name, namely the Rtx name, through an interface provided by the NET Framework;
b) and querying all configured simulation data by using the user name as a parameter query background management system and caching the configured simulation data in a memory of the client.
(2) Request phase, as shown in fig. 15:
a) a user requests a URL at a client or a browser;
b) fiddler intercepts the request and gives the request to the CGIProxy plug-in;
c) the CGIProxy plug-in acquires the current URL through an HTTP request interface provided by Fiddler;
d) the CGIProxy plug-in queries whether the URL is matched in the memory;
c) if the simulation data is matched with the CGIProxy plug-in, corresponding simulation data is taken out from the internal server, the requested simulation data is returned to the CGIProxy plug-in, and the simulation data is returned to the client through an interface provided by Fiddler;
d) and if not, acquiring the requested real data from the online server, returning the requested real data to the CGIProxy plug-in and returning the requested real data to the client through an interface provided by Fiddler.
In addition, the flow corresponding to the angle of the user in this embodiment is:
firstly, a user (front-end developer) accesses a background management system to input a project, a CGI and a test case;
secondly, a user creates a test flow, wherein the flow contains all CGIs, and a test case is selected for each CGI;
thirdly, the user opens Fiddler, the Fiddler loads a plug-in, the plug-in can read the user name of the current Windows account, and the user name is used for inquiring an interface (a virtual interface) of a background management system;
fourthly, inquiring that the data input by the user is stored in the plug-in;
and fifthly, accessing the product (client) developed by the user, accessing the URL, intercepting and returning the input data (matched simulation data) by the plug-in.
It should be noted that, by using the data processing method provided by the embodiment, not only front-end developers, but also testers and product experience engineers can quickly test and experience UI logic; when the bug appears on the line, the bug data can be rapidly simulated to verify whether the current page is problematic or not, if the page is not problematic, the problem is that the current page is data, and then the error occurrence range is positioned, so that time and energy are saved for developers, and further, convenient service is provided for rapid testing and online debugging, and the practicability is high.
In the embodiment, a target data set is established at a server (a background management system), a client queries the target data set from a database of the background management system through a packet capturing tool, and then obtains simulation data corresponding to a required request, and through the mode that the simulation data is established at the back end and used by the front end, the front end can perform data test on the front end without waiting for development or debugging of the back end, so that coupling is reduced in development of the front end and the back end; and the whole development efficiency is improved by combining a front-end and back-end parallel development mode.
An embodiment of the present invention further provides a data processing apparatus, as shown in fig. 16, the apparatus includes:
a uniform resource locator request module 110, configured to send a request for obtaining a uniform resource locator;
a uniform resource locator obtaining module 120, configured to intercept an obtaining request of the uniform resource locator, and send the obtaining request to an agent, so that the agent obtains the uniform resource locator according to a plug-in interface provided by a packet capture tool;
a simulation data query request module 130, configured to send a query request for simulation data matched with the uniform resource locator;
and the simulation data output module 140 is used for outputting the simulation data when the simulation data matched with the uniform resource locator is inquired through the agent tool.
Specifically, the analog data output module 140 includes:
an account information reading unit 141, configured to read local account information using the agent;
a simulation data set query request module 142, configured to send a query request of a simulation data set according to the account information, where the simulation data set includes multiple simulation data;
in detail, the simulation dataset query request module 142 further includes:
a use case data query module 1421, configured to obtain a target item according to the account information, query a corresponding uniform resource locator according to the target item, and query corresponding use case data by using the uniform resource locator;
a simulation data set constructing module 1422, configured to query a simulation data set constructed from case data.
The target projects are multiple, each target project corresponds to multiple uniform resource locators, and each uniform resource locator corresponds to multiple use case data.
The simulation data response module 143 is configured to, when response information of the simulation data matching the uniform resource locator is acquired, retrieve the simulation data.
The device and method embodiments in the device embodiment are based on the same inventive concept.
The present embodiment provides a data processing apparatus, as shown in fig. 17, the apparatus including:
a uniform resource locator request module 210, configured to send a request for obtaining a uniform resource locator;
a uniform resource locator obtaining module 220, configured to intercept an obtaining request of the uniform resource locator, and send the obtaining request to an agent, so that the agent obtains the uniform resource locator according to a plug-in interface provided by a packet capturing tool;
a simulation data query request module 230, configured to send a query request for simulation data matching the uniform resource locator;
and the simulation data output module 240 is used for outputting the simulation data when the simulation data matched with the uniform resource locator is inquired through the agent tool.
The device further comprises:
a real data obtaining module 250, configured to, when the simulation data matching the uniform resource locator is not queried by the plug-in tool, obtain real data corresponding to the uniform resource locator and output the real data.
The device and method embodiments in the device embodiment are based on the same inventive concept.
An embodiment of the present invention provides a data processing apparatus, which includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the data processing method provided in the foregoing method embodiment.
An embodiment of the present invention further provides a readable storage medium, where the storage medium may be disposed in a client to store at least one instruction, at least one program, a code set, or a set of instructions related to implementing a data processing method in the method embodiment, where the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the data processing method provided in the method embodiment; the at least one instruction, the at least one program, the set of codes, or the set of instructions comprises instructions for:
sending an acquisition request of a uniform resource locator;
intercepting an acquisition request of the uniform resource locator, and sending the acquisition request to an agent tool; enabling the agent tool to acquire the uniform resource locator according to a plug-in interface provided by the packet capturing tool;
sending a query request of the simulation data matched with the uniform resource locator;
and when the simulation data matched with the uniform resource locator is inquired through the agent tool, outputting the simulation data.
Further, after sending a query request for simulated data that matches the uniform resource locator, the method includes: and when the simulation data matched with the uniform resource locator is not inquired through the plug-in tool, acquiring real data corresponding to the uniform resource locator.
In detail, when the agent tool queries the simulation data matched with the uniform resource locator, the simulation data is output, and the simulation data comprises: reading local account information by using the agent tool; sending a query request of a simulation data set according to the account information, wherein the simulation data set comprises a plurality of simulation data; and when response information of the simulation data matched with the uniform resource locator is acquired, the simulation data is taken out.
Further, after sending a query request for simulating a data set according to the account information, the method includes: acquiring a target item according to the account information, inquiring a corresponding uniform resource locator according to the target item, and inquiring corresponding use case data by the uniform resource locator; and querying a simulation data set constructed by using the case data.
It is noted that the target items are plural, each target item corresponds to a plurality of uniform resource locators, and each uniform resource locator corresponds to a plurality of use case data.
An embodiment of the present invention further provides a data processing device, as shown in fig. 18, which is a schematic structural diagram, and a client may be installed on the device, and the device may be configured to implement the data processing method provided in the foregoing method embodiment. Specifically, the method comprises the following steps:
the device may include RF (Radio Frequency) circuitry 810, memory 820 including one or more computer-readable storage media, input unit 830, display unit 840, sensor 850, audio circuitry 860, WiFi (wireless fidelity) module 870, processor 880 including one or more processing cores, and power supply 890. Those skilled in the art will appreciate that the configuration of the device shown in fig. 18 is not intended to be limiting of the device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 810 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for receiving downlink information from a base station and then processing the received downlink information by the one or more processors 880; in addition, data relating to uplink is transmitted to the base station. In general, RF circuit 810 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, the RF circuit 810 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), and the like.
The memory 820 may be used to store software programs and modules, and the processor 880 executes various functional applications and data processing by operating the software programs and modules stored in the memory 820. The memory 820 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs required for functions, and the like; the storage data area may store data created according to use of the apparatus, and the like. Further, the memory 820 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 820 may also include a memory controller to provide the processor 880 and the input unit 830 access to the memory 820.
The input unit 830 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 830 may include a touch-sensitive surface 831 as well as other input devices 832. The touch-sensitive surface 831, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 831 (e.g., operations by a user on or near the touch-sensitive surface 831 using a finger, a stylus, or any other suitable object or attachment) and drive the corresponding connection device according to a predefined program. Alternatively, the touch-sensitive surface 831 can include two portions, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 880, and can receive and execute commands from the processor 880. In addition, the touch-sensitive surface 831 can be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 830 may include other input devices 832 in addition to the touch-sensitive surface 831. In particular, other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 840 may be used to display information input by or provided to a user and various graphical user interfaces of the device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 840 may include a Display panel 841, and the Display panel 841 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like, as an option. Further, touch-sensitive surface 831 can overlay display panel 841 and, upon detecting a touch operation on or near touch-sensitive surface 831, communicate to processor 880 to determine the type of touch event, whereupon processor 880 can provide a corresponding visual output on display panel 841 in accordance with the type of touch event. Where touch-sensitive surface 831 and display panel 841 can be two separate components to implement input and output functions, touch-sensitive surface 831 can also be integrated with display panel 841 to implement input and output functions in some embodiments.
The device may also include at least one sensor 850, such as light sensors, motion sensors, and other sensors. In particular, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 841 based on the brightness of ambient light, and a proximity sensor that may turn off the display panel 841 and/or backlight when the device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the device is stationary, and can be used for applications of recognizing the device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured to the device, detailed description is omitted here.
Audio circuitry 860, speaker 861, microphone 862 may provide an audio interface between a user and the device. The audio circuit 860 can transmit the electrical signal converted from the received audio data to the speaker 861, and the electrical signal is converted into a sound signal by the speaker 861 and output; on the other hand, the microphone 862 converts collected sound signals into electrical signals, which are received by the audio circuit 860 and converted into audio data, which are then processed by the audio data output processor 880 and transmitted to, for example, another device via the RF circuit 810, or output to the memory 820 for further processing. The audio circuitry 860 may also include an earbud jack to provide communication of peripheral headphones with the device.
WiFi belongs to short-range wireless transmission technology, and the device can help users send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 870, and provides wireless broadband internet access for users. Although WiFi module 870 is shown in fig. 18, it is understood that it does not belong to the essential constitution of the device and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 880 is a control center of the apparatus, connects various parts of the entire apparatus using various interfaces and lines, performs various functions of the apparatus and processes data by operating or executing software programs and/or modules stored in the memory 820 and calling data stored in the memory 820, thereby monitoring the entire apparatus. Optionally, processor 880 may include one or more processing cores; preferably, the processor 880 may integrate an application processor, which mainly handles operating systems, user interfaces, applications, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 880.
The device also includes a power supply 890 (e.g., a battery) for powering the various components, which may be logically coupled to processor 880 via a power management system that may be used to manage charging, discharging, and power consumption. Power supply 890 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the device may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the display unit of the apparatus is a touch screen display, the apparatus further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by one or more processors to execute the instructions in the method embodiments of the present invention, and specifically, the processors are configured to execute:
sending an acquisition request of a uniform resource locator;
intercepting an acquisition request of the uniform resource locator, and sending the acquisition request to an agent tool; enabling the agent tool to acquire the uniform resource locator according to a plug-in interface provided by the packet capturing tool;
sending a query request of the simulation data matched with the uniform resource locator;
and when the simulation data matched with the uniform resource locator is inquired through the agent tool, outputting the simulation data.
And further for performing, after sending a query request for simulated data that matches the uniform resource locator, comprising: and when the simulation data matched with the uniform resource locator is not inquired through the plug-in tool, acquiring real data corresponding to the uniform resource locator.
In detail, when the agent tool queries the simulation data matched with the uniform resource locator, the simulation data is output, and specifically, the following steps are performed: reading local account information by using the agent tool; sending a query request of a simulation data set according to the account information, wherein the simulation data set comprises a plurality of simulation data; and when response information of the simulation data matched with the uniform resource locator is acquired, the simulation data is taken out.
Further, after sending a query request of a simulation data set according to the account information, the method is further used for executing the following steps: acquiring a target item according to the account information, inquiring a corresponding uniform resource locator according to the target item, and inquiring corresponding use case data by the uniform resource locator; and querying a simulation data set constructed by using the case data.
The target projects are multiple, each target project corresponds to multiple uniform resource locators, and each uniform resource locator corresponds to multiple use case data.
An embodiment of the present invention further provides a data processing system, as shown in fig. 19, the system includes a client 300 and a server 400;
the server 400 includes:
a data establishing module 410, configured to establish the simulation data set, where the simulation data set includes a plurality of simulation data;
and a data sending module 420, configured to send the simulation data when the simulation data matching the uniform resource locator is queried.
The client 300 includes:
a request sending module 310, configured to send an acquisition request of a uniform resource locator;
a request obtaining module 320, configured to intercept an obtaining request of the uniform resource locator, and send the obtaining request to an agent, so that the agent obtains the uniform resource locator according to a plug-in interface provided by a packet capture tool;
a data query module 330, configured to send a query request for the simulation data matching the uniform resource locator;
and the data output module 340 is configured to, when the simulation data matched with the uniform resource locator is queried through the agent tool, acquire the simulation data and output the simulation data.
The device and method embodiments described in the device embodiments are based on the same inventive concept.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A method of data processing, the method comprising:
sending an acquisition request of a uniform resource locator;
intercepting an acquisition request of the uniform resource locator, and sending the acquisition request to an agent tool; enabling the agent tool to acquire the uniform resource locator according to a plug-in interface provided by the packet capturing tool;
sending a query request of simulation data matched with the uniform resource locator, wherein the simulation data are data which are stored in a background management system in advance and correspond to the test cases;
reading local account information by using the agent tool, wherein a mapping relation exists between a user corresponding to the account information and a plurality of projects, a mapping relation exists between each project and a plurality of CGIs, and a mapping relation exists between each CGI and a plurality of test cases;
sending a query request of a simulation data set according to the account information, wherein the simulation data set comprises a plurality of simulation data;
acquiring a target item according to the account information, inquiring a corresponding uniform resource locator according to the target item, and inquiring corresponding use case data by the uniform resource locator;
querying the simulation data set constructed by the case data;
when response information of the simulation data matched with the uniform resource locator is acquired, the simulation data is taken out;
and when the simulation data matched with the uniform resource locator is not inquired through the agent tool, acquiring real data corresponding to the uniform resource locator.
2. The method of claim 1, wherein the target item is a plurality of target items, each target item corresponds to a plurality of uniform resource locators, and each uniform resource locator corresponds to a plurality of use case data.
3. A data processing apparatus, characterized in that the apparatus comprises:
the uniform resource locator request module is used for sending a uniform resource locator acquisition request;
a uniform resource locator obtaining module, configured to intercept an obtaining request of the uniform resource locator, and send the obtaining request to an agent, so that the agent obtains the uniform resource locator according to a plug-in interface provided by a packet capturing tool;
the simulation data query request module is used for sending a query request of simulation data matched with the uniform resource locator, wherein the simulation data is data which is stored in a background management system in advance and corresponds to a test case;
the real data acquisition module is used for acquiring real data corresponding to the uniform resource locator when the agent tool does not inquire the simulation data matched with the uniform resource locator;
the simulation data output module is used for outputting the simulation data when the simulation data matched with the uniform resource locator is inquired through the agent tool;
wherein, the simulation data query request module comprises:
the account information reading unit is used for reading local account information by using the agent tool, wherein a mapping relation exists between a user corresponding to the account information and a plurality of projects, a mapping relation exists between each project and a plurality of CGIs, and a mapping relation exists between each CGI and a plurality of test cases;
the simulation data set query request module is used for sending a query request of a simulation data set according to the account information, and the simulation data set comprises a plurality of simulation data;
the case data query module is used for acquiring a target item according to the account information, querying a corresponding uniform resource locator according to the target item, and querying corresponding case data through the uniform resource locator;
the simulation data set construction module is used for inquiring a simulation data set constructed by the case data;
and the simulation data response module is used for taking out the simulation data when the response information of the simulation data matched with the uniform resource locator is acquired.
4. The apparatus of claim 3, wherein the target item is a plurality of target items, each target item corresponds to a plurality of uniform resource locators, and each uniform resource locator corresponds to a plurality of use case data.
5. A data processing apparatus, characterized in that the apparatus comprises a processor and a memory, in which at least one instruction, at least one program, set of codes or set of instructions is stored, which is loaded and executed by the processor to implement the data processing method according to any one of claims 1 to 2.
6. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the data processing method according to any one of claims 1 to 2.
CN201810174902.5A 2018-03-02 2018-03-02 Data processing method, device, equipment and storage medium Active CN108345543B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810174902.5A CN108345543B (en) 2018-03-02 2018-03-02 Data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810174902.5A CN108345543B (en) 2018-03-02 2018-03-02 Data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108345543A CN108345543A (en) 2018-07-31
CN108345543B true CN108345543B (en) 2021-08-17

Family

ID=62958961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810174902.5A Active CN108345543B (en) 2018-03-02 2018-03-02 Data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108345543B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547430B (en) * 2018-11-16 2021-02-12 上海朔羡网络科技有限公司 Development service gateway system and development service gateway
CN109688202B (en) * 2018-12-04 2021-07-02 北京腾云天下科技有限公司 Interface data processing method and device, computing equipment and storage medium
CN109862074B (en) * 2018-12-29 2022-03-25 医渡云(北京)技术有限公司 Data acquisition method and device, readable medium and electronic equipment
CN109933533B (en) * 2019-03-25 2022-06-14 杭州安恒信息技术股份有限公司 Visual data testing method, device and equipment and readable storage medium
CN109947658B (en) * 2019-04-03 2022-03-04 颜沿(上海)智能科技有限公司 Method and device for simulating real scene data generation
CN113722020A (en) * 2020-05-26 2021-11-30 腾讯科技(深圳)有限公司 Interface calling method, device and computer readable storage medium
CN111679980A (en) * 2020-06-03 2020-09-18 中国银行股份有限公司 Background data simulation method and device
CN112162974A (en) * 2020-09-25 2021-01-01 南京烽火天地通信科技有限公司 Travel program data fixing method
CN112711421B (en) * 2020-12-28 2024-04-19 广州品唯软件有限公司 Cross-service Mock data sharing use method, system, equipment and storage medium
CN113220584A (en) * 2021-05-26 2021-08-06 京东科技控股股份有限公司 Page testing method and device, computer equipment and readable storage medium
CN114039899B (en) * 2021-10-19 2023-08-15 浙江中控技术股份有限公司 Method for realizing network performance test of WEB product based on Fiddler tool
CN114997840B (en) * 2022-07-18 2022-11-29 南京华娱数字科技有限公司 CGI project process data storage management system based on WebGL

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8584240B1 (en) * 2007-10-03 2013-11-12 Trend Micro Incorporated Community scan for web threat protection
CN105335293A (en) * 2015-11-30 2016-02-17 努比亚技术有限公司 Automatic testing system and method based on parallel ports
CN106681922A (en) * 2016-12-27 2017-05-17 广州唯品会信息科技有限公司 Simulation server response method and system
CN106708717A (en) * 2015-07-17 2017-05-24 腾讯科技(北京)有限公司 Development debugging method and device
CN107368405A (en) * 2016-05-11 2017-11-21 腾讯科技(北京)有限公司 Test system, method of testing, mock platforms, blocker and client
CN107659455A (en) * 2017-10-16 2018-02-02 武汉斗鱼网络科技有限公司 A kind of method, storage medium, equipment and the system of iOS ends Mock data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8584240B1 (en) * 2007-10-03 2013-11-12 Trend Micro Incorporated Community scan for web threat protection
CN106708717A (en) * 2015-07-17 2017-05-24 腾讯科技(北京)有限公司 Development debugging method and device
CN105335293A (en) * 2015-11-30 2016-02-17 努比亚技术有限公司 Automatic testing system and method based on parallel ports
CN107368405A (en) * 2016-05-11 2017-11-21 腾讯科技(北京)有限公司 Test system, method of testing, mock platforms, blocker and client
CN106681922A (en) * 2016-12-27 2017-05-17 广州唯品会信息科技有限公司 Simulation server response method and system
CN107659455A (en) * 2017-10-16 2018-02-02 武汉斗鱼网络科技有限公司 A kind of method, storage medium, equipment and the system of iOS ends Mock data

Also Published As

Publication number Publication date
CN108345543A (en) 2018-07-31

Similar Documents

Publication Publication Date Title
CN108345543B (en) Data processing method, device, equipment and storage medium
CN106970790B (en) Application program creating method, related equipment and system
US11711670B2 (en) Method for activating service based on user scenario perception, terminal device, and system
US11798107B2 (en) Scenario-based application recommendation method and apparatus
US9846699B2 (en) System and methods thereof for dynamically updating the contents of a folder on a device
CN105471931B (en) Method, device and system for inquiring service data
CN109857403B (en) Page updating method and device, page processing method and device
CN111178012A (en) Form rendering method, device and equipment and storage medium
CN111416756B (en) Protocol testing method, device, computer equipment and storage medium
CN111580815B (en) Page element editing method and related equipment
CN110489597A (en) A kind of method and terminal device obtaining data
CN111078556B (en) Application testing method and device
CN106156097B (en) Method and device for processing browser input records
CN112347545A (en) Building model processing method and device, computer equipment and storage medium
CN112749074B (en) Test case recommending method and device
CN115756881A (en) Data processing method, device, equipment and storage medium based on SDK
CN108182090B (en) Flash plug-in loading method and device based on blink kernel
CN111359210B (en) Data processing method and device, electronic equipment and storage medium
CN111177612B (en) Page login authentication method and related device
CN114428721A (en) Test data processing method, device and storage medium
CN109145182B (en) Data acquisition method and device, computer equipment and system
CN107741895B (en) Server management method, device and equipment
CN115686506A (en) Data display method and device, electronic equipment and storage medium
CN110309454B (en) Interface display method, device, equipment and storage medium
CN113468260A (en) Data analysis 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