A method and device for processing test data

By collecting and automatically outputting abnormal information in the interface joint coordination and testing stage, the problem of slow abnormal positioning speed caused by the difficulty of developers in coordination is solved, and the efficiency of interface joint coordination and testing is improved.

CN113448827BActive Publication Date: 2025-02-25BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010224125.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-26
Publication Date
2025-02-25
Estimated Expiration
2040-03-26

AI Technical Summary

Technical Problem

During the interface coordination and testing stage, it is difficult for developers to coordinate, resulting in slow positioning of abnormalities and wasting time.

Method used

By collecting exception information generated by development tests, and selecting the appropriate output method based on the configuration information, it is convenient for developers to quickly locate data that runs abnormal.

Benefits of technology

It improves the efficiency of interface coordination and testing, reduces the waste of development and testing time, and simplifies the exception location process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113448827B_ABST
    Figure CN113448827B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for processing test data, and relates to the field of computer technology. A specific implementation of the method includes: collecting abnormal information generated by development testing and obtaining configuration information; wherein the configuration information is provided with at least one type of output mode of abnormal information; determining the 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. This implementation mode collects the abnormal information generated by development testing, and then selects a suitable output mode according to the configuration information to automatically output the abnormal information, so as to facilitate developers to quickly locate data with abnormal operation and improve the efficiency of interface joint debugging and testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for processing test data. Background Art

[0002] The client application (Application, APP) generally needs to connect to the Internet to obtain various data from the server and then display it on the client. After the APP is developed, in order to ensure its correctness, integrity and reliability, it needs to be interfaced with the server. After the interface is debugged, testers need to test it.

[0003] During the interface joint debugging phase, if there is an exception in the interface, the client developer obtains the error information of the interface by printing logs or breakpoint debugging, and then sends the input parameters and error information to the back-end developer, who uses this information to find the cause of the exception.

[0004] During the testing phase, if the program throws an exception and exits, if the problem cannot be reproduced, you need to use the iTunes tool to view the crash file, or use the Xcode tool to view the crash content to find the cause of the exception. In addition, when an exception occurs during testing, the tester needs to first give feedback to the client developer, and then give feedback to the server developer if there is no problem on the client.

[0005] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0006] During the interface debugging and testing phase, client developers, server developers and testers are required to cooperate with each other. If one party fails to cooperate in time, it will hinder the progress of interface debugging and testing, reduce the speed of abnormal location, and waste development and testing time. Summary of the invention

[0007] In view of this, an embodiment of the present invention provides a method and device for processing test data, which collects exception information generated by development testing, and then selects a suitable output method according to configuration information to automatically output the exception information, so as to facilitate developers to quickly locate data with running exceptions and improve interface joint debugging and testing efficiency.

[0008] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for processing test data is provided.

[0009] A test data processing method according to an embodiment of the present invention comprises: collecting exception information generated by development testing and obtaining configuration information; wherein the configuration information is provided with at least one type of output mode of the exception information; determining the output mode of the exception information according to the type of the exception information and the configuration information; and outputting the exception information according to the output mode.

[0010] Optionally, the exception information includes any one or more types of information among interface error information, crash information and log information; for the exception information of the type of the interface error information or the crash information, the output method set in the configuration information includes any one or more of saving to the local, uploading to the server and displaying in a pop-up window on the client; for the exception information of the type of the log information, the output method set in the configuration information includes displaying through a web page in a local area network.

[0011] Optionally, for the exception information of the type of the interface error information or the crash information, the exception information is output according to the output method, including: if the output method is to save locally, the exception information is saved locally; if the output method is to upload to the server, the service interface is called to save the exception information to the server; if the output method is to display the exception information in a pop-up window on the client, the exception information is displayed in a pop-up window, and the exception information is copied and sent via a specified transmission method.

[0012] Optionally, for exception information of the type of the interface error information, the exception information generated by the development test is collected, including: sending an interface request, and obtaining response information corresponding to the interface request; wherein the interface request includes interface input parameters and interface output parameters with a request identifier; after determining that the status code in the response information is a set identifier, splicing the request identifier, the interface input parameters, and the return result corresponding to the interface output parameters in the response information to obtain the exception information.

[0013] Optionally, for the exception information of the log information type, the exception information is output according to the output method, including: sending the exception information to a designated IP address in a local area network in real time through a WebSocket interface for display.

