CN113448827A - Test data processing method and device - Google Patents

Test data processing method and device Download PDF

Info

Publication number
CN113448827A
CN113448827A CN202010224125.8A CN202010224125A CN113448827A CN 113448827 A CN113448827 A CN 113448827A CN 202010224125 A CN202010224125 A CN 202010224125A CN 113448827 A CN113448827 A CN 113448827A
Authority
CN
China
Prior art keywords
information
interface
abnormal
output mode
abnormal information
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
CN202010224125.8A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010224125.8A priority Critical patent/CN113448827A/en
Publication of CN113448827A publication Critical patent/CN113448827A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for processing test data, and relates to the technical field of computers. One embodiment of the method comprises: collecting abnormal information generated by development and test, and acquiring configuration information; wherein, the configuration information is provided with at least one type of output mode of abnormal information; determining an output mode of the abnormal information according to the type of the abnormal information and the configuration information; and outputting the abnormal information according to the output mode. According to the embodiment, the abnormal information generated by development and testing is collected, and then the proper output mode is selected according to the configuration information to automatically output the abnormal information, so that the data with abnormal operation can be conveniently and quickly positioned by developers, and the joint debugging and testing efficiency of the interface is improved.

Description

Test data processing method and device
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for processing test data.
Background
An Application program (APP) of a client generally needs to be displayed on the client after being networked to obtain various data from a server. After APP development is completed, interface joint debugging needs to be carried out on the APP with a server end in order to guarantee correctness, completeness and reliability of the APP, and testing personnel need to test after the interface joint debugging is finished.
In the joint debugging stage of the interface, if the interface is abnormal, a client developer obtains error information of the interface by printing a log or debugging a breakpoint, then the entry and error information is sent to a back-end developer, and the back-end developer searches the abnormal reason through the information.
In the test phase, for the case that the program throws the abnormal exit, if the problem can not be reproduced, an iTunes tool is used to check the crash file, or an Xcode tool is used to check the crash content to find the abnormal reason. And when the test is abnormal, the tester needs to feed back to the client developer firstly, and then feeds back to the server developer when the client has no problem.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in the interface joint debugging and testing stage, a client developer, a server developer and a tester are required to be matched with each other, if a certain party cannot be matched with each other in time, the interface joint debugging and testing progress is obstructed, the abnormal positioning speed is reduced, and the development and testing time is wasted.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for processing test data, where the abnormal information generated by development and test is collected, and then an appropriate output mode is selected according to configuration information to automatically output the abnormal information, so that developers can quickly locate data with abnormal operation, and interface joint debugging and test efficiency are improved.
To achieve the above object, according to an aspect of an embodiment of the present invention, a method for processing test data is provided.
The processing method of the test data comprises the following steps: collecting abnormal information generated by development and test, and acquiring configuration information; wherein, the configuration information is provided with at least one type of output mode of abnormal information; determining an output mode of the abnormal information according to the type of the abnormal information and the configuration information; and outputting the abnormal information according to the output mode.
Optionally, the exception information includes any one or more types of information among interface error information, crash information, and log information; for the abnormal information with the type of the interface error information or the crash information, the output mode set in the configuration information comprises any one or more of saving to the local, uploading to a server side and displaying in a pop-up window of a client side; and for the abnormal information with the type of the log information, the output mode set in the configuration information comprises the display through a webpage in a local area network.
Optionally, for the exception information of which the type is the interface error information or the crash information, outputting the exception information according to the output mode includes: if the output mode is to be stored locally, the abnormal information is stored locally; if the output mode is uploading to a server, calling a service interface, and storing the abnormal information to the server; and if the output mode is popup display at the client, popup display is carried out on the abnormal information, and the abnormal information is copied and then sent through a specified transmission mode.
Optionally, collecting exception information generated by development testing for exception information of which the type is the interface error information includes: sending an interface request, and acquiring response information corresponding to the interface request; the interface request comprises interface input parameters and interface output parameters with request identifiers; and after the status code in the response information is determined to be the set identifier, splicing the request identifier, the interface input parameters and the return results corresponding to the interface output parameters in the response information to obtain abnormal information.
Optionally, for the exception information of which the type is the log information, outputting the exception information according to the output mode includes: and sending the abnormal information to a specified IP address in a local area network in real time through a WebSocket interface for displaying.
Optionally, the method further comprises: and constructing a webpage file for displaying the abnormal information, and opening an IP address in a local area network for displaying the webpage file.
Optionally, the method further comprises: and after receiving the environment switching instruction, switching to the corresponding domain name for processing according to the testing environment specified by the environment switching instruction.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a processing apparatus for test data.
The processing device of the test data of the embodiment of the invention comprises: the acquisition module is used for acquiring abnormal information generated by development and test and acquiring configuration information; wherein, the configuration information is provided with at least one type of output mode of abnormal information; the determining module is used for determining an output mode of the abnormal information according to the type of the abnormal information and the configuration information; and the output module is used for outputting the abnormal information according to the output mode.
Optionally, the exception information includes any one or more types of information among interface error information, crash information, and log information; for the abnormal information with the type of the interface error information or the crash information, the output mode set in the configuration information comprises any one or more of saving to the local, uploading to a server side and displaying in a pop-up window of a client side; and for the abnormal information with the type of the log information, the output mode set in the configuration information comprises the display through a webpage in a local area network.
Optionally, for the exception information with the type of the interface error information or the crash information, the output module is further configured to: if the output mode is to be stored locally, the abnormal information is stored locally; if the output mode is uploading to a server, calling a service interface, and storing the abnormal information to the server; and if the output mode is popup display at the client, popup display is carried out on the abnormal information, and the abnormal information is copied and then sent through a specified transmission mode.
Optionally, for the abnormal information of which the type is the interface error information, the acquisition module is further configured to: sending an interface request, and acquiring response information corresponding to the interface request; the interface request comprises interface input parameters and interface output parameters with request identifiers; and after the status code in the response information is determined to be the set identifier, splicing the request identifier, the interface input parameters and the return results corresponding to the interface output parameters in the response information to obtain abnormal information.
Optionally, for the abnormal information of which the type is the log information, the output module is further configured to send the abnormal information to a specified IP address in a local area network in real time through a WebSocket interface for display.
Optionally, the apparatus further comprises: and the building module is used for building a webpage file for displaying the abnormal information and opening an IP address in a local area network for displaying the webpage file.
Optionally, the apparatus further comprises: and the switching module is used for switching to the corresponding domain name for processing according to the testing environment specified by the environment switching instruction after receiving the environment switching instruction.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the processing method of the test data of the embodiment of the invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has a computer program stored thereon, and the program implements a processing method of test data of an embodiment of the present invention when executed by a processor.
One embodiment of the above invention has the following advantages or benefits: by collecting abnormal information generated by development and testing and then selecting a proper output mode according to configuration information, abnormal information is automatically output, developers can conveniently and quickly position data with abnormal operation, and interface joint debugging and testing efficiency are improved; different data output modes are set for different types of abnormal information, so that the characteristics of different types of abnormal information are combined, and the flexibility of setting configuration information is improved; outputting abnormal information according to an output mode set by the configuration information, so that subsequent developers can conveniently perform abnormal positioning; for an interface request sent by a client, interface error information is obtained through splicing a request identifier, interface entry parameters and an output result, so that developers can search logs through the request identifier and quickly locate abnormality; the real-time transmission of the log information is realized through WebSocket, and the log information can be checked in real time in a local area network; after receiving the instruction, the testing environment is automatically switched without manual configuration in the code, so that the flexibility and the simplicity of modification of the testing environment are improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a method of processing test data according to an embodiment of the invention;
FIG. 2 is a system architecture diagram of a method for processing test data according to an embodiment of the present invention;
FIG. 3 is a schematic main flow chart of a method for processing test data according to an embodiment of the present invention;
FIG. 4 is a process diagram of interface error information processing according to an embodiment of the invention;
FIG. 5 is a diagram illustrating a display result of interface error information according to an embodiment of the present invention;
FIG. 6 is a process diagram of crash information processing according to an embodiment of the invention;
FIG. 7 is a diagram illustrating a collection of crash information, in accordance with an embodiment of the present invention;
FIG. 8 is a schematic diagram of the main blocks of a test data processing apparatus according to an embodiment of the present invention;
FIG. 9 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 10 is a schematic diagram of a computer apparatus suitable for use in an electronic device to implement an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Technical terms related to the embodiments of the present invention are explained below.
iTunes: is a free digital media playing application.
Xcode: is an integrated development tool running on the operating system Mac OS X.
WebSocket: is a protocol for full duplex communication over a single TCP connection.
JS: JavaScript, a lightweight, interpreted or just-in-time programming language with function precedence.
HTML: hyper Text Markup Language, hypertext Markup Language, is a Markup Language.
CocoaHTTPServer: is a lightweight, embeddable HTTP server framework for Mac OS X or iOS applications.
Fig. 1 is a schematic diagram of main steps of a test data processing method according to an embodiment of the present invention. As shown in fig. 1, the method for processing test data according to the embodiment of the present invention mainly includes the following steps:
step S101: and acquiring abnormal information generated by development and test to acquire configuration information. Configuration information is preset, wherein the configuration information is provided with at least one type of output mode of abnormal information. The abnormal information is generated in the interface joint debugging and testing stage, and can include three types of information, namely interface error information, crash information and log information.
For the interface error information and the crash information, the output mode can be saving to the local, uploading to the server, displaying in a pop-up window at the client, and the like. For the log information, the output mode may be displayed through a web page in the local area network. And collecting interface error information, crash information and log information generated in the interface joint debugging and testing stage, and reading configuration information.
Step S102: and determining an output mode of the abnormal information according to the type of the abnormal information and the configuration information. For the interface error information and the crash information, the output mode can be determined by checking the three corresponding identifications stored in the configuration information to the local, uploaded to the server side and displayed in a pop-up window of the client side. For the log information, the corresponding identification is displayed in the local area network through a webpage in the checking configuration information, and the output mode can be determined.
Step S103: and outputting the abnormal information according to the output mode. For the interface error information and the crash information, if the output mode is to store the interface error information and the crash information to the local, the interface error information and the crash information are stored to the local; if the output mode is uploading to the server side, the interface error information and the crash information are stored to the server side; and if the output mode is popup display at the client, displaying the interface error information and the crash information through the popup.
And for the log information, if the output mode is displaying in the local area network, the log information is sent to the IP address appointed in the local area network for displaying. The abnormal information of the local or server side can be displayed on the client side interface subsequently, and developers and testers can quickly locate the abnormal reason by checking the abnormal information on the client side interface without matching with other personnel.
Fig. 2 is a system architecture diagram of a method for processing test data according to an embodiment of the present invention. As shown in fig. 2, the method for processing test data according to the embodiment of the present invention includes an acquisition module, a configuration module, and an output module. The acquisition module is used for acquiring abnormal information generated by development and test, wherein the abnormal information comprises any one or combination of more of interface error information, crash information and log information. The output module is used for outputting the abnormal information according to the configuration information configuration item.
The configuration module comprises a configuration page, a user can set each configuration item on the configuration page, the configuration information can be stored in the configuration file of the APP after the configuration is completed, and the configuration file is read after the acquisition module finishes acquiring the abnormal information and is used for selecting the output mode of the abnormal information. For the interface error information and the crash information, the configuration items are set whether to be stored locally or uploaded to the server side or displayed in a popup window of the client side. For the log information, the configuration item is set whether to be displayed in the local area network.
In a preferred embodiment, the configuration page further includes a switch, configured to send an environment switching instruction after monitoring a switching action of the switch, so as to implement switching of the test environment. For example, if the selector switch is clicked to the pre-sending, the domain name in the pre-sending environment is switched to be processed; and clicking the change-over switch to the online environment, and switching to the domain name of the online environment for processing. And then the APP can be compiled and started again, so that abnormal data acquisition of different test environments is realized, and manual configuration modification in codes is not needed.
Fig. 3 is a main flow diagram of a processing method of test data according to an embodiment of the present invention. As shown in fig. 3, the method for processing test data according to the embodiment of the present invention is applied to an iOS terminal, and mainly includes the following steps:
step S301: and acquiring abnormal information generated by joint debugging and testing of the interfaces of the client and the server. The exception information generated during the interface joint debugging and testing stage generally includes three types, namely interface error information, crash information of the application program and log information of the service module. The interface error information is generated due to the fact that the client side sends the interface request to the server side and the interface request is in a problem of access or the server side is in a problem, and comprises a request identification, interface access and interface access corresponding return results.
Crash information, such as APP crash due to array violation, Key (Key) set in dictionary nil, etc. Taking the array out of bounds as an example, assuming that there are 3 pieces of data in the array, if the user accesses the 5 th piece of data, crash information is generated. Such as:
NSArray*arr=@[@"1",@"2",@"3"];
NSString*str=[arr objectAtIndex:5];
the crash information generated is: terminating app die to uncaught exception ' NSRangeException ', reason: ' [ __ NSArrayI object AtIndex: ] index 5beyond bases [ 0.2 ].
The log information includes class name, function name, code line number and specific log content. For example, the collected log information may be as follows: RTDQAppModule _ Exampl- [ DQSignInVie wController SubmitBtnClicked ] line 351 has completed the card punch on the day. The RTDQ AppModule is a class name, the submittBtnClicked is a function name, the line is a code line number, and the specific log content is obtained when the card punching is finished on the same day.
Step S302: the configuration information set in the configuration page is acquired. The configuration page comprises configuration items of various output modes, and a user can generate configuration information by setting the configuration items in the configuration page in a self-defined manner.
For the interface error information, the configuration item is to set whether to save to the local (local database or local file), upload to the server side, or pop up on the client side for display. For the crash information, the configuration item is set to be whether to be saved to the local (a local database or a local file), whether to be uploaded to the server side, and whether to be displayed in a pop-up window at the client side when the APP crashes. For the log information, the configuration item is set whether to be displayed in the local area network.
Step S303: and determining an output mode of the abnormal information according to the type and the configuration information of the abnormal information. And for the interface error information and the crash information, checking the setting of the configuration information, acquiring the configuration item of the positive identification (such as 'yes'), and obtaining the output modes of the interface error information and the crash information. For the log information, the setting of the configuration items in the configuration information is checked, and the configuration items with positive identifications (such as "yes") are also obtained, so that the output mode of the log information is obtained.
For example, in the interface error information, whether the configuration item is stored locally is yes, whether the configuration item is uploaded to the server side is no, whether the configuration item is displayed in a pop-up window of the client side is yes, and the output mode of the interface error information is stored locally and displayed in the pop-up window of the client side.
Step S304: according to the output mode, outputting the abnormal information. For the interface error information and the crash information, if the output mode is to store the interface error information and the crash information in a local database, the interface error information and the crash information are stored in the local database; if the output mode is uploading to the server side, calling a service interface, and storing interface error information and crash information to the server side; and if the output mode is popup display at the client, displaying the interface error information and the crash information through the popup.
And for the log information, if the output mode is display in the local area network, the log information is sent to the specified IP address in the local area network in real time through the WebSocket interface to be displayed, so that a tester can conveniently check the log information in the local area network in real time, and the abnormal reason is quickly positioned.
In a preferred embodiment, in order to view log information in a local area network in real time, a web page file for displaying abnormal information (i.e., log information) needs to be pre-constructed in an APP, and a web service (webserver, which is a local service built based on a costhttp server) is started, and then an IP address for displaying the web page file can be opened by using a browser, so as to view the log information of the web page file.
For example, a xxx.html file with a WebSocket client is constructed by using JS + HTML, and the xxx.html file is set as root document; then starting webserver at APP; and then, opening an IP address (such as http:// yourIP: port) of a computer for displaying xxx. When a Websocket is connected with a local webserver, the log information is intercepted and acquired, and the log information is sent to a client (namely a computer) in a local area network through the Websocket to be displayed. Note that the browser needs to support WebSocket.
Fig. 4 is a schematic diagram of a processing procedure of interface error information according to an embodiment of the present invention. As shown in fig. 4, the processing procedure of the interface error information according to the embodiment of the present invention includes the following steps:
step S401: the client sends an interface request to the server, wherein the interface request comprises an interface Id, interface access parameters with a request identifier and interface exit parameters. In an embodiment, the request Identifier is a Universal Unique Identifier (UUID), which can ensure uniqueness.
Taking an interface request of searching the employee trajectory list as an example, the interface Id may be: the interface parameters of the viewport track _ person _ list can be:
{ "appType": 2"," source ": group service", "loginType": 4"," requestId ": D920A89F-0B2F-4172-82FE-C68561E0EB96", "version": 1.0 "}; the request identifies the UUID, i.e., the requestId.
The interface out-parameter may be:
{code=2;
msg="\U67e5\U8be2\U7528\U6237\U6570\U636e\U6743\U9650\U5f02\U5e38";}
step S402: and the server side processes the interface request and returns response information to the client side. Still taking the search of the staff track list as an example, the server side firstly judges whether the developer logs in, if so, queries the database according to the set conditions, and then performs service judgment according to the query result. For example, whether a certain employee punches a card or not is inquired, and if the employee punches the card, response information such as specific card punching time and card punching place is returned; and if the employee does not punch the card, returning response information that the employee does not punch the card. In an embodiment, the response information returned by the server may be as follows:
Figure BDA0002427080620000101
in the above code, data is specific service data, and ret ═ 200 indicates that the http state is normal.
Step S403: the client determines whether the status code in the response message is a set identifier, and if the status code in the response message is the set identifier, the step S404 is executed; otherwise, no processing is performed. The response information comprises a state code (code), whether the code is 0 or not is judged in the embodiment, if the code is 0, the interface returns correct data, and the page is normally displayed; if code is not 0, a return data error is declared. The set flag here is a non-0 character.
Step S404: and obtaining interface error information according to the splicing request identifier, the interface input parameters and the returned results of the corresponding interface output parameters in the response information. In the embodiment, the interface Id, the UUID, the interface entry parameter and the return result are spliced to obtain the interface error information.
Step S405: and acquiring the configuration information, and determining the output mode of the interface error information according to the configuration information. And checking the setting of the configuration information, acquiring the identifier of the configuration item, and determining the output mode according to the identifier.
Step S406: if the interface error information is stored locally, and the interface error information is read locally by adopting the APP for displaying. After the interface error information is stored locally, the interface error information can be acquired locally through the APP for a developer to check conveniently, and is displayed on a client interface.
Step S407: if the interface error information is uploaded to the server, the service interface is called, and the interface error information is stored in a database of the server.
Step S408: if the client displays the interface error information in a popup mode, the interface error information is displayed through the popup window, and the interface error information is copied and then sent in a designated transmission mode. Fig. 5 is a diagram illustrating a display result of interface error information according to an embodiment of the present invention. As shown in fig. 5, the interface error information obtained by splicing in step S404 is displayed in a pop-up window at the client, where the pop-up window includes a copy button, and the interface error information can be copied by clicking the copy button, so as to be sent to the developer through an instant messaging tool, such as a short message, an email, and the like. Developers can quickly search the log information of the server side according to the UUID in the interface error information, and locate the abnormal reason.
FIG. 6 is a process diagram of crash information processing according to an embodiment of the invention. As shown in fig. 6, the processing procedure of crash information according to the embodiment of the present invention includes the following steps:
step S601: and when the APP breaks down, obtaining the breakdown information. The crash information generally includes the name of the APP, the version number of the APP, the version of the terminal device, the name and reason of the crash information, stack information, a positioning function, and the like. Fig. 7 shows crash information generated for running the fast-forwarding APP.
Step S602: and acquiring configuration information, and determining an output mode of the crash information according to the configuration information. And checking the setting of the configuration information, acquiring the identifier of the configuration item, and determining the output mode according to the identifier.
Step S603: and if the crash information is stored locally, storing the crash information locally, and reading the crash information locally by adopting the APP for displaying. After the crash information is stored locally, in order to facilitate the developer to check, the crash information can be obtained locally through the APP and displayed on a client interface.
Step S604: and if the crash information is uploaded to the server, calling a service interface, and storing the crash information to a database of the server.
Step S605: and if the crash information is displayed in a pop-up window of the client, displaying the crash information through the pop-up window, copying the crash information, and then sending the crash information in a specified transmission mode. And displaying the collapse information in a popup window at the client, and copying the collapse information by clicking a copy button of an interface so as to send the collapse information to a developer through an instant messaging tool. And the developer can locate the abnormal reason according to the received collapse information. After the APP collapses, collapse information can be collected at the first time and fed back to developers, and the abnormal positioning speed is improved.
According to the processing method of the test data, the abnormal information generated by development and test is collected, and then the appropriate output mode is selected according to the configuration information to automatically output the abnormal information, so that developers can conveniently and quickly position the data with abnormal operation, and the joint debugging and testing efficiency of the interface is improved; different data output modes are set for different types of abnormal information, so that the characteristics of different types of abnormal information are combined, and the flexibility of setting configuration information is improved; outputting abnormal information according to an output mode set by the configuration information, so that subsequent developers can conveniently perform abnormal positioning; for an interface request sent by a client, interface error information is obtained through splicing a request identifier, interface entry parameters and an output result, so that developers can search logs through the request identifier and quickly locate abnormality; the real-time transmission of the log information is realized through WebSocket, and the log information can be checked in real time in a local area network; after receiving the instruction, the testing environment is automatically switched without manual configuration in the code, so that the flexibility and the simplicity of modification of the testing environment are improved.
Fig. 8 is a schematic diagram of main blocks of a test data processing apparatus according to an embodiment of the present invention. As shown in fig. 8, a device 800 for processing test data according to an embodiment of the present invention mainly includes:
the acquisition module 801 is configured to acquire abnormal information generated by development and testing, and acquire configuration information. Configuration information is preset, wherein the configuration information is provided with at least one type of output mode of abnormal information. The abnormal information is generated in the interface joint debugging and testing stage, and can include three types of information, namely interface error information, crash information and log information.
For the interface error information and the crash information, the output mode can be saving to the local, uploading to the server, displaying in a pop-up window at the client, and the like. For the log information, the output mode may be displayed through a web page in the local area network. And collecting interface error information, crash information and log information generated in the interface joint debugging and testing stage, and reading configuration information.
A determining module 802, configured to determine an output manner of the abnormal information according to the type of the abnormal information and the configuration information. For the interface error information and the crash information, the output mode can be determined by checking the three corresponding identifications stored in the configuration information to the local, uploaded to the server side and displayed in a pop-up window of the client side. For the log information, the corresponding identification is displayed in the local area network through a webpage in the checking configuration information, and the output mode can be determined.
An output module 803, configured to output the exception information according to the output mode. For the interface error information and the crash information, if the output mode is to store the interface error information and the crash information to the local, the interface error information and the crash information are stored to the local; if the output mode is uploading to the server side, the interface error information and the crash information are stored to the server side; and if the output mode is popup display at the client, displaying the interface error information and the crash information through the popup.
And for the log information, if the output mode is displaying in the local area network, the log information is sent to the IP address appointed in the local area network for displaying. The abnormal information of the local or server side can be displayed on the client side interface subsequently, and developers and testers can quickly locate the abnormal reason by checking the abnormal information on the client side interface without matching with other personnel.
In addition, the apparatus 800 for processing test data according to the embodiment of the present invention may further include: a build module and a switch module (not shown in fig. 8). The building module is used for building a webpage file for displaying the abnormal information and opening an IP address in a local area network for displaying the webpage file. And the switching module is used for switching to a corresponding domain name for processing according to the testing environment specified by the environment switching instruction after receiving the environment switching instruction.
It can be seen from the above description that by collecting the abnormal information generated by the development test and then selecting a proper output mode according to the configuration information, the abnormal information is automatically output, so that the data with abnormal operation can be conveniently and quickly positioned by developers, and the joint debugging and testing efficiency of the interface is improved.
Fig. 9 shows an exemplary system architecture 900 of a test data processing method or a test data processing apparatus to which an embodiment of the present invention can be applied.
As shown in fig. 9, the system architecture 900 may include end devices 901, 902, 903, a network 904, and a server 905. Network 904 is the medium used to provide communication links between terminal devices 901, 902, 903 and server 905. Network 904 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 901, 902, 903 to interact with a server 905 over a network 904 to receive or send messages and the like. The terminal devices 901, 902, 903 may have various communication client applications installed thereon, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 901, 902, 903 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 905 may be a server that provides various services, such as a background management server that an administrator processes using an interface request sent by the terminal apparatus 901, 902, 903. The background management server can query the database for processing and feed back a processing result (such as response information) to the terminal device.
It should be noted that the method for processing test data provided in the embodiments of the present application is generally executed by the terminal devices 901, 902, and 903, and accordingly, the device for processing test data is generally disposed in the terminal devices 901, 902, and 903.
It should be understood that the number of terminal devices, networks, and servers in fig. 9 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The invention also provides an electronic device and a computer readable medium according to the embodiment of the invention.
The electronic device of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the processing method of the test data of the embodiment of the invention.
The computer-readable medium of the present invention has stored thereon a computer program which, when executed by a processor, implements a method of processing test data of an embodiment of the present invention.
Referring now to FIG. 10, shown is a block diagram of a computer system 1000 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 10, the computer system 1000 includes a Central Processing Unit (CPU)1001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the computer system 1000 are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 1008 including a hard disk and the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The driver 1010 is also connected to the I/O interface 1005 as necessary. A removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1010 as necessary, so that a computer program read out therefrom is mounted into the storage section 1008 as necessary.
In particular, the processes described above with respect to the main step diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program containing program code for performing the method illustrated in the main step diagram. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1009 and/or installed from the removable medium 1011. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 1001.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module, a determination module, and an output module. The names of the modules do not limit the modules themselves in some cases, for example, the collection module may also be described as a "module for collecting abnormal information generated by development and test and acquiring configuration information".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: collecting abnormal information generated by development and test, and acquiring configuration information; wherein, the configuration information is provided with at least one type of output mode of abnormal information; determining an output mode of the abnormal information according to the type of the abnormal information and the configuration information; and outputting the abnormal information according to the output mode.
According to the technical scheme of the embodiment of the invention, the abnormal information generated by development and test is collected, and then the proper output mode is selected according to the configuration information to automatically output the abnormal information, so that the data with abnormal operation can be conveniently and quickly positioned by developers, and the joint debugging and testing efficiency of the interface is improved.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for processing test data, comprising:
collecting abnormal information generated by development and test, and acquiring configuration information; wherein, the configuration information is provided with at least one type of output mode of abnormal information;
determining an output mode of the abnormal information according to the type of the abnormal information and the configuration information;
and outputting the abnormal information according to the output mode.
2. The method according to claim 1, wherein the exception information includes any one or more types of information among interface error information, crash information, and log information;
for the abnormal information with the type of the interface error information or the crash information, the output mode set in the configuration information comprises any one or more of saving to the local, uploading to a server side and displaying in a pop-up window of a client side;
and for the abnormal information with the type of the log information, the output mode set in the configuration information comprises the display through a webpage in a local area network.
3. The method according to claim 2, wherein outputting the exception information according to the output mode for the exception information of which the type is the interface error information or the crash information comprises:
if the output mode is to be stored locally, the abnormal information is stored locally;
if the output mode is uploading to a server, calling a service interface, and storing the abnormal information to the server;
and if the output mode is popup display at the client, popup display is carried out on the abnormal information, and the abnormal information is copied and then sent through a specified transmission mode.
4. The method according to claim 2 or 3, wherein collecting exception information generated by development test for the exception information with the type of the interface error information comprises:
sending an interface request, and acquiring response information corresponding to the interface request; the interface request comprises interface input parameters and interface output parameters with request identifiers;
and after the status code in the response information is determined to be the set identifier, splicing the request identifier, the interface input parameters and the return results corresponding to the interface output parameters in the response information to obtain abnormal information.
5. The method according to claim 2, wherein outputting the exception information in the output manner for the exception information of which the type is the log information comprises:
and sending the abnormal information to a specified IP address in a local area network in real time through a WebSocket interface for displaying.
6. The method of claim 5, further comprising:
and constructing a webpage file for displaying the abnormal information, and opening an IP address in a local area network for displaying the webpage file.
7. The method of claim 1, further comprising:
and after receiving the environment switching instruction, switching to the corresponding domain name for processing according to the testing environment specified by the environment switching instruction.
8. An apparatus for processing test data, comprising:
the acquisition module is used for acquiring abnormal information generated by development and test and acquiring configuration information; wherein, the configuration information is provided with at least one type of output mode of abnormal information;
the determining module is used for determining an output mode of the abnormal information according to the type of the abnormal information and the configuration information;
and the output module is used for outputting the abnormal information according to the output mode.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202010224125.8A 2020-03-26 2020-03-26 Test data processing method and device Pending CN113448827A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010224125.8A CN113448827A (en) 2020-03-26 2020-03-26 Test data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010224125.8A CN113448827A (en) 2020-03-26 2020-03-26 Test data processing method and device

Publications (1)

Publication Number Publication Date
CN113448827A true CN113448827A (en) 2021-09-28

Family

ID=77807159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010224125.8A Pending CN113448827A (en) 2020-03-26 2020-03-26 Test data processing method and device

Country Status (1)

Country Link
CN (1) CN113448827A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118210732A (en) * 2024-05-22 2024-06-18 新基信息技术集团股份有限公司 Web application sensitive path identification method and system
CN118210732B (en) * 2024-05-22 2024-08-30 新基信息技术集团股份有限公司 Web application sensitive path identification method and system

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005322024A (en) * 2004-05-10 2005-11-17 Matsushita Electric Ind Co Ltd Abnormality information output device, abnormality detection system and abnormality information output method
JP2006325377A (en) * 2005-05-20 2006-11-30 Mitsubishi Electric Corp Digital relay system
CN102981943A (en) * 2012-10-29 2013-03-20 新浪技术(中国)有限公司 Method and system for monitoring application logs
WO2015027816A1 (en) * 2013-08-26 2015-03-05 Tencent Technology (Shenzhen) Company Limited Devices and methods for acquiring abnormal information
CN106301995A (en) * 2015-06-24 2017-01-04 北京京东尚科信息技术有限公司 The method and apparatus that a kind of automatic detection interface service is abnormal
CN108427631A (en) * 2017-02-14 2018-08-21 北京京东尚科信息技术有限公司 A kind of application test systems, method, electronic equipment and readable storage medium storing program for executing
CN109032828A (en) * 2018-07-20 2018-12-18 网宿科技股份有限公司 Using abnormality eliminating method and terminal
CN109240886A (en) * 2018-09-03 2019-01-18 平安科技(深圳)有限公司 Abnormality eliminating method, device, computer equipment and storage medium
CN109344075A (en) * 2018-10-19 2019-02-15 网宿科技股份有限公司 Configuration method, test method, configuration server and service node device
WO2019071626A1 (en) * 2017-10-09 2019-04-18 华为技术有限公司 Method for processing refreshing display abnormality, and terminal
CN109753419A (en) * 2018-12-29 2019-05-14 苏州思必驰信息科技有限公司 A kind of method and device of the abnormal log information of all applications of non-invasive monitoring Android system
CN109947641A (en) * 2019-02-20 2019-06-28 北京百佑科技有限公司 Automated testing method and device
CN110069401A (en) * 2019-03-18 2019-07-30 平安科技(深圳)有限公司 System testing exception localization method and system based on data modeling
CN110196800A (en) * 2018-02-24 2019-09-03 财付通支付科技有限公司 Distributed transaction test method, apparatus and system
CN110399275A (en) * 2019-07-18 2019-11-01 口碑(上海)信息技术有限公司 Abnormal methods of exhibiting and device
CN110489345A (en) * 2019-08-08 2019-11-22 北京字节跳动网络技术有限公司 A kind of collapse polymerization, device, medium and equipment
CN110895509A (en) * 2019-11-15 2020-03-20 泰康保险集团股份有限公司 Test processing method and device, electronic equipment and storage medium

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005322024A (en) * 2004-05-10 2005-11-17 Matsushita Electric Ind Co Ltd Abnormality information output device, abnormality detection system and abnormality information output method
JP2006325377A (en) * 2005-05-20 2006-11-30 Mitsubishi Electric Corp Digital relay system
CN102981943A (en) * 2012-10-29 2013-03-20 新浪技术(中国)有限公司 Method and system for monitoring application logs
WO2015027816A1 (en) * 2013-08-26 2015-03-05 Tencent Technology (Shenzhen) Company Limited Devices and methods for acquiring abnormal information
CN106301995A (en) * 2015-06-24 2017-01-04 北京京东尚科信息技术有限公司 The method and apparatus that a kind of automatic detection interface service is abnormal
CN108427631A (en) * 2017-02-14 2018-08-21 北京京东尚科信息技术有限公司 A kind of application test systems, method, electronic equipment and readable storage medium storing program for executing
WO2019071626A1 (en) * 2017-10-09 2019-04-18 华为技术有限公司 Method for processing refreshing display abnormality, and terminal
CN110196800A (en) * 2018-02-24 2019-09-03 财付通支付科技有限公司 Distributed transaction test method, apparatus and system
CN109032828A (en) * 2018-07-20 2018-12-18 网宿科技股份有限公司 Using abnormality eliminating method and terminal
CN109240886A (en) * 2018-09-03 2019-01-18 平安科技(深圳)有限公司 Abnormality eliminating method, device, computer equipment and storage medium
CN109344075A (en) * 2018-10-19 2019-02-15 网宿科技股份有限公司 Configuration method, test method, configuration server and service node device
CN109753419A (en) * 2018-12-29 2019-05-14 苏州思必驰信息科技有限公司 A kind of method and device of the abnormal log information of all applications of non-invasive monitoring Android system
CN109947641A (en) * 2019-02-20 2019-06-28 北京百佑科技有限公司 Automated testing method and device
CN110069401A (en) * 2019-03-18 2019-07-30 平安科技(深圳)有限公司 System testing exception localization method and system based on data modeling
CN110399275A (en) * 2019-07-18 2019-11-01 口碑(上海)信息技术有限公司 Abnormal methods of exhibiting and device
CN110489345A (en) * 2019-08-08 2019-11-22 北京字节跳动网络技术有限公司 A kind of collapse polymerization, device, medium and equipment
CN110895509A (en) * 2019-11-15 2020-03-20 泰康保险集团股份有限公司 Test processing method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡杰;严智;: "软件错误注入测试技术研究", 计算机与数字工程, no. 05, 20 May 2015 (2015-05-20) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118210732A (en) * 2024-05-22 2024-06-18 新基信息技术集团股份有限公司 Web application sensitive path identification method and system
CN118210732B (en) * 2024-05-22 2024-08-30 新基信息技术集团股份有限公司 Web application sensitive path identification method and system

Similar Documents

Publication Publication Date Title
US20090063175A1 (en) Methods and systems for providing multiple support options
CN113987074A (en) Distributed service full-link monitoring method and device, electronic equipment and storage medium
US11502899B2 (en) Dynamic product installation based on user feedback
CN110851471A (en) Distributed log data processing method, device and system
CN113760722A (en) Test system and test method
CN110851324A (en) Log-based routing inspection processing method and device, electronic equipment and storage medium
CN113360376A (en) Buried point testing method and device
CN112948726A (en) Method, device and system for processing abnormal information
CN114726914A (en) Cross-service provider information sending method and device and electronic equipment
CN114840379A (en) Log generation method, device, server and storage medium
CN113238944A (en) Test method, device and system
CN110489326B (en) IDS-based HTTPAPI debugging method device, medium and equipment
US11893383B2 (en) Configuration properties management for software
US9542171B2 (en) Managing an application modification process
CN113448827A (en) Test data processing method and device
CN110806967A (en) Unit testing method and device
CN112783903B (en) Method and device for generating update log
CN112070391A (en) Workshop production task management system, method and device
JP2012248228A (en) Load simulation device, simulation device, load simulation method, simulation method and program
CN113918525A (en) Data exchange scheduling method, system, electronic device, medium, and program product
CN111290870B (en) Method and device for detecting abnormality
CN114285774A (en) Flow recording method and device, electronic equipment and storage medium
CN113821430A (en) Multi-service testing method and device
CN112988560A (en) Method and device for testing system robustness
CN111176982A (en) Test interface generation method and device

Legal Events

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