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

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

Info

Publication number
CN114691485A
CN114691485A CN202011638061.2A CN202011638061A CN114691485A CN 114691485 A CN114691485 A CN 114691485A CN 202011638061 A CN202011638061 A CN 202011638061A CN 114691485 A CN114691485 A CN 114691485A
Authority
CN
China
Prior art keywords
application
target
display data
page display
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011638061.2A
Other languages
Chinese (zh)
Inventor
苟亚明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011638061.2A priority Critical patent/CN114691485A/en
Publication of CN114691485A publication Critical patent/CN114691485A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/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)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a data processing method, a device, a terminal device and a storage medium, wherein the method comprises the following steps: intercepting at least one page presentation data of the second application, the at least one page presentation data being returned by the second application based on the data acquisition request sent by the at least one first application. Modifying the intercepted page display data based on a first preset mock rule, and storing the modified page display data in a message queue of a database, wherein the database comprises at least one message queue, and the message queue is used for storing page display data corresponding to a first application. When the page test of the target first application is started, the modified page display data corresponding to the target first application is sent to the target first application through the target message queue for storing the page display data corresponding to the target first application, so that the page test of the target first application is carried out. By adopting the method and the device, the testing efficiency and the testing comprehensiveness can be improved.

Description

Data processing method, device, terminal equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method and apparatus, a terminal device, and a storage medium.
Background
With the iteration of versions, the functions of the application program are closer to the actual requirements of people, and the page display of the application program is richer and more diversified. Each time the version of the application is updated, the application is usually required to be subjected to a compatibility test, that is, whether the application can normally display pages of various styles or not is tested or verified. Currently, a testing or developing person generally modifies values of partial fields in data manually to generate mock data for testing, but the testing efficiency is low in the manual mock data mode of the testing person, and the mock data of the testing person has subjective factors, so that various data scenes cannot be covered, and a tested program cannot be verified comprehensively. Therefore, how to improve the testing efficiency and more comprehensively test the application programs becomes a problem to be solved at present.
Disclosure of Invention
The embodiment of the application provides a data processing method, a data processing device, a terminal device and a storage medium, which can improve the testing efficiency of an application program and improve the test comprehensiveness of the application program.
In a first aspect, an embodiment of the present application provides a data processing method, where the method includes:
intercepting at least one page display data of a second application, wherein the at least one page display data is returned by the second application based on a data acquisition request sent by at least one first application;
modifying the intercepted page display data corresponding to each first application based on a first preset mock rule, and storing the modified page display data corresponding to each first application in a message queue of a database, wherein the database comprises at least one message queue, one message queue is used for storing page display data corresponding to one first application, and the first preset mock rule is used for determining a modification mode of the page display data;
when the page test of the target first application is started, the modified page display data corresponding to the target first application is sent to the target first application through a target message queue for storing the page display data corresponding to the target first application, so that the page test of the target first application is carried out.
With reference to the first aspect, in one possible implementation, the method further includes:
when a page test request sent by a target first application is received, determining to start a page test of the target first application, and determining a target message queue from the plurality of message queues according to the page test request, wherein the target message queue is used for storing page display data corresponding to the target first application.
With reference to the first aspect, in a possible implementation manner, the database further includes a plurality of queue identifiers, where one queue identifier is used to uniquely mark one message queue;
the determining a target message queue from the plurality of message queues according to the page test request includes:
acquiring a target queue identifier associated with the application identifier from the plurality of queue identifiers according to the application identifier included in the page test request;
and determining the message queue corresponding to the target queue identification as a target message queue from the plurality of message queues.
With reference to the first aspect, in one possible implementation, the method further includes:
determining to start a page test of the target first application when a data sending instruction for sending page display data to the target first application is obtained based on a user operation interface;
and determining a target message queue corresponding to the queue identifier from the plurality of message queues according to the queue identifier included in the data sending instruction, wherein the target message queue is used for storing page display data corresponding to the target first application.
With reference to the first aspect, in a possible implementation manner, before intercepting at least one page display data of a second application, the method further includes:
intercepting initial data acquisition requests sent by the plurality of first applications to the second application based on a packet capturing tool;
according to a second preset mock rule, modifying parameters in the initial data acquisition requests sent by the first applications to obtain modified initial data acquisition requests;
and sending each modified initial data acquisition request serving as a data acquisition request sent by each first application to the second application based on the packet capturing tool so as to trigger the second application to return a plurality of page display data based on the data acquisition requests sent by the plurality of first applications.
With reference to the first aspect, in a possible implementation manner, the page display data is json format data; the first preset mock rule comprises a modification rule corresponding to each field type in a plurality of field types;
before the modifying, based on the first preset mock rule, the page display data corresponding to each intercepted first application, the method further includes:
carrying out format analysis on json format data corresponding to each intercepted first application to obtain each field type included in the json format data corresponding to each first application and a value corresponding to each field type;
the modifying the page display data corresponding to each intercepted first application based on the first preset mock rule includes:
and acquiring modification rules corresponding to the field types from the first preset mock rules, and modifying values corresponding to the field types included in the json format data corresponding to the first applications according to the modification rules corresponding to the field types.
With reference to the first aspect, in a possible implementation manner, after the modified page display data corresponding to the target first application is sent to the target first application through a target message queue for storing the page display data corresponding to the target first application, the method further includes:
and receiving test detail data returned by the target first application after page test is carried out on the page display data corresponding to the modified target first application, and generating a test report according to the test detail data.
In a second aspect, an embodiment of the present application provides a data processing apparatus, including:
the page display data intercepting module is used for intercepting at least one page display data of a second application, wherein the at least one page display data is returned by the second application based on a data acquisition request sent by at least one first application;
the page display data processing module is used for modifying the intercepted page display data corresponding to each first application based on a first preset mock rule and storing the modified page display data corresponding to each first application in a message queue of a database, wherein the database comprises at least one message queue, one message queue is used for storing the page display data corresponding to one first application, and the first preset mock rule is used for determining the modification mode of the page display data;
and the page display data sending module is used for sending the modified page display data corresponding to the target first application through a target message queue for storing the page display data corresponding to the target first application when starting the page test of the target first application so as to perform the page test on the target first application.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes a first test starting module, where the first test starting module includes:
the page test request receiving unit is used for determining to start the page test of the target first application when receiving a page test request sent by the target first application;
and the first target message queue determining unit is used for determining a target message queue from the plurality of message queues according to the page test request, wherein the target message queue is used for storing page display data corresponding to the target first application.
With reference to the second aspect, in a possible implementation manner, the database further includes a plurality of queue identifiers, and one queue identifier is used for uniquely marking one message queue;
the first target message queue determining unit is specifically configured to:
acquiring a target queue identifier associated with the application identifier from the plurality of queue identifiers according to the application identifier included in the page test request;
and determining the message queue corresponding to the target queue identification as a target message queue from the plurality of message queues.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes a second test starting module, where the second test starting module includes:
the data sending instruction acquisition unit is used for determining to start a page test of the target first application when a data sending instruction for sending page display data to the target first application is acquired based on a user operation interface;
and a second target message queue determining unit, configured to determine, according to a queue identifier included in the data sending instruction, a target message queue corresponding to the queue identifier from the multiple message queues, where the target message queue is used to store page display data corresponding to the target first application.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes:
a data acquisition request intercepting module, configured to intercept, based on the packet capturing tool, an initial data acquisition request sent by the plurality of first applications to the second application;
the data acquisition request modification module is used for modifying parameters in the initial data acquisition requests sent by the first applications according to a second preset mock rule to obtain modified initial data acquisition requests;
and a data acquisition request sending module, configured to send each modified initial data acquisition request to the second application as a data acquisition request sent by each first application based on the packet capturing tool, so as to trigger the second application to return multiple page display data based on the data acquisition requests sent by multiple first applications.
With reference to the second aspect, in a possible implementation manner, the page display data is json format data; the first preset mock rule comprises a modification rule corresponding to each field type in a plurality of field types;
the above-mentioned device still includes:
the data format analysis module is used for carrying out format analysis on the json format data corresponding to the intercepted first applications to obtain field types and values corresponding to the field types, wherein the field types are contained in the json format data corresponding to the first applications;
the page display data processing module comprises a page display data modification unit and a message queue generation unit, wherein the page display data modification unit is specifically configured to:
and acquiring modification rules corresponding to the field types from the first preset mock rules, and modifying values corresponding to the field types included in the json format data corresponding to the first applications according to the modification rules corresponding to the field types.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes:
and the test result processing module is used for receiving test detail data returned by the target first application after the target first application performs page test according to the modified page display data corresponding to the target first application, and generating a test report according to the test detail data.
In a third aspect, an embodiment of the present application provides a terminal device, where the terminal device includes a processor, a memory, and a transceiver, and the processor, the memory, and the transceiver are connected to each other. The memory is configured to store a computer program that enables the terminal device to execute the method provided by the first aspect and/or any one of the possible implementation manners of the first aspect, where the computer program includes program instructions, and the processor and the transceiver are configured to call the program instructions to execute the method provided by the first aspect and/or any one of the possible implementation manners of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, where a computer program is stored, where the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the method provided by the first aspect and/or any one of the possible implementation manners of the first aspect.
In this embodiment of the application, when a third application intercepts, based on a packet capturing tool, a plurality of page display data returned by a second application based on a data acquisition request sent by a plurality of first applications, the intercepted page display data corresponding to each first application may be modified based on a first preset mock rule, and the modified page display data corresponding to each first application is stored in a message queue of a database, where the database includes a plurality of message queues, and one message queue is used for storing one page display data corresponding to one first application. When the page test of the target first application is started, the modified page display data corresponding to the target first application is sent to the target first application through the target message queue for storing the page display data corresponding to the target first application, so that the page test of the target first application is carried out. By adopting the embodiment of the application, the testing efficiency and the testing comprehensiveness can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, 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 diagram of a system architecture provided by an embodiment of the present application;
FIG. 2 is a flow chart of a data processing method according to an embodiment of the present disclosure;
FIG. 3 is a diagram of an application scenario presented by a page provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of a data processing process provided by an embodiment of the present application;
FIG. 5 is another schematic flow chart diagram of a data processing method according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
FIG. 7 is a schematic diagram of another structure of a data processing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a system architecture diagram according to an embodiment of the present disclosure. As shown in fig. 1, the server 10d may establish a connection with the terminal device cluster 1 through a network, where the terminal device cluster 1 may include: terminal device 10a, terminal device 10 b. Each terminal device shown in fig. 1 may include a mobile phone, a tablet computer, a notebook computer, a palm computer, a Mobile Internet Device (MID), a wearable device (e.g., a smart watch, a smart bracelet, etc.), and the like, which are not limited herein. It should be understood that the server 10d may perform data transmission with each terminal device in the terminal device cluster 1, and each terminal device may be loaded with an application program with various functionalities, and for convenience of description, the various functional application programs loaded on each terminal device may be exemplified by taking the first application as an example. Optionally, the first application may be a video application, an instant messaging application, a game application, a shopping application, and the like, or the first application may also be an applet, a web page, and the like. In the present application, the plurality of first applications may be a plurality of different types of applications, for example, the plurality of first applications may be a video application a, a video application B, an instant messaging application C, a game application D, and the like. Optionally, the first application may also be a process, and the plurality of first applications may also be a plurality of processes started in the same application program. For example, a user account may have multiple user accounts, and when a user account logs in to the application, a process may be triggered to be initiated, and the process may be used to service the user account. The plurality of first applications may be a plurality of processes in the same application, and one process is used for a user account for logging in the application. Optionally, when the first application is an application program, the application identifier of the first application is an application program identifier. And when the first application is a process, the application identifier of the first application is a process identifier. The specific expression form of the first application may be determined according to the requirements of the actual application scenario, and is not limited herein. For convenience of description, the first application will be described below as an example, and correspondingly, the application program identifier or the process identifier may be described as an example by using an application identifier of the first application, which is not described in detail below.
The server 10d may be a local server of the first application, or may be a remote server (e.g., a cloud server). The server 10d may also install an application program, and for convenience of description, the application program installed on the server may be referred to as the second application. It should be understood that the second application of the server stores therein various types of data and information required by each of the plurality of first applications. Therefore, when each first application in the terminal device sends a data acquisition request to the second application in the server, the second application in the server can return a data condition to the first application in the terminal device based on the received data acquisition request, so as to update the interface display condition of the first application in the terminal device. It should be understood that, in the present application, each terminal device may also be loaded with a third application, which is a test-type application developed in the present application for testing each first application in the terminal device. It should be understood that the third application in this embodiment of the present application may be loaded in the same terminal device as the first application, or the third application may also be loaded in a different terminal device from the first application, which is determined according to an actual application scenario, and is not limited herein.
The data processing method provided by the embodiment of the application can be applied to a third application in the terminal device of the system shown in fig. 1. Specifically, in the method in this embodiment of the present application, the third application may intercept, based on the bale plucking tool, the multiple page display data returned by the second application based on the data acquisition requests sent by the multiple first applications. Then, the third application may modify the intercepted page display data corresponding to each first application based on the first preset mock rule, and store the modified page display data corresponding to each first application in a message queue of the database. It should be understood that the database includes a plurality of message queues, one message queue is used for storing page display data corresponding to a first application, and the first preset mock rule is used for determining a modification manner of the page display data. When the page test of the target first application is started, the modified page display data corresponding to the target first application is sent to the target first application through the target message queue for storing the page display data corresponding to the target first application, so that the page test of the target first application is carried out. By adopting the embodiment of the application, the test efficiency of the application program can be improved, and the test comprehensiveness of the application program can be improved.
The method and the related apparatus provided by the embodiments of the present application will be described in detail with reference to fig. 2 to 8, respectively.
Referring to fig. 2, fig. 2 is a flow chart illustrating a data processing method according to an embodiment of the present disclosure. The method provided by the embodiment of the application can comprise the following steps S201 to S203:
s201, intercepting at least one page display data of the second application.
In some possible embodiments, as versions are iterated, application functions become increasingly diverse, and for a client or an application (i.e. a first application) in a terminal device, one function may present multiple presentation forms, and a rule of specific presentation depends on data returned by a second application in a server. For example, please refer to fig. 3, fig. 3 is an application scenario diagram of a page display provided by an embodiment of the present application. The display page shown in fig. 3 is 3 different display forms of an open screen advertisement of a certain video application program (i.e., a first application), where the display rules may be set as: when the mobile phone number of the user is 1, 3 or 5, displaying a first display page, when the mobile phone number of the user is 2, 4 or 6, displaying a second display page, and when the mobile phone number of the user is 7, 8, 9 or 0, displaying a third display page. The specific display logic is: when a user with a mobile phone tail number of 1 starts the first application, the first application sends a request to a second application in the server before the first application is displayed, the request contains the mobile phone number of the current user, and if the second application judges that the mobile phone tail number of the second application needs a display page with a first display form, the second application returns page display data corresponding to the first display page to the first application so as to display the page display data to the user through the first application.
In some possible embodiments, since the pages or page elements corresponding to different page display data have differences in details, developers and testers perform mock of the page display data when checking each situation. In this embodiment of the application, the third application of the terminal device may intercept, by means of the bale plucking tool, the multiple page display data returned by the second application based on the data acquisition requests sent by the multiple first applications. That is, the third application may intercept at least one page show data of the second application based on the bale plucker, wherein the at least one page show data is returned by the second application based on the data acquisition request sent by the at least one first application. The bale plucking tool may be a Charles tool, and the like, which is not limited herein. It should be understood that the Charles tool may be understood as a proxy server which, by becoming a proxy for the terminal device, may intercept or intercept communication data between a plurality of first applications installed in the terminal device and a second application installed in the server, and externally provide a modification function for the intercepted communication data. For example, the third application may intercept the request data sent by the first application to the second application based on Charles, and modify the request parameters in the intercepted request data based on the Rewrite function of Charles. For another example, the third application may also intercept, based on Charles, request result data (e.g., page display data) or the like fed back to the first application by the second application based on the received request data, and modify, based on a MapLocal function of Charles, the intercepted request result data. In the application, request data sent by a first application to a second application is a data acquisition request of page display data, and request result data returned by the second application based on the request data of the first application is the page display data.
It should be understood that the third application is cross-platform, and in the case of opening Charles, the third application may find Charles through the port number, and then search through the opened functions of Charles to find the MapLocal function and the Rewrite function in Charles. Wherein the Rewrite is used for modifying the request parameter in the intercepted request data when the first application is sending the request data. MapLocal is used for modifying the intercepted request result data when the first application acquires the request result data.
S202, modifying the intercepted page display data corresponding to each first application based on a first preset mock rule, and storing the modified page display data corresponding to each first application in a message queue of a database.
In some possible embodiments, when a third application intercepts, based on a packet capturing tool, a plurality of page display data returned by a second application based on a data acquisition request sent by a plurality of first applications, the third application may modify, by means of a modification function of the packet capturing tool and based on a first preset mock rule stored in a database of the third application, the page display data corresponding to each intercepted first application, and store the modified page display data corresponding to each first application in a message queue of the database. The database comprises a plurality of message queues, and one message queue is used for storing page display data corresponding to a first application. For convenience of description, the following embodiments of the present application are described by taking an example in which a third application intercepts communication data between a first application and a second application in a plurality of first applications. For example, please refer to fig. 4, fig. 4 is a schematic diagram of a data processing process according to an embodiment of the present disclosure. As shown in fig. 4, when a page of a first application X (the first application X is one of a plurality of first applications) starts to be loaded, the first application X may send a data acquisition request to a second application, where the data acquisition request may include information such as a server name where the second application is located, a request parameter, a request time, and a signature. Since Charles opens the Rewrite function, the third application may intercept, based on Charles, the data acquisition request sent by the first application X to the second application, and store the data acquisition request in the database of the third application. Then, the third application may directly send the data acquisition request to the second application based on Charles (that is, the data acquisition request sent by the first application X to the second application is not modified), or the third application may also send the modified data acquisition request to the second application through Charles after modifying the data acquisition request. Further, the third application can also intercept page display data returned by the second application to the first application X through Charles, and modify the page display data returned by the second application through a first preset mock rule, so that the modified page display data is stored in the message queue corresponding to the first application X in the database.
Generally speaking, the page display data is json format data, and the first preset mock rule is used for determining a modification mode of the page display data, and comprises a plurality of field types and modification rules corresponding to the field types. And the third application performs format analysis on the intercepted json format data corresponding to each first application to obtain each field type included in the json format data corresponding to each first application and a value corresponding to each field type. When the intercepted page display data corresponding to each first application is modified based on the first preset mock rule, the modification rule corresponding to each field type can be obtained from the first preset mock rule, and the value corresponding to each field type included in the json format data corresponding to each first application is modified according to the modification rule corresponding to each field type. That is to say, after the third application performs formatting scanning on the json data, fields of types such as an Array (Array), an Object (Object), a String (String), a store (Auto) and the like included in the json can be analyzed, and then, according to a modification rule corresponding to each field type in the first preset mock rule, a value of each field type included in the page display data of each first application is modified. For example, for an array type, null data and data with a length greater than a preset length may be randomly generated, or the content of an array element may be modified, for example, the number of elements may be deleted or added. For another example, for the object type, a value corresponding to the object type may be randomly evaluated, or data of a non-object type may be generated. For example, for a string type, a string with length 0 and length >64 may be randomly generated by a random function, and non-string type data may be generated, which is determined according to an actual application scenario and is not limited herein. It should be understood that, since the page display data corresponding to each data acquisition request is different, the first preset mock rule can be modified and customized according to the context. It should be understood that the modified page presentation data may also be referred to as analog data, i.e., mock data. The simulation of the data which is not of the present type, namely the modification of the data, is to verify the robustness of the first application for data compatibility, and to prevent the first application from crashing and the like when the data type is disordered due to the internal logic error of the second application.
Optionally, in some feasible embodiments, after the data acquisition request intercepted by the third application and sent by the first application to the second application, the third application may further generate a data identifier according to content, such as a request parameter, included in the data acquisition request, so as to store data returned by the corresponding second application. That is to say, when the second application in the server returns page display data based on the data acquisition request sent by the first application, and is intercepted and modified by the third application based on the package capture tool, the third application can store the modified page display data and the corresponding data identifier in an associated manner, so that the data identifier can be used as an index of the corresponding page display data in subsequent use. The data identifier may be a unique identifier generated by splicing contents such as request parameters included in the data acquisition request and calculating the spliced data based on a message-digest algorithm (MD 5). Further, the third application may store the data identification in a message queue corresponding to each first application in the database. That is to say, the message queue corresponding to each application program stores the data identifier corresponding to the page display data of each first application, so that the unique corresponding page display data can be subsequently acquired from the database through the data identifier in the message queue.
S203, when the page test of the target first application is started, the modified page display data corresponding to the target first application is sent to the target first application through a target message queue for storing the page display data corresponding to the target first application.
In some possible embodiments, when the page test of the target first application is started, the modified page display data corresponding to the target first application may be sent to the target first application through the target message queue for storing the page display data corresponding to the target first application, so as to perform the page test on the target first application. That is, when a developer or tester wants to perform compatibility testing or verification on page data of a certain application, the data may be transmitted through the message queue. Wherein the target first application is an application or a plurality of applications with test requirements. For example, assume that a plurality of first applications, first application 1, first application 2, and first application 3, respectively, are installed in the terminal device. If the application with the test requirement is the first application 1, the target first application is the first application 1, and if the application with the test requirement is the first application 2, the target first application is the first application 2.
Specifically, when a page test request sent by a target first application is received, determining to start a page test of the target first application, and determining a target message queue from a plurality of message queues according to the page test request, wherein the target message queue is used for storing page display data corresponding to the target first application. The page test request comprises an application identifier, the application identifier is used for uniquely marking a first application, the database comprises a plurality of queue identifiers, and one queue identifier is used for uniquely marking a message queue. Therefore, when the target message queue is determined from the plurality of message queues according to the page test request, the queue identifier associated with the application identifier can be acquired from the plurality of queue identifiers as the target queue identifier according to the application identifier included in the page test request. Further, a message queue corresponding to the target queue identification is determined from the plurality of message queues to serve as the target message queue.
It should be understood that the queue identifier corresponding to each first application may be the same as the application identifier of each first application, i.e., the queue identifier corresponding to each first application is the application identifier corresponding to the queue identifier. Optionally, the queue identifier corresponding to each first application may also be different from the application identifier of each first application, but a one-to-one mapping relationship between the queue identifier and the application identifier corresponding to each first application is stored in the database, so that according to the application identifier included in the page test request, a target queue identifier associated with the application identifier of the target first application may be determined from the mapping relationship between the queue identifier and the application identifier stored in the database, and then, from a plurality of message queues in the database, a message queue corresponding to the target queue identifier is determined as a target message queue, and page display data stored in the target message queue is fed back to the target first application in a queue manner.
Optionally, in some feasible real number manners, in order to facilitate development and direct operation by a tester, the third application may further include a user operation page, so that the tester or the developer may actively trigger a test on the target first application through a user operation interface of the third application. When the third application acquires a data sending instruction for sending the page display data to the target first application by the third application based on the user operation interface of the third application, the page test of the target first application can be determined to be started. Furthermore, the third application may determine, from the plurality of message queues, a message queue corresponding to the queue identifier as a target message queue according to the queue identifier included in the data sending instruction, and feed back page display data stored in the target message queue to the target first application in a queue manner. For example, when a first application needs to perform accelerated rendering of a page, since the real-time requirement of the first application on data is relatively high, a third application needs to actively send data to the first application, and therefore when the third application sends data to the first application in a queue manner, the third application can establish a long connection with the first application and further transmit data in a long connection manner.
It should be understood that the developer or tester may also perform other operations based on the user operation interface of the third application, for example, the tester may also add, delete or modify mock rules based on the user operation interface. Specifically, when the third application acquires an instruction for adding a mock rule, deleting a mock rule, or modifying a mock rule based on the user operation interface, the third application may perform a corresponding operation on the mock rule stored in the database of the third application based on the acquired instruction. It should be understood that the mock rule includes a first preset mock rule for page presentation data sent by the second application and a second preset mock rule for a data acquisition request sent by the first application. The first preset mock rule and the second preset mock rule may be the same or different, and are determined according to an actual application scenario, which is not limited herein.
In this embodiment of the application, when a third application intercepts, based on a packet capturing tool, a plurality of page display data returned by a second application based on a data acquisition request sent by a plurality of first applications, the intercepted page display data corresponding to each first application may be modified based on a first preset mock rule, and the modified page display data corresponding to each first application is stored in a message queue of a database, where the database includes a plurality of message queues, and one message queue is used for storing one page display data corresponding to one first application. When the page test of the target first application is started, the modified page display data corresponding to the target first application is sent to the target first application through the target message queue for storing the page display data corresponding to the target first application, so that the page test of the target first application is carried out. By adopting the embodiment of the application, the testing efficiency and the testing comprehensiveness can be improved.
Referring to fig. 5, fig. 5 is another schematic flow chart of a data processing method according to an embodiment of the present disclosure. The data processing method provided in the embodiment of the present application can be described by the following implementation manners provided in steps S301 to S306:
s301, intercepting initial data acquisition requests sent by a plurality of first applications to a second application based on a bale plucking tool.
In some possible embodiments, before sending a data acquisition request (i.e., an initial data acquisition request) to a second application, each of the first applications may perform a point burying operation to record information such as a request time and a request parameter thereof, and each of the first applications may segment the initial data acquisition request by using a hypertext transfer protocol (HTTP) protocol to obtain a plurality of segment requests, and send the initial data acquisition request to the second application by sending the segment requests. One of the segmented requests includes partial data content in the complete initial data acquisition request, so that the complete initial data acquisition request can be obtained after a plurality of segmented requests are assembled based on the HTTP protocol.
It should be understood that the initial data acquisition request in this application is the original, non-intercepted and pre-modified data acquisition request sent by the first application to the second application. When a third application intercepts a segmentation request sent by any first application to a second application based on a bale plucking tool, the third application can assemble the intercepted segmentation requests to obtain a complete initial data acquisition request, and then the complete initial data acquisition request is processed.
S302, according to a second preset mock rule, parameters in the initial data acquisition requests sent by the first applications are modified to obtain the modified initial data acquisition requests.
In some feasible embodiments, after the third application intercepts, by the packet capture tool, the segment request sent by each first application to the second application, and assembles the segment request based on the HTTP protocol to obtain a complete initial data acquisition request, parameters in the initial data acquisition request sent by each first application may be modified according to a second preset mock rule stored in the database to obtain each modified initial data acquisition request. Generally speaking, the data acquisition request is also json format data, and therefore, the third application may obtain each field type included in the initial data acquisition request and a value corresponding to each field type by performing format analysis on the acquired initial data acquisition request. Therefore, according to the multiple field types included in the second preset mock rule and the modification rule corresponding to each field type, the value corresponding to each field type in the initial data acquisition request can be modified, and each modified initial data acquisition request is obtained.
And S303, sending each modified initial data acquisition request serving as a data acquisition request sent by each first application to a second application based on a packet capturing tool so as to trigger the second application to return a plurality of page display data based on the data acquisition requests sent by the plurality of first applications.
In some possible embodiments, after the initial data obtaining request is modified by the second preset mock rule, the modified initial data obtaining request may be used as a data obtaining request sent by the first application to the second application, so as to send the modified initial data obtaining request to the second application by the packet capturing tool. Specifically, when the third application sends the modified initial data acquisition request to the second application through the packet capturing tool, the modified initial data acquisition request may also be segmented based on the HTTP protocol to obtain a plurality of segmentation requests, and the modified initial data acquisition request is sent to the second application in a manner of sending the segmentation requests. After receiving the multiple segmentation requests, the second application may also assemble the received multiple segmentation requests based on the HTTP protocol to obtain a complete data acquisition request for processing, that is, the second application returns page display data to the corresponding first application according to the complete data acquisition request obtained by the assembly. It should be understood that, if a data sending manner of directly sending a complete data acquisition request is adopted, when the data amount of the data acquisition request is too large, the data acquisition request is sent unsuccessfully, and therefore, the sending success rate of the data acquisition request can be improved by adopting a sending manner of sending the data acquisition request in a segmented manner in the embodiments of the present application.
S304, intercepting at least one page display data of the second application.
S305, modifying the intercepted page display data corresponding to each first application based on a first preset mock rule, and storing the modified page display data corresponding to each first application in a message queue of a database.
S306, when the page test of the target first application is started, the modified page display data corresponding to the target first application is sent to the target first application through a target message queue for storing the page display data corresponding to the target first application.
The specific implementation manner of steps S304 to S306 may refer to the description of steps S201 to S203 in the embodiment corresponding to fig. 1, and is not described herein again.
S307, test detail data returned after the target first application performs page test according to the modified page display data corresponding to the target first application are received, and a test report is generated according to the test detail data.
In some feasible embodiments, after the target first application performs the page test based on each page display data corresponding to the target first application stored in the target message queue, that is, after the target first application performs the page loading or page rendering based on the received page display data, the target first application may send the test detail data to the third application, so that the third application may generate the test report according to the received test detail data. The test detail data may be log data in the first application, and therefore, the third application may determine whether the page display of the target first application is disordered by analyzing the log data generated when the first application performs the page test, or determine whether the target first application is crashed or the like in the running process by analyzing the log data generated when the first application performs the page test, so as to generate the test report of the target first application. Further, the tester or developer may further optimize and improve the target first application based on the generated test report.
In this embodiment of the application, the third application may intercept, based on the bale plucking tool, the initial data acquisition requests sent by the plurality of first applications to the second application, and modify parameters in the initial data acquisition requests sent by the respective first applications according to a second preset mock rule, so as to obtain the modified initial data acquisition requests. Furthermore, the third application may send each modified initial data acquisition request as a data acquisition request sent by each first application to the second application based on the bale plucking tool, so as to trigger the second application to return a plurality of page display data based on the data acquisition requests sent by the plurality of first applications. When a third application intercepts a plurality of page display data returned by a second application based on data acquisition requests sent by a plurality of first applications based on a packet capturing tool, modifying the intercepted page display data corresponding to each first application based on a first preset mock rule, and storing the modified page display data corresponding to each first application in a message queue of a database, wherein the database comprises a plurality of message queues, and one message queue is used for storing the page display data corresponding to one first application. When the page test of the target first application is started, the modified page display data corresponding to the target first application is sent to the target first application through the target message queue for storing the page display data corresponding to the target first application, so that the page test of the target first application is carried out. Further, the third application may receive test detail data returned after the target first application performs the page test according to the modified page display data corresponding to the target first application, and generate a test report according to the test detail data. By adopting the embodiment of the application, the testing efficiency and the testing comprehensiveness can be improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present disclosure. The data processing device provided by the embodiment of the application comprises:
a page display data intercepting module 41, configured to intercept at least one page display data of a second application, where the at least one page display data is returned by the second application based on a data acquisition request sent by at least one first application;
the page display data processing module 42 is configured to modify, based on a first preset mock rule, page display data corresponding to each intercepted first application, and store the modified page display data corresponding to each first application in a message queue of a database, where the database includes at least one message queue, one message queue is used to store page display data corresponding to one first application, and the first preset mock rule is used to determine a modification manner of the page display data;
the page display data sending module 43 is configured to send the modified page display data corresponding to the target first application through a target message queue used for storing the page display data corresponding to the target first application when the page test of the target first application is started, so as to perform the page test on the target first application.
Please refer to fig. 7, and fig. 7 is another schematic structural diagram of a data processing apparatus according to an embodiment of the present application.
In some possible embodiments, the apparatus further includes a first test initiation module 44, and the first test initiation module 44 includes:
the page test request receiving unit 441 is configured to determine to start a page test of a target first application when receiving a page test request sent by the target first application;
a first target message queue determining unit 442, configured to determine a target message queue from the plurality of message queues according to the page test request, where the target message queue is used to store page display data corresponding to the target first application.
In some possible embodiments, the database further includes a plurality of queue identifiers, and a queue identifier is used for uniquely marking a message queue;
the first target message queue determining unit 442 is specifically configured to:
acquiring a target queue identifier associated with the application identifier from the plurality of queue identifiers according to the application identifier included in the page test request;
and determining the message queue corresponding to the target queue identification as a target message queue from the plurality of message queues.
In some possible embodiments, the apparatus further includes a second test initiation module 45, and the second test initiation module 45 includes:
a data transmission instruction acquisition unit 451, configured to determine to start a page test of the target first application when a data transmission instruction for transmitting page display data to the target first application is acquired based on a user operation interface;
a second target message queue determining unit 452, configured to determine, according to a queue identifier included in the data sending instruction, a target message queue corresponding to the queue identifier from the multiple message queues, where the target message queue is used to store page display data corresponding to the target first application.
In some possible embodiments, the apparatus further comprises:
a data acquisition request intercepting module 46, configured to intercept, based on a packet capturing tool, an initial data acquisition request sent by the first applications to the second application;
a data obtaining request modifying module 47, configured to modify parameters in the initial data obtaining requests sent by the first applications according to a second preset mock rule, so as to obtain modified initial data obtaining requests;
a data obtaining request sending module 48, configured to send, based on the package capture tool, each modified initial data obtaining request to the second application as a data obtaining request sent by each first application, so as to trigger the second application to return multiple page display data based on the data obtaining requests sent by multiple first applications.
In some possible embodiments, the page display data is json format data; the first preset mock rule comprises a modification rule corresponding to each field type in a plurality of field types;
the above-mentioned device still includes:
a data format analysis module 49, configured to perform format analysis on the json-format data corresponding to each intercepted first application, so as to obtain each field type included in the json-format data corresponding to each first application, and a value corresponding to each field type;
the page display data processing module 42 includes a page display data modification unit 421 and a message queue generating unit 422, where the page display data modification unit 421 is specifically configured to:
and acquiring modification rules corresponding to the field types from the first preset mock rules, and modifying values corresponding to the field types included in the json format data corresponding to the first applications according to the modification rules corresponding to the field types.
In some possible embodiments, the apparatus further comprises:
the test result processing module 410 is configured to receive test detail data returned by the target first application after performing a page test according to the modified page display data corresponding to the target first application, and generate a test report according to the test detail data.
In this embodiment of the application, the data processing apparatus may intercept, based on a packet capturing tool, initial data acquisition requests sent by a plurality of first applications to a second application, and modify parameters in the initial data acquisition requests sent by each first application according to a second preset mock rule, so as to obtain each modified initial data acquisition request. And then, based on the packet capturing tool, sending each modified initial data acquisition request to the second application as a data acquisition request sent by each first application so as to trigger the second application to return a plurality of page display data based on the data acquisition requests sent by the plurality of first applications. When a plurality of page display data returned by a second application based on a data acquisition request sent by a plurality of first applications are intercepted based on a packet capturing tool, modifying the intercepted page display data corresponding to each first application based on a first preset mock rule, and storing the modified page display data corresponding to each first application in a message queue of a database, wherein the database comprises a plurality of message queues, and one message queue is used for storing the page display data corresponding to one first application. When the page test of the target first application is started, the modified page display data corresponding to the target first application is sent to the target first application through the target message queue for storing the page display data corresponding to the target first application, so that the page test of the target first application is carried out. Further, test detail data returned after the target first application performs the page test according to the modified page display data corresponding to the target first application can be received, and a test report is generated according to the test detail data. By adopting the embodiment of the application, the testing efficiency and the testing comprehensiveness can be improved.
Please refer to fig. 8, fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 8, the terminal device in this embodiment may include: one or more processors 501, memory 502, and transceiver 503. The processor 501, memory 502, and transceiver 503 are connected by a bus 504. The memory 502 is used to store a computer program comprising program instructions, and the processor 501 and the transceiver 503 are used to execute the program instructions stored in the memory 502 to perform the following operations:
a processor 501, configured to intercept at least one page display data of a second application, where the at least one page display data is returned by the second application based on a data acquisition request sent by at least one first application;
the processor 501 is configured to modify page display data corresponding to each intercepted first application based on a first preset mock rule, and store the modified page display data corresponding to each first application in a message queue of a database, where the database includes at least one message queue, one message queue is used to store page display data corresponding to one first application, and the first preset mock rule is used to determine a modification manner of the page display data;
the transceiver 503 is configured to send the modified page display data corresponding to the target first application through a target message queue for storing the page display data corresponding to the target first application when the page test of the target first application is started, so as to perform the page test on the target first application.
In some possible embodiments, when the transceiver 503 receives a page test request sent by a target first application, it determines to start a page test of the target first application;
the processor 501 is configured to determine a target message queue from the plurality of message queues according to the page test request, where the target message queue is used to store page display data corresponding to the target first application.
In some possible embodiments, the database further includes a plurality of queue identifiers, and a queue identifier is used for uniquely marking a message queue; the processor 501 is configured to:
acquiring a target queue identifier associated with the application identifier from the plurality of queue identifiers according to the application identifier included in the page test request;
and determining the message queue corresponding to the target queue identification as a target message queue from the plurality of message queues.
In some possible embodiments, the processor 501 is configured to:
when a data sending instruction for sending page display data to the target first application is obtained based on a user operation interface, determining to start a page test of the target first application, and determining a target message queue corresponding to the queue identification from the plurality of message queues according to the queue identification included in the data sending instruction, wherein the target message queue is used for storing the page display data corresponding to the target first application.
In some possible embodiments, the processor 501 is configured to intercept, based on a bale plucking tool, an initial data acquisition request sent by the first applications to the second application;
the processor 501 is configured to modify parameters in the initial data acquisition request sent by each first application according to a second preset mock rule, so as to obtain each modified initial data acquisition request;
the transceiver 503 is configured to send each modified initial data acquisition request to the second application as a data acquisition request sent by each first application based on the bale plucking tool, so as to trigger the second application to return a plurality of page display data based on the data acquisition requests sent by the plurality of first applications.
In some possible embodiments, the page display data is json format data; the first preset mock rule comprises a modification rule corresponding to each field type in a plurality of field types; the processor 501 is configured to:
carrying out format analysis on json format data corresponding to each intercepted first application to obtain each field type included in the json format data corresponding to each first application and a value corresponding to each field type;
the processor 501 is further configured to:
and acquiring modification rules corresponding to the field types from the first preset mock rules, and modifying values corresponding to the field types included in the json format data corresponding to the first applications according to the modification rules corresponding to the field types.
In some possible embodiments, the transceiver 503 is further configured to receive test detail data returned by the target first application after performing a page test according to the modified page display data corresponding to the target first application;
the processor 501 is configured to generate a test report according to the test detail data.
It should be understood that in some possible embodiments, the processor 501 may be a Central Processing Unit (CPU), and the processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory 502 may include both read-only memory and random access memory, and provides instructions and data to the processor 501. A portion of the memory 502 may also include non-volatile random access memory. For example, the memory 502 may also store device type information.
In a specific implementation, the terminal device may execute the implementation manners provided in the steps in fig. 2 to fig. 5 through the built-in functional modules, which may specifically refer to the implementation manners provided in the steps, and are not described herein again.
In this embodiment of the application, the terminal device may intercept, based on a packet capturing tool, initial data acquisition requests sent by a plurality of first applications to a second application, and modify parameters in the initial data acquisition requests sent by each first application according to a second preset mock rule, so as to obtain each modified initial data acquisition request. And then, based on the packet capturing tool, sending each modified initial data acquisition request to the second application as a data acquisition request sent by each first application so as to trigger the second application to return a plurality of page display data based on the data acquisition requests sent by the plurality of first applications. When a plurality of page display data returned by a second application based on a data acquisition request sent by a plurality of first applications are intercepted based on a packet capturing tool, modifying the intercepted page display data corresponding to each first application based on a first preset mock rule, and storing the modified page display data corresponding to each first application in a message queue of a database, wherein the database comprises a plurality of message queues, and one message queue is used for storing the page display data corresponding to one first application. When the page test of the target first application is started, the modified page display data corresponding to the target first application is sent to the target first application through the target message queue for storing the page display data corresponding to the target first application, so that the page test of the target first application is carried out. Further, test detail data returned after the target first application performs the page test according to the modified page display data corresponding to the target first application can be received, and a test report is generated according to the test detail data. By adopting the embodiment of the application, the testing efficiency and the testing comprehensiveness can be improved.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a processor, the data processing method provided in each step in fig. 2 to 5 is implemented.
The computer readable storage medium may be the data processing apparatus provided in any of the foregoing embodiments or an internal storage unit of the terminal device, such as a hard disk or a memory of an electronic device. The computer readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) card, a flash card (flash card), and the like, which are provided on the electronic device. Further, the computer readable storage medium may also include both an internal storage unit and an external storage device of the electronic device. The computer-readable storage medium is used for storing the computer program and other programs and data required by the electronic device. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
The terms "first", "second", "third", "fourth", and the like in the claims and in the description and drawings of the present application are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items and includes such combinations. Those of ordinary skill in the art will appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The method and the related apparatus provided by the embodiments of the present application are described with reference to the flowchart and/or the structural diagram of the method provided by the embodiments of the present application, and each flow and/or block of the flowchart and/or the structural diagram of the method, and the combination of the flow and/or block in the flowchart and/or the block diagram can be specifically implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block or blocks of the block diagram. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block or blocks.