[0014] Optionally, the method further includes: constructing a web page file for displaying the abnormal information, and opening an IP address in a local area network for displaying the web page file.

[0015] Optionally, the method further includes: after receiving the environment switching instruction, switching to a corresponding domain name for processing according to the test environment specified by the environment switching instruction.

[0016] To achieve the above objective, according to another aspect of an embodiment of the present invention, a device for processing test data is provided.

[0017] A test data processing device according to an embodiment of the present invention comprises: a collection module, used to collect exception information generated by development testing and obtain configuration information; wherein the configuration information is provided with at least one type of output mode of the exception information; a determination module, used to determine the output mode of the exception information according to the type of the exception information and the configuration information; and an output module, used to output the exception information according to the output mode.

[0018] Optionally, the exception information includes any one or more types of information among interface error information, crash information and log information; for the exception information of the type of the interface error information or the crash information, the output method set in the configuration information includes any one or more of saving to the local, uploading to the server and displaying in a pop-up window on the client; for the exception information of the type of the log information, the output method set in the configuration information includes displaying through a web page in a local area network.

[0019] Optionally, for the exception information of the type of the interface error information or the crash information, the output module is also used to: if the output method is to save locally, then save the exception information locally; if the output method is to upload to the server, then call the service interface to save the exception information to the server; if the output method is to display the exception information in a pop-up window on the client, then display the exception information in a pop-up window, copy the exception information and send it via a specified transmission method.

[0020] Optionally, for exception information of the type of the interface error information, the acquisition module is also used to: send an interface request and obtain response information corresponding to the interface request; wherein the interface request includes interface input parameters and interface output parameters with a request identifier; after determining that the status code in the response information is a set identifier, splicing the request identifier, the interface input parameters and the return result corresponding to the interface output parameters in the response information to obtain the exception information.

[0021] Optionally, for the abnormal information of the log information type, the output module is further used to send the abnormal information to a designated IP address in the local area network in real time through a WebSocket interface for display.

[0022] Optionally, the device further comprises: a construction module, configured to construct a web page file for displaying the abnormal information, and to open an IP address in a local area network for displaying the web page file.

[0023] Optionally, the device further comprises: a switching module, which is used to switch to a corresponding domain name for processing according to the test environment specified by the environment switching instruction after receiving the environment switching instruction.

[0024] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device is provided.

[0025] An electronic device according to an embodiment of the present invention comprises: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement a test data processing method according to an embodiment of the present invention.

[0026] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer readable medium is provided.

[0027] A computer-readable medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, a test data processing method according to an embodiment of the present invention is implemented.

[0028] An embodiment of the above invention has the following advantages or beneficial effects: by collecting the exception information generated by development and testing, and then selecting a suitable output method according to the configuration information to automatically output the exception information, it is convenient for developers to quickly locate the data of running exceptions and improve the efficiency of interface joint debugging and testing; different data output methods are set for different types of exception information, which not only combines the characteristics of different types of exception information, but also improves the flexibility of configuration information setting; outputs the exception information according to the output method set by the configuration information, which is convenient for subsequent developers to locate the exception; for the interface request sent by the client, the interface error information is obtained by splicing the request identifier, the interface input parameter and the output result, which is convenient for developers to find the log through the request identifier and quickly locate the exception; the real-time transmission of log information is realized through WebSocket, ensuring that the log information can be viewed in real time in the local area network; automatically switch the test environment after receiving the instruction, without manual configuration in the code, improving the flexibility and simplicity of test environment modification.

[0029] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific implementation examples. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0031] Figure 1 is a schematic diagram of main steps of a method for processing test data according to an embodiment of the present invention;

[0032] Figure 2is a schematic diagram of the system architecture of a method for processing test data according to an embodiment of the present invention;

[0033] Figure 3 is a schematic diagram of the main flow of a method for processing test data according to an embodiment of the present invention;

[0034] Figure 4 is a schematic diagram of a process for processing interface error information according to an embodiment of the present invention;

[0035] Figure 5 is a schematic diagram of display results of interface error information according to an embodiment of the present invention;

[0036] Figure 6 is a schematic diagram of a process of processing crash information according to an embodiment of the present invention;

