CN112988588B - Client software debugging method and device, storage medium and electronic equipment - Google Patents

Client software debugging method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112988588B
CN112988588B CN202110326381.2A CN202110326381A CN112988588B CN 112988588 B CN112988588 B CN 112988588B CN 202110326381 A CN202110326381 A CN 202110326381A CN 112988588 B CN112988588 B CN 112988588B
Authority
CN
China
Prior art keywords
data
functional module
debugged
debugging
stage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110326381.2A
Other languages
Chinese (zh)
Other versions
CN112988588A (en
Inventor
杨爽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Boguan Information Technology Co Ltd
Original Assignee
Guangzhou Boguan 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 Guangzhou Boguan Information Technology Co Ltd filed Critical Guangzhou Boguan Information Technology Co Ltd
Priority to CN202110326381.2A priority Critical patent/CN112988588B/en
Publication of CN112988588A publication Critical patent/CN112988588A/en
Application granted granted Critical
Publication of CN112988588B publication Critical patent/CN112988588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime

Abstract

The disclosure provides a client software debugging method, a device, a storage medium and electronic equipment; relates to the technical field of computers. The method comprises the following steps: adding a starting item of a functional module to be debugged in client software into an initial code; simulating test data sent by a server to a client in the current debugging stage according to the starting parameters of the functional module to be debugged to obtain simulation data; invoking a starting item of the functional module to be debugged in the initial code, and sending the simulation data to the functional module to be debugged for first-stage debugging; and responding to a stage switching instruction, updating the simulation data in the initial code, and performing second-stage debugging on the functional module to be debugged by utilizing the updated simulation data. According to the method and the device, any functional module of the client software can be debugged, debugging data are issued through the simulation server, and the development efficiency of the client software is improved.

Description

Client software debugging method and device, storage medium and electronic equipment
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a client software debugging method, a client software debugging device, a computer readable storage medium and an electronic device.
Background
In the software development process, the developed software needs to be tested and debugged. Software debugging is a task that begins after a successful test is performed, and the task of debugging is to further diagnose and correct potential errors in the program.
Existing software debugging systems are numerous, but often take a significant amount of time to debug code to resolve errors present in the program. For example, for live software containing multiple business modules, it is more time consuming to run code during debugging. And when the client and the server conduct joint debugging on the service functions, if development progress at the two ends is inconsistent, the debugging process of the client is also affected.
Therefore, how to reduce the workload of software in the development process and improve the development efficiency of the software is a technical problem to be solved.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure aims to provide a client software debugging method, a client software debugging device, a computer readable storage medium and electronic equipment, so as to solve the problem of low development efficiency of client software in the prior art.
According to a first aspect of the present disclosure, there is provided a client software debugging method, including:
adding a starting item of a functional module to be debugged in client software into an initial code, wherein the initial code is used for debugging each functional module in the client software;
simulating test data sent by a server to a client in the current debugging stage according to the starting parameters of the functional module to be debugged to obtain simulation data;
invoking a starting item of the functional module to be debugged in the initial code, and sending the simulation data to the functional module to be debugged for first-stage debugging;
and responding to a stage switching instruction, updating the simulation data in the initial code, and performing second-stage debugging on the functional module to be debugged by utilizing the updated simulation data.
In an exemplary embodiment of the present disclosure, the adding, to the initial code, a start item of a functional module to be debugged in the client software includes:
introducing a starting interface of the initial code and calling an infrastructure of the initial code;
and adding the starting item of the functional module to be debugged in the client software into a starting management module of the infrastructure through the starting interface.
In an exemplary embodiment of the present disclosure, the simulating test data sent by a server to a client in a current debugging stage according to a start parameter of the functional module to be debugged, to obtain simulated data includes:
acquiring test data sent to a client by the server by using a webpage crawler script;
and simulating the test data according to the data protocol of the functional module to be debugged to obtain simulation data of the current debugging stage in the functional module to be debugged.
In an exemplary embodiment of the disclosure, the simulating the test data according to the data protocol of the functional module to be debugged includes:
and assigning the test data in the data function of the initial code according to the data format in the data protocol.
In an exemplary embodiment of the present disclosure, the calling the start item of the functional module to be debugged in the initial code, sending the simulation data to the functional module to be debugged for performing a first stage debugging includes:
obtaining simulation data corresponding to the data protocol identifier of the functional module to be debugged;
and calling a starting item of the functional module to be debugged in the initial code, and sending the simulation data to the functional module to be debugged so as to perform first-stage debugging on the functional module to be debugged.
In an exemplary embodiment of the present disclosure, the updating the analog data in the initial code in response to the phase switch instruction includes:
and responding to the stage switching instruction, and updating the simulation data of the first stage in the functional module to be debugged into the simulation data of the second stage by utilizing a random data updating function.
In an exemplary embodiment of the present disclosure, the method further comprises:
and debugging different functional modules by adjusting the functional module identifiers and the corresponding data protocols.
According to a second aspect of the present disclosure, there is provided a client software debugging apparatus, comprising:
the system comprises a starting item adding unit, a starting item debugging unit and a starting item debugging unit, wherein the starting item adding unit is used for adding a starting item of a functional module to be debugged in client software into an initial code, and the initial code is used for debugging each functional module in the client software;
the test data simulation unit is used for simulating test data sent to the client by the server in the current debugging stage according to the starting parameters of the functional module to be debugged to obtain simulation data;
the simulation data sending unit is used for calling a starting item of the functional module to be debugged in the initial code and sending the simulation data to the functional module to be debugged for first-stage debugging;
And the simulation data updating unit is used for responding to the phase switching instruction, updating the simulation data in the initial code and performing second-phase debugging on the functional module to be debugged by utilizing the updated simulation data.
According to a third aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the above.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of any of the above via execution of the executable instructions.
Exemplary embodiments of the present disclosure may have some or all of the following advantages:
in the client software debugging method provided by the example embodiment of the present disclosure, a start item of a functional module to be debugged in client software is added to an initial code; simulating test data sent by a server to a client in the current debugging stage according to the starting parameters of the functional module to be debugged to obtain simulation data; invoking a starting item of the functional module to be debugged in the initial code, and sending the simulation data to the functional module to be debugged for first-stage debugging; and responding to a stage switching instruction, updating the simulation data in the initial code, and performing second-stage debugging on the functional module to be debugged by utilizing the updated simulation data. In the debugging process of the client software, on one hand, only the functional module to be debugged needs to be started, so that the response time required by starting the program can be effectively reduced; on the other hand, the development progress of the server is not relied on, and the data is issued to the client by simulating the server, so that the time for waiting for the server to issue the data can be reduced, and the software development efficiency is improved; on the other hand, the simulation of the whole development process can be realized by simulating the data of different stages sent by the server to the client, so that the software development efficiency is further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
FIG. 1 illustrates a schematic diagram of an exemplary system architecture to which a client software debugging method and apparatus of embodiments of the present disclosure may be applied;
FIG. 2 illustrates a schematic diagram of a computer system suitable for use in implementing embodiments of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a client software debugging method according to one embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow diagram of a single start-up function module according to one embodiment of the disclosure;
FIG. 5 schematically illustrates a schematic diagram of a single start-up function module according to one embodiment of the disclosure;
FIG. 6 schematically illustrates a flow chart of simulation data in accordance with one embodiment of the present disclosure;
fig. 7A-7C schematically illustrate schematic diagrams of stages of switching functional modules according to one embodiment of the present disclosure;
fig. 8 schematically illustrates a block diagram of a client software debugging apparatus according to one embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. One skilled in the relevant art will recognize, however, that the aspects of the disclosure may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
FIG. 1 illustrates a schematic diagram of a system architecture of an exemplary application environment in which a client software debugging method and apparatus of embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of the terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others. The terminal devices 101, 102, 103 may be various electronic devices with display screens including, but not limited to, desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server 105 may be a server cluster formed by a plurality of servers.
The client software debugging method provided by the embodiment of the present disclosure is generally executed by the server 105, and accordingly, the client software debugging device is generally disposed in the server 105. However, it will be readily understood by those skilled in the art that the client software debugging method provided in the embodiment of the present disclosure may be executed by the terminal devices 101, 102, 103, and accordingly, the client software debugging apparatus may be provided in the terminal devices 101, 102, 103, which is not particularly limited in the present exemplary embodiment.
Fig. 2 shows a schematic diagram of a computer system suitable for use in implementing embodiments of the present disclosure.
It should be noted that the computer system 200 of the electronic device shown in fig. 2 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present disclosure.
As shown in fig. 2, the computer system 200 includes a Central Processing Unit (CPU) 201, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM 203, various programs and data required for the system operation are also stored. The CPU 201, ROM 202, and RAM 203 are connected to each other through a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input section 206 including a keyboard, a mouse, and the like; an output portion 207 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage section 208 including a hard disk or the like; and a communication section 209 including a network interface card such as a LAN card, a modem, and the like. The communication section 209 performs communication processing via a network such as the internet. The drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 210 as needed, so that a computer program read out therefrom is installed into the storage section 208 as needed.
In particular, according to embodiments of the present disclosure, the processes described below with reference to flowcharts may be implemented as computer software programs. 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 comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 209, and/or installed from the removable medium 211. The computer program, when executed by a Central Processing Unit (CPU) 201, performs the various functions defined in the method and apparatus of the present application.
As another aspect, the present application also provides a computer-readable medium that may be contained in the electronic device described in the above embodiment; or may exist alone without being incorporated into the electronic device. The computer-readable medium carries one or more programs which, when executed by one of the electronic devices, cause the electronic device to implement the methods described in the embodiments below. For example, the electronic device may implement the steps shown in fig. 3, 4, and 6, and so on.
It should be noted that the computer readable medium shown in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this disclosure, 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 disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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 following describes the technical scheme of the embodiments of the present disclosure in detail:
in the development process of the client software, a great deal of time is required to debug the code to solve the errors in the program. Taking live broadcast software as an example, a client of the live broadcast software can comprise a plurality of service modules, and the fragmentation function is complicated. When live software is debugged, a developer needs to run all business modules for a small part of codes of any module, and influence factors and time consumption are increased. In addition, the debugging process of the client software generally needs to access data of a server, a developer of the server and a developer of the client can conduct joint debugging on the whole service function to see a debugging result, and if development progress of the two ends is inconsistent, the debugging process of the client can be influenced.
Aiming at various influencing factors in the software debugging process, a developer can set a breakpoint in the current service module and use a Debug (program Debug) mode of a compiling tool to find out problems in codes. Correspondingly, the server side can also provide a data receiving and transmitting simulation tool to help a developer of the client side to debug and run, and when a corresponding protocol number is input and data conforming to an information format is received, the server can be connected to debug the current service module.
The Debug mode is a common tool for debugging codes, and can help developers to quickly find problems in the codes. However, the problem of joint debugging at two ends cannot be solved, and particularly, the time consumption is high in code engineering with large volume, and the requirement of rapid development cannot be met. In addition, the data transceiver provided by the server has a certain effect on joint debugging at two ends, but different functional protocols are required to be filled for each service module, test data are required to be manually updated each time, and the whole debugging process is complex and difficult to operate. Moreover, for debugging of live software, the data protocol format used by the software business function is different in size, so that a lot of time is not quite reasonable in repeated joint debugging work each time, meanwhile, the debugging work also depends on the operation of the whole set of code engineering, and the development of each independent functional module is excessively long.
Based on one or more of the above problems, the present exemplary embodiment provides a client software debugging method, which may be applied to the server 105, or may be applied to one or more of the terminal devices 101, 102, 103, which is not particularly limited in the present exemplary embodiment. Referring to fig. 3, the client software debugging method may include the following steps S310 to S340:
S310, adding a starting item of a functional module to be debugged in client software into an initial code, wherein the initial code is used for debugging each functional module in the client software;
s320, simulating test data sent by a server side to a client side in the current debugging stage according to the starting parameters of the functional module to be debugged to obtain simulation data;
s330, calling a starting item of the functional module to be debugged in the initial code, and sending the simulation data to the functional module to be debugged for first-stage debugging;
and S340, updating the simulation data in the initial code in response to a phase switching instruction, and performing second-phase debugging on the functional module to be debugged by using the updated simulation data.
In the client software debugging method provided by the example embodiment of the present disclosure, a start item of a functional module to be debugged in client software is added to an initial code; simulating test data sent by a server to a client in the current debugging stage according to the starting parameters of the functional module to be debugged to obtain simulation data; invoking a starting item of the functional module to be debugged in the initial code, and sending the simulation data to the functional module to be debugged for first-stage debugging; and responding to a stage switching instruction, updating the simulation data in the initial code, and performing second-stage debugging on the functional module to be debugged by utilizing the updated simulation data. In the debugging process of the client software, on one hand, only the functional module to be debugged needs to be started, so that the response time required by starting the program can be effectively reduced; on the other hand, the development progress of the server is not relied on, and the data is issued to the client by simulating the server, so that the time for waiting for the server to issue the data can be reduced, and the software development efficiency is improved; on the other hand, the simulation of the whole development process can be realized by simulating the data of different stages sent by the server to the client, so that the software development efficiency is further improved.
Next, the above steps of the present exemplary embodiment will be described in more detail.
In step S310, a start item of a functional module to be debugged in the client software is added to an initial code, where the initial code is used for debugging each functional module in the client software.
The client software refers to software which can connect the user terminal with the server of the software publisher to exchange data, such as live broadcast software, instant messaging software and the like. Software debugging refers to the process of reproducing the problem of software defects, locating and searching the root cause of the problem and finally solving the problem, and in order to find and reject errors in a software program, the execution process of the debugged program can be controlled so as to be convenient for checking and modifying the execution state of the debugged program at any time.
In an example embodiment, the client software may be debugged using a code debugging tool. First, code engineering of a code debugging tool can be built on a Windows platform, a linux platform and the like. If the engineering code of the code debugging tool can be written by using a compiler, the encoder can convert the source code written by a developer into binary instructions recognized by a CPU, and then the executable program can be obtained. After the code engineering of the code debugging tool is built, initial codes for debugging the client software can be obtained, and the initial codes can be used for debugging all functional modules in the client software.
In this example, the individual start-up of each functional module may be implemented according to step S410 and step S420.
Step S410, introducing a starting interface of the initial code, and calling an infrastructure of the initial code.
The infrastructure part of the code engineering can comprise a controller management module, a view module, a data module and the like, wherein the controller management module refers to a manager capable of controlling starting items of various functional modules in the code engineering. In order to realize independent starting of each service function, a starting interface of a program can be created when a code project is built, and a function module to be debugged is started by calling the interface to realize class. Therefore, when the functional module to be debugged is started, a starting interface of engineering code can be introduced, and an infrastructure part of the code engineering is called, so that starting items of the functional module to be debugged in client software can be added to initial codes through the starting interface, namely, the starting items of all the functional modules can be added to the code engineering of the built code debugging tool.
And S420, adding a starting item of the functional module to be debugged in the client software into a starting management module of the infrastructure through the starting interface.
The starting item of the functional module to be debugged refers to a program to be loaded when the functional module runs, the starting item of the functional module to be debugged can be added into the basic framework of code engineering through the starting interface of engineering codes, and specifically, the starting item of the functional module to be debugged can be added into a controller management module (also called as a starting management module) in the basic framework. By controlling the operation of the starting items of each functional module, a certain functional module to be debugged can be independently started, and the data display effect can be quickly obtained when the program of the functional module is started.
Fig. 5 schematically shows a start management module in the whole code project, where the start management module is a manager capable of controlling start items of multiple functional modules in the code project, and the functional modules may include an a functional module, an X functional module, and the like. The A functional module is assumed to be a starting module of a current service function, in a common debugging process, the starting management module needs to be started together with all other functional modules, and in the debugging process of the example, the A functional module can be independently started by utilizing a test branch of the starting management module, so that the running time of code engineering can be saved.
In the example, when the client software is debugged, the whole code engineering is not required to be started, and only the basic framework of the code engineering is required to be called to start the corresponding service module, so that the starting time is greatly shortened. And moreover, any functional module in code engineering is independently debugged, so that the modularized analysis of the problems of the program is facilitated.
In step S320, according to the start-up parameters of the functional module to be debugged, test data sent from the server to the client in the current debugging stage is simulated, so as to obtain simulation data.
The starting parameters of the functional module to be debugged can include a functional module identifier such as a functional name, and also can include a data protocol, wherein the data protocol is a communication protocol set by a server and a client for each functional module, so that a series of conventions made by effective and reliable communication between two communication parties in a data communication network can be ensured, such as the operations of data format, sequence, speed, confirmation or rejection of data transmission, error detection, retransmission control, inquiry and the like can be convented. In the software debugging process, the server may also issue test data to the client to help the client developer to debug and run the corresponding functional module, for example, when a protocol name (or a protocol number) of the corresponding data protocol and data conforming to the received information format are input, the server may be connected to debug the current functional module. In an example embodiment, data of the corresponding field may be issued to the client through a data protocol of the simulation server. First, referring to fig. 6, test data transmitted from a server to a client in a current debugging stage may be simulated according to steps S610 and S620.
S610, acquiring test data sent to a client by the server by using a webpage crawler script;
before simulating test data issued by a server, the test data of the current debugging stage of the functional module to be debugged needs to be obtained. For example, the mining of test data may be implemented by using a web crawler, where the web crawler writes a crawler script to obtain test data, and the basic workflow may include: firstly, some URLs (Uniform Resource Locator, uniform resource locators) can be selected as seed URLs to be put into a queue to be crawled, then a crawler script is written, a website can be accessed in a mode of simulating manual browsing aiming at the seed URLs in the queue to be crawled, data of the crawled webpage HTML (Hyper Text Markup Language ) for debugging a functional module to be debugged are stored and analyzed, and a new link obtained through analysis is used as a next crawled seed URL.
In this example, the scripting tool may quickly and conveniently obtain the data format of the test data sent by the server, and in other examples, may also obtain the test data sent by the server by manually inputting or copying the input mode.
And S620, simulating the test data according to a data protocol of the functional module to be debugged to obtain simulation data of the current debugging stage in the functional module to be debugged.
In an example implementation, a web page crawler script may be added to the code debugging tool, and the format of the data crawled by the script tool is consistent with the data protocol of the current functional module to be debugged, which is agreed by the server, and the crawled data may be saved, for example, the data may be saved locally. And then, according to the crawled data, performing assignment in the data function of the code engineering, and obtaining the simulation data of the current debugging stage in the functional module to be debugged. The assignment sequence also corresponds to the data protocol agreed sequence one by one. In this example, the data function may be set using a web crawler script, and the simulation data module may be built based on the data function.
In step S330, the start item of the functional module to be debugged in the initial code is called, and the simulation data is sent to the functional module to be debugged to perform first-stage debugging.
After the analog data module is established, a corresponding data protocol ID can be set for the analog data module so as to obtain corresponding analog data according to the data protocol ID. After the data simulation is successful, the functional module to be debugged in the code engineering can be introduced, for example, the corresponding simulation data can be transmitted into the data of the code engineering by calling the starting item of the functional module to be debugged, that is, the simulation data can be transmitted into the corresponding functional module to be debugged, so as to debug the functional module to be debugged in the first stage. For example, the "voice public meeting" function module in the voice live broadcast software can comprise a plurality of stages of sea fight, predation fight, and battle-up fight, and the sea fight stage can be used as a first stage, test data of the sea fight stage can be simulated, and the sea fight stage can be adjusted.
In the example, firstly, the development progress of the server is not relied on in the whole debugging process, the data protocol of the server can be completely and independently simulated to send the data of the corresponding field to the client, and the delay problem in data communication can not occur, so that the response time is short; and secondly, all the simulated data contents can be constructed according to the data protocols agreed at the two ends, and the data items are in one-to-one correspondence. The incoming service module is also set according to the package of the code debugging tool, and when deviation exists in the setting, the code debugging tool can improve the accuracy of software debugging by printing out corresponding warning information. Finally, in the debugging process, the data are simulated by the contents of the data items agreed by the data protocols at both ends, namely, the data at the service end simulated by the code debugging tool can be random data, can be modified manually in the code engineering, can not deviate from field information outside the data protocols, can adjust the data stage according to the change of the service demand stage, updates the simulated data contents, and greatly improves the judging reliability in the debugging process.
In step S340, in response to the phase switching instruction, the simulation data in the initial code is updated, and the updated simulation data is utilized to perform a second phase debugging on the functional module to be debugged.
The data of single incoming write death can only be adjusted to a certain stage in the functional modules, and for the functional modules comprising a plurality of stages, the validity of the code debugging tool cannot be fully embodied if the data of incoming write death, so that a stage switching module can be established for updating the analog data of the incoming client so as to more comprehensively simulate the process of the server for issuing the data to the client.
For example, the simulation data of the incoming client may be updated in response to the phase switch instruction. Specifically, in the phase switching module, a control for switching the debugging phase may be set on a debugging interface of a client developer, where the control may be a button, and an operation of the button may be a response function similar to a command issued by monitoring server data. In one embodiment, in response to the phase switching instruction, the random data update function may be used to update the simulation data of the first phase to the simulation data of the second phase in the functional module to be debugged. Illustratively, in the phase switching module, random data within the generation limit may also be updated according to an RDU (Random Data Upadte, random data update) function, and illustratively, for a given function module name and corresponding data protocol, such as an a function module, analog data for each phase in the a function module may be updated. In response to the phase switching instruction, the simulation data stored in the code engineering can be updated through the buttons and the RDU function, for example, the simulation data of the first phase in the A functional module can be updated into the simulation data of the second phase, and the updated simulation data is utilized to debug the A functional module in the second phase. When the RDU function is used for updating the simulation data, the characteristic of the data issued by the server can be rapidly simulated, and further the software debugging efficiency can be improved. In an application scenario where software debugging efficiency is not high or data issued by a server side has a specific limit range, the software debugging can be also completed by manual input or by using other random number generation tools. In addition, in other examples, the analog data of each phase may be written in the response event function of the phase switching module.
Referring to fig. 7, the a function module is a start module of a current service function, such as a "voice meeting" function module of voice live broadcast software. Fig. 7A, fig. 7B, and fig. 7C respectively show different stages of the functional module, for example, fig. 7A may show a sea fight stage in the functional module, and in a display interface of the stage, live coins owned by users participating in sea fight are all 0, and 200-value live gold coins with platform rewards can be obtained initially; FIG. 7B may represent a fight-off phase in the functional module in which two participating users may be spelled up within a specified time to win the opponent's live gold coin; fig. 7C may show that the user has a direct gold coin lower than the gold coin value preset in advance after the end of the fight, and the user is eliminated. As can be seen from the data display effect under the basic framework of the whole code engineering, when the code debugging tool has no phase switching module, the static interface can be displayed only once when the code engineering is debugged and run each time, for example, fig. 7A, fig. 7B and fig. 7C can be respectively displayed. After the phase switching module is added in the code engineering, the next phase can be switched to be displayed by clicking a next button on the code debugging tool, and the data phase of the server can be switched to be completely simulated. It will be appreciated that when the "next" button as shown in fig. 7A is clicked, the sea fight phase may be switched to the fight phase, and when the "next" button as shown in fig. 7B is clicked, the fight phase may be switched to the result presentation phase of the fight.
In this example, the phase switching module may be added to the running flow of the code debugging tool when the code debugging tool presents data results. In the process of debugging the client software, the random data when the server transmits different states to the client can be simulated through the phase switching button, the random data are used for verifying the client performance effect of different data, and the process of transmitting the data by the server is better simulated. The accuracy of the verification information display of the broadcast data issued by the simulation server is in one-to-one correspondence with the data protocols set at the two ends, and the client can be helped to simulate the whole development process without changing service codes, so that the aim of rapidly developing software is fulfilled.
In an example embodiment, different functional modules may be debugged by adjusting the functional module identification and corresponding data protocols. For example, the whole debugging tool can be modularly embedded into a service function to be debugged, corresponding parameters are modified according to function names and protocols defined at two ends, and the operation result of the corresponding part of the client can be intuitively displayed by directly operating the modularized tool. For example, after the debugging of the a function module is completed, the function name and the corresponding data protocol in the code engineering may be adjusted, and the debugging of the X function module may be adjusted. Therefore, the code debugging tool can be adapted to all functional modules in the client, only corresponding starting parameters such as function names and data protocols are required to be adjusted for different functional modules, all data protocols required by debugging service can be covered, and when data are crawled, the situation that only one data protocol is crawled is not needed, but all data stages are considered.
In the client software debugging method provided by the example embodiment of the present disclosure, a start item of a functional module to be debugged in client software is added to an initial code; simulating test data sent by a server to a client in the current debugging stage according to the starting parameters of the functional module to be debugged to obtain simulation data; invoking a starting item of the functional module to be debugged in the initial code, and sending the simulation data to the functional module to be debugged for first-stage debugging; and responding to a stage switching instruction, updating the simulation data in the initial code, and performing second-stage debugging on the functional module to be debugged by utilizing the updated simulation data. In the debugging process of the client software, on one hand, only the functional module to be debugged needs to be started, so that the response time required by starting the program can be effectively reduced; on the other hand, the development progress of the server is not relied on, and the data is issued to the client by simulating the server, so that the time for waiting for the server to issue the data can be reduced, and the software development efficiency is improved; on the other hand, the simulation of the whole development process can be realized by simulating the data of different stages sent by the server to the client, so that the software development efficiency is further improved.
It should be noted that although the steps of the methods in the present disclosure are depicted in the accompanying drawings in a particular order, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
Further, in this example embodiment, a client software debugging apparatus is also provided. The device can be applied to a server or terminal equipment. Referring to fig. 8, the client software debugging apparatus 800 may include a startup item adding unit 810, a test data simulation unit 820, a simulation data transmitting unit 830, and a simulation data updating unit 840, wherein:
a startup adding unit 810, configured to add a startup of a functional module to be debugged in client software to an initial code, where the initial code is used to debug each functional module in the client software;
the test data simulation unit 820 is configured to simulate test data sent by the server to the client in the current debugging stage according to the starting parameters of the functional module to be debugged, so as to obtain simulated data;
The simulation data sending unit 830 is configured to invoke a start item of the functional module to be debugged in the initial code, and send the simulation data to the functional module to be debugged for performing first-stage debugging;
and the simulation data updating unit 840 is configured to update the simulation data in the initial code in response to a phase switching instruction, and perform a second phase debugging on the functional module to be debugged by using the updated simulation data.
In an alternative embodiment, the startup item adding unit 810 includes:
an architecture calling subunit, configured to introduce a starting interface of the initial code and call an infrastructure of the initial code;
and the starting item adding subunit is used for adding the starting item of the functional module to be debugged in the client software into the starting management module of the infrastructure through the starting interface.
In an alternative embodiment, the test data simulation unit 820 includes:
the test data acquisition subunit is used for acquiring test data sent by the server side to the client side by using the webpage crawler script;
and the data simulation subunit is used for simulating the test data according to the data protocol of the functional module to be debugged to obtain the simulation data of the current debugging stage in the functional module to be debugged.
In an alternative embodiment, the data simulation unit is configured to: and the testing data are assigned in the data function of the initial code according to the data format in the data protocol.
In an alternative embodiment, the analog data transmission unit 830 includes:
the analog data acquisition subunit is used for acquiring analog data corresponding to the data protocol identifier of the functional module to be debugged;
and the data transmitting subunit is used for calling the starting item of the functional module to be debugged in the initial code, and transmitting the simulation data to the functional module to be debugged so as to debug the functional module to be debugged in a first stage.
In an alternative embodiment, the analog data update unit 840 is configured to: and the simulation data updating function is used for updating the simulation data of the first stage in the functional module to be debugged into the simulation data of the second stage by utilizing the random data updating function in response to the stage switching instruction.
In an alternative embodiment, the client software debugging apparatus 800 is further configured to: the method is used for debugging different functional modules by adjusting the functional module identifiers and the corresponding data protocols.
The specific details of each module in the above-mentioned client software debugging device are already described in detail in the corresponding client software debugging method, so that they will not be described in detail here.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (6)

1. A method for debugging client software, comprising:
introducing a starting interface of an initial code and calling an infrastructure of the initial code; adding a starting item of a functional module to be debugged in the client software into a starting management module of the basic framework through the starting interface, wherein the initial code is used for debugging each functional module in the client software;
Acquiring test data sent by a server to a client; according to a data format in a data protocol, assigning the test data in a data function of the initial code to obtain simulation data of a current debugging stage in the functional module to be debugged;
invoking a starting item of the functional module to be debugged in the initial code, and sending the simulation data to the functional module to be debugged for first-stage debugging;
and in response to the phase switching instruction, updating the simulation data of the first phase in the functional module to be debugged into the simulation data of the second phase by using a random data updating function, and performing second-phase debugging on the functional module to be debugged by using the updated simulation data.
2. The method for debugging client software according to claim 1, wherein the calling the start-up item of the functional module to be debugged in the initial code, and sending the simulation data to the functional module to be debugged for first-stage debugging, includes:
obtaining simulation data corresponding to the data protocol identifier of the functional module to be debugged;
and calling a starting item of the functional module to be debugged in the initial code, and sending the simulation data to the functional module to be debugged so as to perform first-stage debugging on the functional module to be debugged.
3. The client software debugging method of claim 1, wherein the method further comprises:
and debugging different functional modules by adjusting the functional module identifiers and the corresponding data protocols.
4. A client software debugging apparatus, comprising:
the starting item adding unit is used for introducing a starting interface of the initial code and calling an infrastructure of the initial code; adding a starting item of a functional module to be debugged in the client software into a starting management module of the basic framework through the starting interface, wherein the initial code is used for debugging each functional module in the client software;
the test data simulation unit is used for acquiring test data sent by the server side to the client side; according to a data format in a data protocol, assigning the test data in a data function of the initial code to obtain simulation data of a current debugging stage in the functional module to be debugged;
the simulation data sending unit is used for calling a starting item of the functional module to be debugged in the initial code and sending the simulation data to the functional module to be debugged for first-stage debugging;
And the simulation data updating unit is used for updating the simulation data of the first stage in the functional module to be debugged into the simulation data of the second stage by utilizing a random data updating function in response to the stage switching instruction, and performing second-stage debugging on the functional module to be debugged by utilizing the updated simulation data.
5. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any of claims 1-3.
6. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-3 via execution of the executable instructions.
CN202110326381.2A 2021-03-26 2021-03-26 Client software debugging method and device, storage medium and electronic equipment Active CN112988588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110326381.2A CN112988588B (en) 2021-03-26 2021-03-26 Client software debugging method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110326381.2A CN112988588B (en) 2021-03-26 2021-03-26 Client software debugging method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112988588A CN112988588A (en) 2021-06-18
CN112988588B true CN112988588B (en) 2023-11-28

Family

ID=76333869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110326381.2A Active CN112988588B (en) 2021-03-26 2021-03-26 Client software debugging method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112988588B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114928566A (en) * 2022-05-16 2022-08-19 广州博冠信息科技有限公司 Client function testing method and device, storage medium and electronic equipment
CN115756627A (en) * 2022-09-26 2023-03-07 芯华章科技(北京)有限公司 Method, apparatus and storage medium for starting software according to function

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789002A (en) * 2010-01-22 2010-07-28 浪潮(北京)电子信息产业有限公司 Database compatibility test device and method for server
CN103905258A (en) * 2012-12-24 2014-07-02 百度国际科技(深圳)有限公司 Method and apparatus for testing data uploading function of client
CN108228444A (en) * 2016-12-14 2018-06-29 阿里巴巴集团控股有限公司 A kind of test method and device
CN109257224A (en) * 2018-10-08 2019-01-22 武汉达梦数据库有限公司 A kind of database communication network test simulation method and device
CN110209588A (en) * 2019-06-04 2019-09-06 网易(杭州)网络有限公司 Game services end test method, device, electronic equipment and medium
CN110287070A (en) * 2019-05-21 2019-09-27 平安银行股份有限公司 ESB specialized protocol interface test method, server and computer readable storage medium
CN110430184A (en) * 2019-07-31 2019-11-08 腾讯科技(深圳)有限公司 Digital simulation method, apparatus, computer readable storage medium and computer equipment
CN110806970A (en) * 2019-09-18 2020-02-18 北京你财富计算机科技有限公司 Client test method and device based on simulation server response and electronic equipment
CN111352823A (en) * 2018-12-21 2020-06-30 北京字节跳动网络技术有限公司 Test method, client and storage medium
CN111367803A (en) * 2020-03-03 2020-07-03 北京九州云动科技有限公司 Method and system for improving testing efficiency of client software

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8255548B2 (en) * 2002-06-13 2012-08-28 Salesforce.Com, Inc. Offline web services API to mirror online web services API
US10877825B2 (en) * 2018-10-04 2020-12-29 Oracle International Corporation System for offline object based storage and mocking of rest responses

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789002A (en) * 2010-01-22 2010-07-28 浪潮(北京)电子信息产业有限公司 Database compatibility test device and method for server
CN103905258A (en) * 2012-12-24 2014-07-02 百度国际科技(深圳)有限公司 Method and apparatus for testing data uploading function of client
CN108228444A (en) * 2016-12-14 2018-06-29 阿里巴巴集团控股有限公司 A kind of test method and device
CN109257224A (en) * 2018-10-08 2019-01-22 武汉达梦数据库有限公司 A kind of database communication network test simulation method and device
CN111352823A (en) * 2018-12-21 2020-06-30 北京字节跳动网络技术有限公司 Test method, client and storage medium
CN110287070A (en) * 2019-05-21 2019-09-27 平安银行股份有限公司 ESB specialized protocol interface test method, server and computer readable storage medium
CN110209588A (en) * 2019-06-04 2019-09-06 网易(杭州)网络有限公司 Game services end test method, device, electronic equipment and medium
CN110430184A (en) * 2019-07-31 2019-11-08 腾讯科技(深圳)有限公司 Digital simulation method, apparatus, computer readable storage medium and computer equipment
CN110806970A (en) * 2019-09-18 2020-02-18 北京你财富计算机科技有限公司 Client test method and device based on simulation server response and electronic equipment
CN111367803A (en) * 2020-03-03 2020-07-03 北京九州云动科技有限公司 Method and system for improving testing efficiency of client software

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A PnP Scheduling Algorithm and Cache Replacement Algorithm Simulation Platform for Web Server Cluster;Z. Xiong 等;《2012 Fourth International Conference on Computational and Information Sciences》;888-891 *
基于客户端/服务器模式的远程测控系统;何昕 等;《测控技术》;第27卷(第04期);60-61,63 *

Also Published As

Publication number Publication date
CN112988588A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
US11550599B2 (en) Method and apparatus for running applet
CN105872083A (en) Method and system supporting server access by different types of clients as well as server
US20080209405A1 (en) Distributed debugging for a visual programming language
CA2698066A1 (en) System and method for remotely compiling multi-platform native applications for mobile devices
CN112988588B (en) Client software debugging method and device, storage medium and electronic equipment
CN108958992A (en) test method and device
CN110716853A (en) Test script recording method, application program testing method and related device
CN111026439B (en) Application program compatibility method, device, equipment and computer storage medium
CN111309343A (en) Development deployment method and device
CN110059011A (en) Interface test method, device, medium and electronic equipment
CN112463256A (en) Method, system, electronic device and storage medium for determining configuration file
CN111176629A (en) Application development method and device
CN112015654A (en) Method and apparatus for testing
CN112631590A (en) Component library generation method and device, electronic equipment and computer readable medium
CN113468067B (en) Application program debugging method and device, electronic equipment and computer readable medium
CN114217789A (en) Function component expansion method, device, equipment, storage medium and program product
CN112988578A (en) Automatic testing method and device
CN113760736A (en) Test method, device and system
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN111857658A (en) Method, device, medium and electronic equipment for rendering dynamic component
CN111061522A (en) Method, device, equipment and storage medium for generating front-end card assembly based on back end
CN107247661B (en) Method and system for supporting automatic verification of installation package of application
CN110334014A (en) For user interface automated testing method, system, server and storage medium
CN114745313A (en) Terminal remote testing method and device, electronic equipment and readable medium
CN114741294A (en) Page debugging method, device, equipment and storage medium

Legal Events

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