Claims (10)

1. A method of data processing, the method comprising:
intercepting at least one page display data of a second application, wherein the at least one page display data is returned by the second application based on a data acquisition request sent by at least one first application;
modifying the intercepted page display data corresponding to each first application based on a first preset mock rule, and storing the modified page display data corresponding to each first application in a message queue of a database, wherein the database comprises at least one message queue, one message queue is used for storing page display data corresponding to one first application, and the first preset mock rule is used for determining a modification mode of the page display data;
when the page test of the target first application is started, the modified page display data corresponding to the target first application is sent to the target first application through a target message queue for storing the page display data corresponding to the target first application, so that the page test of the target first application is carried out.
2. The method of claim 1, further comprising:
when a page test request sent by a target first application is received, determining to start a page test of the target first application, and determining a target message queue from the plurality of message queues according to the page test request, wherein the target message queue is used for storing page display data corresponding to the target first application.
3. The method of claim 2, further comprising a plurality of queue identifications, a queue identification for uniquely marking a message queue;
the determining a target message queue from the plurality of message queues according to the page test request comprises:
acquiring a target queue identifier associated with the application identifier from the plurality of queue identifiers according to the application identifier included in the page test request;
and determining the message queue corresponding to the target queue identification as a target message queue from the plurality of message queues.
4. The method of claim 1, further comprising:
determining to start a page test of the target first application when a data sending instruction for sending page display data to the target first application is obtained based on a user operation interface;
and determining a target message queue corresponding to the queue identification from the plurality of message queues according to the queue identification included in the data sending instruction, wherein the target message queue is used for storing page display data corresponding to the target first application.
5. The method of any of claims 1-4, wherein prior to intercepting at least one page presentation data of a second application, the method further comprises:
intercepting initial data acquisition requests sent by a plurality of first applications to a second application based on a packet capturing tool;
according to a second preset mock rule, modifying parameters in the initial data acquisition requests sent by the first applications to obtain modified initial data acquisition requests;
and sending each modified initial data acquisition request serving as a data acquisition request sent by each first application to the second application based on the package grabbing tool so as to trigger the second application to return a plurality of page display data based on the data acquisition requests sent by the plurality of first applications.
6. The method according to any one of claims 1 to 5, wherein the page presentation data is json format data; the first preset mock rule comprises a modification rule corresponding to each field type in a plurality of field types;
before modifying the page display data corresponding to each intercepted first application based on the first preset mock rule, the method further comprises:
carrying out format analysis on json format data corresponding to the intercepted first applications to obtain field types and values corresponding to the field types, wherein the field types are included in the json format data corresponding to the first applications;
the modifying the page display data corresponding to each intercepted first application based on the first preset mock rule comprises the following steps:
and acquiring modification rules corresponding to the field types from the first preset mock rules, and modifying values corresponding to the field types included in the json format data corresponding to the first applications according to the modification rules corresponding to the field types.
7. The method according to any one of claims 1-6, wherein after sending the modified page view data corresponding to the target first application through a target message queue for storing the page view data corresponding to the target first application, the method further comprises:
and receiving test detail data returned by the target first application after the target first application performs page test according to the modified page display data corresponding to the target first application, and generating a test report according to the test detail data.
8. A data processing apparatus, characterized in that the apparatus comprises:
the page display data intercepting module is used for intercepting at least one page display data of a second application, wherein the at least one page display data is returned by the second application based on a data acquisition request sent by at least one first application;
the page display data processing module is used for modifying the intercepted page display data corresponding to each first application based on a first preset mock rule and storing the modified page display data corresponding to each first application in a message queue of a database, wherein the database comprises at least one message queue, one message queue is used for storing the page display data corresponding to one first application, and the first preset mock rule is used for determining the modification mode of the page display data;
and the page display data sending module is used for sending the modified page display data corresponding to the target first application through a target message queue for storing the page display data corresponding to the target first application when the page test of the target first application is started so as to carry out the page test on the target first application.
9. A terminal device comprising a processor, a memory and a transceiver, said processor, said memory and said transceiver being interconnected;
the memory for storing a computer program comprising program instructions, the processor and the transceiver being configured to invoke the program instructions to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-7.
CN202011638061.2A 2020-12-31 2020-12-31 Data processing method, device, terminal equipment and storage medium Pending CN114691485A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011638061.2A CN114691485A (en) 2020-12-31 2020-12-31 Data processing method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011638061.2A CN114691485A (en) 2020-12-31 2020-12-31 Data processing method, device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114691485A true CN114691485A (en) 2022-07-01