[0037] Figure 7 is a schematic diagram of a collection result of crash information according to an embodiment of the present invention;

[0038] Figure 8 is a schematic diagram of main modules of a test data processing device according to an embodiment of the present invention;

[0039] Fig. 9 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0040] Fig.10 It is a schematic diagram of the structure of a computer device suitable for implementing the electronic device of the embodiment of the present invention. DETAILED DESCRIPTION

[0041] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0042] The technical terms involved in the embodiments of the present invention are explained below.

[0043] iTunes: is a free digital media playback application.

[0044] Xcode: is an integrated development tool that runs on the Mac OS X operating system.

[0045] WebSocket: is a protocol for full-duplex communication over a single TCP connection.

[0046] JS: JavaScript is a lightweight, interpreted or just-in-time compiled programming language with function-first approach.

[0047] HTML: Hyper Text Markup Language, is an identification language.

[0048] CocoaHTTPServer: A lightweight, embeddable HTTP server framework for Mac OS X or iOS applications.

[0049] Figure 1 FIG. 1 is a schematic diagram of the main steps of the method for processing test data according to an embodiment of the present invention. Figure 1 As shown, the test data processing method of the embodiment of the present invention mainly includes the following steps:

[0050] Step S101: Collect the exception information generated by the development test and obtain the configuration information. The configuration information is pre-set, wherein the configuration information is set with at least one type of output mode of the exception information. The exception information is generated during the interface joint debugging and testing phase, and may include three types of information, namely interface error information, crash information, and log information.

[0051] For interface error information and crash information, the output method can be saved locally, uploaded to the server, displayed in a pop-up window on the client, etc. For log information, the output method can be displayed on a web page in the local area network. Collect interface error information, crash information, and log information generated during the interface joint debugging and testing phase, and read configuration information.

[0052] Step S102: Determine the output mode of the abnormal information according to the type of the abnormal information and the configuration information. For interface error information and crash information, check the corresponding identifiers of the three items in the configuration information: save to local, upload to the server, and display in the client pop-up window to determine the output mode. For log information, check the corresponding identifier of the item in the configuration information: display through a web page in the local area network to determine the output mode.

[0053] Step S103: Output the abnormal information according to the output method. For interface error information and crash information, if the output method is to save locally, the interface error information and crash information are saved locally; if the output method is to upload to the server, the interface error information and crash information are saved to the server; if the output method is to display in a pop-up window on the client, the interface error information and crash information are displayed in a pop-up window.

[0054] For log information, if the output mode is to display in the LAN, the log information will be sent to the specified IP address in the LAN for display. Subsequently, the local or server-side exception information can be displayed on the client interface. Developers and testers can quickly locate the cause of the exception by viewing the exception information on the client interface without the need to cooperate with other personnel.

[0055] Figure 2 Schematic diagram of the system architecture of the method for processing test data according to an embodiment of the present invention. Figure 2 As shown, the test data processing method of the embodiment of the present invention is composed of a collection module, a configuration module and an output module. Among them, the collection module is used to collect the abnormal information generated by the development test, and the abnormal information includes any one or a combination of multiple of interface error information, crash information and log information. The output module is used to output the abnormal information according to the configuration information configuration items.

[0056] The configuration module includes a configuration page where users can set various configuration items. After the configuration is completed, the configuration information can be saved in the APP configuration file. After the acquisition module finishes collecting abnormal information, the configuration file is read to select the output method of the abnormal information. For interface error information and crash information, the configuration item is to set whether to save it locally, upload it to the server, or display it in the client pop-up window. For log information, the configuration item is to set whether to display it in the local area network.

[0057] In a preferred embodiment, the configuration page also includes a switch, which is used to send an environment switching instruction to switch the test environment after detecting the switching action of the switch. For example, if the switch is clicked to pre-release, the domain name of the pre-release environment is switched to for processing; if the switch is clicked to online, the domain name of the online environment is switched to for processing. After that, the APP can be recompiled and started to realize abnormal data collection in different test environments without manually modifying the configuration in the code.

[0058] Figure 3 FIG. 1 is a schematic diagram of the main flow of the method for processing test data according to an embodiment of the present invention. Figure 3 As shown, the test data processing method of the embodiment of the present invention is applied to the iOS end and mainly includes the following steps:

[0059] Step S301: Collect the exception information generated by the interface joint debugging and testing between the client and the server. The exception information generated during the interface joint debugging and testing phase usually includes three types, namely interface error information, application crash information, and business module log information. Among them, the interface error information is generated after the client sends an interface request to the server due to a problem with the input parameters of the interface request or a problem on the server, including the return results corresponding to the request identifier, interface input parameters, and interface output parameters.

[0060] Crash information, such as app crash due to array out of bounds, key set in dictionary as nil, etc. Take array out of bounds as an example, assuming there are 3 data in the array, if the user accesses the 5th data, a crash information will be generated. For example:

[0061] NSArray*arr=@[@"1",@"2",@"3"];

[0062] NSString*str=[arr objectAtIndex:5];

[0063] The crash information generated is: Terminating app due to uncaught exception'NSRangeException', reason:'***-[__NSArrayI objectAtIndex:]:index 5beyondbounds[0..2]'.

[0064] The log information includes the class name, function name, number of lines of code, and specific log content. For example, the collected log information can be as follows: RTDQAppModule_Exampl-[DQSignInVie wController submitBtnClicked]line:351 The clock-in has been completed on the same day. Among them, RTDQ AppModule is the class name, submitBtnClicked is the function name, line is the number of lines of code, and "The clock-in has been completed on the same day" is the specific log content.

[0065] Step S302: Acquire configuration information set in the configuration page. The configuration page includes configuration items of various output modes, and the user can generate configuration information by customizing the configuration items in the configuration page.

[0066] For interface error information, the configuration items are to set whether to save it locally (local database or local file), upload it to the server, and display it in a pop-up window on the client. For crash information, the configuration items are to set whether to save it locally (local database or local file), upload it to the server, and display it in a pop-up window on the client when the app crashes. For log information, the configuration items are to set whether to display it in the local area network.

[0067] Step S303: Determine the output mode of the abnormal information according to the type of abnormal information and the configuration information. For interface error information and crash information, check the settings of the configuration information, obtain the configuration items with a positive mark (such as "yes"), and obtain the output mode of the interface error information and crash information. For log information, check the settings of the configuration items in the configuration information, and also obtain the configuration items with a positive mark (such as "yes") to obtain the output mode of the log information.

[0068] For example, in the interface error information, whether the configuration item is saved locally is "Yes", whether it is uploaded to the server is "No", and whether it is displayed in the client pop-up window is "Yes". The output method of the interface error information is to save it locally and display it in the client pop-up window.

[0069] Step S304: Output the abnormal information according to the output mode. For interface error information and crash information, if the output mode is to save to the local database, the interface error information and crash information are saved to the local database; if the output mode is to upload to the server, the service interface is called to save the interface error information and crash information to the server; if the output mode is to display in a pop-up window on the client, the interface error information and crash information are displayed in a pop-up window.

[0070] For log information, if the output method is to display it in the LAN, the log information will be sent to the specified IP address in the LAN in real time through the WebSocket interface for display, which is convenient for testers to view it in real time in the LAN and quickly locate the cause of the abnormality.

[0071] In a preferred embodiment, in order to be able to view log information in real time on the local area network, it is necessary to pre-build a web page file in the APP for displaying exception information (i.e., log information) and start the web service (webserver, a local service built based on CocoaHTTPServer). Only then can the browser be used to open the IP address used to display the web page file, and then view the log information of the web page file.

[0072] For example, use JS+HTML to build a xxx.html file with a WebSocket client, and set the xxx.html file as the root document; then start the webserver in the APP; then use the browser on the client or server to open the IP address of the computer in the LAN used to display the xxx.html file (such as http: / / yourIP:port). When there is a WebSocket connection to the local webserver, intercept and obtain the log information, and send it to the client (i.e. computer) in the LAN through WebSocket for display. It should be noted that the browser needs to support WebSocket.

[0073] Figure 4 FIG. 1 is a schematic diagram of a process for processing interface error information according to an embodiment of the present invention. Figure 4 As shown, the process of processing interface error information in the embodiment of the present invention includes the following steps:

[0074] Step S401: The client sends an interface request to the server, wherein the interface request includes an interface ID, an interface input parameter and an interface output parameter with a request identifier. In the embodiment, the request identifier is a Universally Unique Identifier (UUID), which can ensure uniqueness.