Family

ID=82133676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011638061.2A Pending CN114691485A (en) 2020-12-31 2020-12-31 Data processing method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114691485A (en)

Similar Documents

Publication Publication Date Title
CN107729352B (en) Page resource loading method and terminal equipment
CN111045756B (en) Method, apparatus, computing device and medium for generating interface service
EP3647981A1 (en) Security scanning method and apparatus for mini program, and electronic device
CN112988608B (en) Data testing method and device, computer equipment and storage medium
CN111813701B (en) HTTP-based interface testing method and device, computer equipment and storage medium
CN107276842B (en) Interface test method and device and electronic equipment
US10084637B2 (en) Automatic task tracking
US11726800B2 (en) Remote component loader
US10775751B2 (en) Automatic generation of regular expression based on log line data
CN109656799B (en) Test method and device
CN106878345A (en) A kind of method and device for distorting protection
CN114185808A (en) Automatic testing method and device, electronic equipment and computer readable storage medium
CN112181822A (en) Test method and test method for starting time consumption of application program
CN111552643A (en) Multi-browser webpage access synchronization method and system
CN114691485A (en) Data processing method, device, terminal equipment and storage medium
CN112817816B (en) Embedded point processing method and device, computer equipment and storage medium
CN113852610A (en) Message processing method and device, computer equipment and storage medium
CN111414525B (en) Method, device, computer equipment and storage medium for acquiring data of applet
CN112559278B (en) Method and device for acquiring operation data
CN106156235B (en) Picture downloading method and system based on Android platform
CN112671615A (en) Method, system and storage medium for collecting operation behavior data of front-end user
KR20150069182A (en) Mobile Forensics Integrity Proof and Evidence Management Method using Network Server
CN111831530A (en) Test method and device
CN117332412B (en) Detection method and device for data security system and electronic equipment
CN111371745B (en) Method and apparatus for determining SSRF vulnerability

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