[0075] Taking the interface request of searching employee track list as an example, the interface ID can be: viewpun chtrack_person_list, and the interface input parameters can be:

[0076] {"appType":"2","source":"groundService","loginType":"4","requestId":"D920A89F-0B2F-4172-82FE-C68561E0EB96","version":"1.0"}; request identifier UUID is requestId.

[0077] The interface output parameters can be:

[0078] {code=2;

[0079] msg="\U67e5\U8be2\U7528\U6237\U6570\U636e\U6743\U9650\U5f02\U5e38";}

[0080] Step S402: The server processes the interface request and returns a response message to the client. Still taking the search of the employee track list as an example, the server first determines whether the developer is logged in. If logged in, the database is queried according to the set conditions, and then the business judgment is made based on the query results. For example, to check whether an employee has punched in. If so, the specific punching time, punching location and other response information are returned; if not, the response information indicating that the employee has not punched in is returned. In the embodiment, the response information returned by the server can be as follows:

[0081]

[0082] In the above code, data is specific business data, and ret=200 indicates that the http status is normal.

[0083] Step S403: The client determines whether the status code in the response information is a setting identifier. If it is a setting identifier, step S404 is executed; otherwise, no processing is performed. The response information includes a status code (code). In the embodiment, it is determined whether the code is 0. If the code is 0, it means that the interface returns the data correctly and the page is displayed normally; if the code is not 0, it means that the returned data is wrong. The setting identifier here is a non-zero character.

[0084] Step S404: concatenate the request identifier, the interface input parameter, and the return result of the corresponding interface output parameter in the response information to obtain interface error information. In the embodiment, the interface Id, UUID, interface input parameter, and return result are concatenated to obtain the interface error information.

[0085] Step S405: Acquire configuration information, and determine the output mode of the interface error information according to the configuration information. Check the settings of the configuration information, acquire the identifier of the configuration item, and determine the output mode according to the identifier.

[0086] Step S406: If it is saved locally, the interface error information is saved locally, and the APP is used to read the interface error information from the local for display. After the interface error information is saved locally, the APP can be used to obtain the interface error information from the local for the convenience of developers to view it and display it on the client interface.

[0087] Step S407: If it is uploaded to the server, the service interface is called and the interface error information is saved to the database of the server.

[0088] Step S408: If the pop-up window is displayed on the client, the interface error information is displayed through the pop-up window, and the interface error information is copied and sent through the specified transmission method. Figure 5 FIG. 1 is a schematic diagram showing the display result of interface error information according to an embodiment of the present invention. Figure 5As shown, the interface error information obtained by splicing in step S404 is displayed in a pop-up window on the client, and the pop-up window includes a copy button. By clicking the copy button, the interface error information can be copied and sent to the developer through an instant messaging tool, such as SMS, email, etc. The developer can quickly find the log information on the server side according to the UUID in the interface error information and locate the cause of the exception.

[0089] Figure 6 FIG. 1 is a schematic diagram of a process for processing crash information according to an embodiment of the present invention. Figure 6 As shown, the crash information processing process of the embodiment of the present invention includes the following steps:

[0090] Step S601: When an APP crashes, the crash information is obtained. 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, the stack information, the positioning function, etc. Figure 7 The following is the crash information generated by running the Kuaiqin APP.

[0091] Step S602: Acquire configuration information, and determine the output mode of the crash information according to the configuration information. Check the settings of the configuration information, acquire the identifier of the configuration item, and determine the output mode according to the identifier.

[0092] Step S603: If it is saved locally, the crash information is saved locally, and the APP is used to read the crash information from the local computer for display. After the crash information is saved locally, the APP can be used to obtain the crash information from the local computer for the convenience of developers to view it, and then displayed on the client interface.

[0093] Step S604: If it is uploaded to the server, the service interface is called to save the crash information to the database of the server.

[0094] Step S605: If it is displayed in a pop-up window on the client, the crash information is displayed through a pop-up window, and the crash information is copied and sent through a specified transmission method. The crash information is displayed in a pop-up window on the client, and the crash information can be copied by clicking the copy button on the interface to send it to the developer through an instant messaging tool. The developer can locate the cause of the exception based on the received crash information. This embodiment can collect crash information and feedback to the developer as soon as possible after the APP crashes, thereby improving the speed of locating the exception.

[0095] It can be seen from the test data processing method of the embodiment of the present invention that by collecting the exception information generated by the development test, and then selecting a suitable output method according to the configuration information to automatically output the exception information, it is convenient for developers to quickly locate the data of the running exception and improve the efficiency of interface joint debugging and testing; different data output methods are set for different types of exception information, which not only combines the characteristics of different types of exception information, but also improves the flexibility of configuration information setting; outputting the exception information according to the output method set by the configuration information is convenient for subsequent developers to locate the exception; for the interface request sent by the client, the interface error information is obtained by splicing the request identifier, the interface input parameter and the output result, which is convenient for developers to find the log through the request identifier and quickly locate the exception; the real-time transmission of log information is realized through WebSocket, ensuring that the log information can be viewed in real time in the local area network; automatically switching the test environment after receiving the instruction, without manual configuration in the code, improving the flexibility and simplicity of test environment modification.

[0096] Figure 8 FIG. 1 is a schematic diagram of the main modules of the test data processing device according to an embodiment of the present invention. Figure 8 As shown, the test data processing device 800 of the embodiment of the present invention mainly includes:

[0097] The collection module 801 is used to collect the abnormal information generated by the development test and obtain the configuration information. The 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 during the interface joint debugging and testing phase, and may include three types of information, namely interface error information, crash information, and log information.

[0098] For interface error information and crash information, the output method can be saved locally, uploaded to the server, displayed in a pop-up window on the client, etc. For log information, the output method can be displayed on a web page in the local area network. Collect interface error information, crash information, and log information generated during the interface joint debugging and testing phase, and read configuration information.

[0099] Determination module 802 is used to determine the output mode of the abnormal information according to the type of the abnormal information and the configuration information. For interface error information and crash information, the output mode can be determined by checking the corresponding identifiers of the three items in the configuration information: saving to local, uploading to the server, and displaying in the client pop-up window. For log information, the output mode can be determined by checking the corresponding identifier of the item displayed through a web page in the local area network in the configuration information.

[0100] The output module 803 is used to output the abnormal information according to the output method. For interface error information and crash information, if the output method is to save to the local computer, the interface error information and crash information are saved to the local computer; if the output method is to upload to the server, the interface error information and crash information are saved to the server; if the output method is to display in a pop-up window on the client, the interface error information and crash information are displayed in a pop-up window.

[0101] For log information, if the output mode is to display in the LAN, the log information will be sent to the specified IP address in the LAN for display. Subsequently, the local or server-side exception information can be displayed on the client interface. Developers and testers can quickly locate the cause of the exception by viewing the exception information on the client interface without the need to cooperate with other personnel.

[0102] In addition, the test data processing device 800 of the embodiment of the present invention may also include: a construction module and a switching module ( Figure 8 The construction module is used to construct a web page file for displaying the abnormal information and open an IP address in the local area network for displaying the web page file. The switching module, upon receiving the environment switching instruction, switches to the corresponding domain name for processing according to the test environment specified by the environment switching instruction.

[0103] From the above description, it can be seen that by collecting the exception information generated by development and testing, and then selecting the appropriate output method according to the configuration information to automatically output the exception information, it is convenient for developers to quickly locate the data of running exceptions and improve the efficiency of interface joint debugging and testing.

[0104] Fig. 9 An exemplary system architecture 900 is shown to which the test data processing method or test data processing apparatus according to the embodiment of the present invention can be applied.

[0105] like Fig. 9 As shown, system architecture 900 may include terminal devices 901, 902, 903, network 904 and server 905. Network 904 is used to provide a medium for 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 optical fiber cables, etc.

[0106] Users can use terminal devices 901, 902, 903 to interact with server 905 through network 904 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 901, 902, 903, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0107] The terminal devices 901 , 902 , and 903 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0108] Server 905 may be a server providing various services, such as a background management server that an administrator processes interface requests sent by terminal devices 901, 902, and 903. The background management server may query a database for processing and feed back processing results (such as response information) to the terminal device.

[0109] It should be noted that the test data processing method provided in the embodiment of the present application is generally executed by the terminal devices 901 , 902 , and 903 , and accordingly, the test data processing device is generally arranged in the terminal devices 901 , 902 , and 903 .

[0110] It should be understood that Fig. 9 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0111] According to an embodiment of the present invention, the present invention also provides an electronic device and a computer-readable medium.

[0112] The electronic device of the present invention comprises: one or more processors; a storage device 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 implement a test data processing method of an embodiment of the present invention.

[0113] The computer-readable medium of the present invention stores a computer program, and when the program is executed by a processor, a method for processing test data according to an embodiment of the present invention is implemented.

[0114] Reference below Fig.10 , which shows a schematic diagram of the structure of a computer system 1000 suitable for implementing an electronic device of an embodiment of the present invention. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0115] like Fig.10As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which 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 part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the computer system 1000 are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0116] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.

[0117] In particular, according to the embodiments disclosed in the present invention, the process described in the main step diagram above can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the main step diagram. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, the above-mentioned functions defined in the system of the present invention are executed.

[0118] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0119] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0120] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes an acquisition module, a determination module, and an output module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the acquisition module may also be described as a "module for collecting abnormal information generated by development and testing and obtaining configuration information."

[0121] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: collecting abnormal information generated by development and testing, and obtaining configuration information; wherein the configuration information is provided with at least one type of output mode of abnormal information; determining the 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.

[0122] According to the technical solution of the embodiment of the present invention, by collecting the exception information generated by development and testing, and then selecting a suitable output method according to the configuration information to automatically output the exception information, it is convenient for developers to quickly locate data with running exceptions and improve the efficiency of interface joint debugging and testing.

[0123] The above product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.

[0124] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for processing test data, characterized in that: include: Collecting abnormal information generated by development and testing, and obtaining configuration information; wherein the configuration information is provided with at least one type of output mode of abnormal information; Determine the output mode of the abnormal information according to the type of the abnormal information and the configuration information; wherein the abnormal information includes any one or more types of information among interface error information, crash information and log information; for the abnormal information of the type of the interface error information or the crash information, the output mode set in the configuration information includes any one or more of saving to a local, uploading to a server and displaying in a pop-up window on a client; for the abnormal information of the type of the log information, the output mode set in the configuration information includes displaying through a web page in a local area network; The abnormal information is output according to the output method.

2. The method according to claim 1, characterized in that For the exception information of the type of the interface error information or the crash information, outputting the exception information according to the output mode includes: If the output mode is to save locally, then the abnormal information is saved locally; If the output mode is uploading to the server, calling the service interface to save the abnormal information to the server; If the output method is to display the exception information in a pop-up window on the client, the pop-up window will display the exception information, and the exception information will be copied and sent through the specified transmission method.

3. The method according to claim 1 or 2, characterized in that: For the exception information of the interface error information type, the exception information generated by the development test is collected, including: Send an interface request and obtain response information corresponding to the interface request; wherein the interface request includes interface input parameters and interface output parameters with a request identifier; After determining that the status code in the response information is a set identifier, the request identifier, the interface input parameter, and the return result corresponding to the interface output parameter in the response information are spliced ​​to obtain exception information.

4. The method according to claim 1, characterized in that: For the abnormal information of the type of the log information, outputting the abnormal information according to the output mode includes: Through the WebSocket interface, the abnormal information is sent in real time to the specified IP address in the local area network for display.

5. The method according to claim 4, characterized in that The method further comprises: A web page file for displaying the abnormal information is constructed, and an IP address for displaying the web page file in the local area network is opened.

6. The method according to claim 1, characterized in that The method further comprises: When the environment switching instruction is received, the test environment specified by the environment switching instruction is switched to the corresponding domain name for processing.

7. A test data processing device, characterized in that: include: A collection module, used to collect abnormal information generated by development and testing, and obtain configuration information; wherein the configuration information is provided with at least one type of output mode of abnormal information; A determination module, configured to determine an output mode of the abnormal information according to the type of the abnormal information and the configuration information; wherein the abnormal information includes any one or more types of information among interface error information, crash information and log information; for abnormal information of the type of the interface error information or the crash information, the output mode set in the configuration information includes any one or more of saving to a local computer, uploading to a server and displaying in a pop-up window on a client; for abnormal information of the type of the log information, the output mode set in the configuration information includes displaying via a web page in a local area network; An output module is used to output the abnormal information according to the output mode.

8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method and system for monitoring application logs

    CN102981943A

  • Method for processing refreshing display abnormality, and terminal

    WO2019071626A1