CN110196803B - Software defect training method and system - Google Patents

Software defect training method and system Download PDF

Info

Publication number
CN110196803B
CN110196803B CN201810164060.5A CN201810164060A CN110196803B CN 110196803 B CN110196803 B CN 110196803B CN 201810164060 A CN201810164060 A CN 201810164060A CN 110196803 B CN110196803 B CN 110196803B
Authority
CN
China
Prior art keywords
simulation program
configuration file
code
training
software defect
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
CN201810164060.5A
Other languages
Chinese (zh)
Other versions
CN110196803A (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810164060.5A priority Critical patent/CN110196803B/en
Publication of CN110196803A publication Critical patent/CN110196803A/en
Application granted granted Critical
Publication of CN110196803B publication Critical patent/CN110196803B/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/3636Software debugging by tracing the execution of the program
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a software defect training method and system, and relates to the technical field of computers. One embodiment of the method comprises the following steps: receiving a software defect type to be trained, and acquiring a corresponding training code packet according to the software defect type; creating a configuration file for the training code package, and packaging the training code package and the configuration file to obtain a simulation program; running a simulation program, and outputting the running result and codes of the simulation program; when defect position mark information of the code is received, comparing the defect position mark information with preset defect position information, and outputting a comparison result. According to the embodiment, the simulation program is generated according to the software defect type selected by the user, the code defect position analyzed by the user is compared with the preset defect position, and the comparison result is fed back.

Description

Software defect training method and training system
Technical Field
The present invention relates to the field of computers, and in particular, to a method and system for training software defects.
Background
The internet companies develop a large amount of software each year, and a large amount of new staff enter each year, so that the number of staff with middle and lower skills is huge, and how to improve the skills of the staff so that the staff can grow quickly is a urgent problem to be solved. In the prior art, staff can watch documents and videos in the software development process or can improve staff skills in a company training mode.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art: all are unidirectional knowledge propagation, so that staff cannot actually operate the device, and the device is long in time, high in cost and poor in lifting effect, and cannot effectively utilize the existing experience.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a method and a system for training software defects, where a corresponding training code packet is obtained according to a software defect type selected by a user, a simulation program corresponding to the training code packet is generated, after the simulation program is run, a defect position of a code corresponding to the simulation program analyzed by the user is compared with a preset defect position, and a comparison result is fed back to the user. Through the mode, the user can find the code defects by himself and locate the defects, and the capability of the user for locating the code defects can be rapidly improved in a short time.
In order to achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a software defect training method.
The software defect training method of the embodiment of the invention comprises the following steps: receiving a software defect type to be trained, and acquiring a corresponding training code packet according to the software defect type; the training code package is a code package which is found and extracted in the software development process and corresponds to the executable program with the defect; creating a configuration file for the training code package, and packaging the training code package and the configuration file to obtain a simulation program; running the simulation program, and outputting a running result and codes of the simulation program; when defect position mark information of codes of the simulation program is received, comparing the defect position mark information with preset defect position information, and outputting a comparison result; wherein the defect position mark information is derived based on the operation result.
Optionally, the acquiring the corresponding training code package according to the software defect type includes: acquiring corresponding data records from a database according to the software defect type; the database comprises data records corresponding to executable programs with different software defect types, and the data records comprise position information of the training code package; extracting a preset number of data records, and acquiring a corresponding training code packet according to the extracted position information in the data records.
Optionally, the configuration file includes a package configuration file and a load configuration file; the creating a configuration file for the training code package comprises: creating a packaging configuration file, and writing the extracted data record into the packaging configuration file; creating a loading configuration file comprising configuration parameters of each of the software defect types; the step of packaging the training code package and the configuration file to obtain a simulation program comprises the following steps: and packaging the training code package, the packaging configuration file of the written data record and the loading configuration file to obtain a simulation program.
Optionally, after the step of obtaining the simulation program, the method further includes: assigning an identification to the simulation program; outputting code of the simulation program, comprising: when a code acquisition request comprising the identifier is received, acquiring the code of the simulation program corresponding to the identifier from a code library, and outputting the code.
Optionally, after the step of obtaining the simulation program, the method further includes: creating a link for the simulation program, and returning the link so that a user downloads the simulation program through the link.
Optionally, before the step of acquiring the corresponding training code package according to the software defect type, the method further includes: and dividing the software defect types for each training code package according to the problems of the executable program in the running process, wherein one problem corresponds to one software defect type.
To achieve the above object, according to one aspect of an embodiment of the present invention, there is provided a software defect training system.
The software defect training system of the embodiment of the invention comprises: the acquisition module is used for receiving the software defect type to be trained and acquiring a corresponding training code packet according to the software defect type; the training code package is a code package which is found and extracted in the software development process and corresponds to the executable program with the defect; the packaging module is used for creating a configuration file for the training code package, and packaging the training code package and the configuration file to obtain a simulation program; the output module is used for running the simulation program and outputting the running result and codes of the simulation program; the comparison module is used for comparing the defect position mark information with preset defect position information when receiving the defect position mark information of the codes of the simulation program and outputting a comparison result; wherein the defect position mark information is derived based on the operation result.
Optionally, the acquiring module is further configured to: acquiring corresponding data records from a database according to the software defect type; the database comprises data records corresponding to executable programs with different software defect types, and the data records comprise position information of the training code package; extracting a preset number of data records, and acquiring a corresponding training code packet according to the extracted position information in the data records.
Optionally, the configuration file includes a package configuration file and a load configuration file; the packaging module is further configured to: creating a packaging configuration file, and writing the extracted data record into the packaging configuration file; creating a loading configuration file comprising configuration parameters of each of the software defect types; and packaging the training code package, the packaging configuration file of the written data record and the loading configuration file to obtain a simulation program.
Optionally, the system further comprises: the identifier distribution module is used for distributing identifiers for the simulation program; the output module is further configured to: when a code acquisition request comprising the identifier is received, acquiring the code of the simulation program corresponding to the identifier from a code library, and outputting the code.
Optionally, the system further comprises: and the link creation module is used for creating a link for the simulation program and returning the link so as to enable a user to download the simulation program through the link.
Optionally, the system further comprises: and the software defect type dividing module is used for dividing the software defect types for each training code packet according to the problems of the executable program in the running process, and one problem corresponds to one software defect type.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an electronic device.
An electronic device according to an embodiment of the present invention includes: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the software defect training method.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium.
A computer readable medium of an embodiment of the present invention has stored thereon a computer program which, when executed by a processor, implements a software defect training method of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of obtaining a training code packet corresponding to a software defect type selected by a user, generating a simulation program corresponding to the training code packet, after running the simulation program, comparing the defect position of a code corresponding to the simulation program analyzed by the user with a preset defect position, and feeding back a comparison result to the user, so that the user can find the code defect by himself or herself, perform defect positioning, and rapidly improve the capability of the user for searching and positioning the code defect in a short time; the method has the advantages that the packaging configuration file is created and the loading configuration file is created, so that subsequent packaging is facilitated, and the packaged simulation program can be loaded into the memory during running; the unique identification is allocated to the simulation program to acquire codes corresponding to the simulation program requested by the user, so that the user can perform code defect marking subsequently; by creating links for the simulation program, a user can conveniently run the simulation program after downloading the simulation program so as to locate the defect position of the code according to the running result; according to the problems of the executable program in the running process, each training code packet is divided into software defect types in advance, so that the existing experience is fully utilized, different software defect types can be trained by a user, and the user capacity is improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a software defect training method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a main flow of a software defect training method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the major modules of a software defect training system according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 5 is a schematic structural diagram of a computer device suitable for use in an electronic apparatus to implement an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
FIG. 1 is a schematic diagram of the main steps of a software defect training method according to an embodiment of the present invention. As shown in FIG. 1, the software defect training method in the embodiment of the invention mainly comprises the following steps:
step S101: receiving a software defect type to be trained, and acquiring a corresponding training code packet according to the software defect type; the training code package is a code package which is found and extracted in the software development process and corresponds to the executable program with the defect. The software defect types are classified according to problems of the executable program in the running process, such as memory leakage and excessive CPU load, and one problem corresponds to one software defect type. The method comprises the steps of storing position information of training code packages corresponding to various software defect types in a database in advance, acquiring the position information of the training code packages corresponding to the software defect types from the database when the software defect types selected by a user to be trained are received, and acquiring the training code packages through the position information.
Step S102: and creating a configuration file for the training code package, and packaging the training code package and the configuration file to obtain a simulation program. Firstly, creating a packaging configuration file, and writing the extracted data record into the packaging configuration file; then creating a loading configuration file comprising configuration parameters of each software defect type; and packaging the training code package, the packaging configuration file of the written data record and the loading configuration file to finally obtain the simulation program. In an embodiment, the package configuration file is a file in XML (Extensible Markup Language ) format; the loading configuration file is used for loading the simulation program into the memory when the simulation program runs, and the configuration parameters comprise names of software defect types, parameters needing to be initialized, pre-dependency and the like.
Step S103: and operating the simulation program, and outputting an operation result and codes of the simulation program. The user clicks the simulation program to run the simulation program, analyzes the cause of the problem of the simulation program based on the running result, and applies for obtaining the code of the simulation program. When a code acquisition request for the simulation program is received from a user, the code of the simulation program is output.
Step S104: when defect position mark information of codes of the simulation program is received, comparing the defect position mark information with preset defect position information, and outputting a comparison result; wherein the defect position mark information is derived based on the operation result. The user finds the position of the code defect based on the running result of the simulation program, marks the code, compares the defect position marking information of the code with preset defect position information, and feeds back the comparison result to the user. The user can know whether the user marks the defect position of the code correctly by checking the comparison result.
The embodiment of the invention extracts the code package which finds problems in the software development process, and stores the code package into the database of the software defect training system according to the software defect type of the code package. If a new problem occurs, the corresponding code package is stored in a database of the software defect training system according to the type of the software defect. After a user or a learner selects a simulation scene and a trained software defect type on a user interface of the software defect training system, a management module of the software defect training system generates a simulation program corresponding to a code packet of the software defect type so as to reproduce a problem scene corresponding to the software defect type; the learner operates the simulation program to find out the defects of the codes of the simulation program, marks the defects in the codes of the user interface and outputs the defects to the management module; the management module compares the defect position of the trainee mark with a preset defect position, feeding back the comparison result to the user; the user can know whether the defect position marked by the user is correct or not by looking at the comparison result. The software defect training system can facilitate staff inside a company to learn and can continuously accumulate the prior experience.
FIG. 2 is a schematic flow chart of a software defect training method according to an embodiment of the invention. As shown in fig. 2, the software defect training method according to the embodiment of the present invention is implemented by a software defect training system, and mainly includes the following steps:
step S201: and receiving a login request, and jumping to a simulation scene selection page after the login verification is passed. The login request comprises a user name and a password, and the simulation scene selection page comprises an exercise button and an examination button. After a learner inputs a user name and a password on a login page of the software defect training system, clicking a login button; the software defect training system carries out login verification according to the user name and the password, and if the verification is passed, the software defect training system enters a simulation scene selection page; and if the verification is not passed, outputting prompt information.
Step S202: receiving simulation scenes and software defect types selected by students, and acquiring corresponding data records from a database according to the simulation scenes and the software defect types. The student clicks a training button or an examination button in the simulation scene selection page according to the self requirement, and correspondingly enters a simulation training page or a simulation examination page; then selecting a simulation exercise page person or a software defect type in a simulation examination page according to the self requirement; the software defect types comprise memory leakage, memory overflow, CPU overload, IO problems, network problems and the like. The management module of the software defect training system searches all data records conforming to the software defect type from a database according to the simulation scene and the software defect type selected by a learner, and then extracts the data records with preset number according to preset rules (customized by a developer, such as random rules or gradient rules according to difficulty and the like). The database stores data records of different software defect types, at least one data record corresponding to each software defect type, and each data record comprises position information of a training code packet, a dependent file for packaging the training code packet and configuration information, wherein the configuration information comprises a user name, a password, a database address and the like of the database. Assuming that the learner selects a software defect type of memory overflow, the management module will find out all the data records corresponding to the software defect type of memory overflow from the database.
In a preferred embodiment, the management module of the software defect training system marks and saves the data records of the user's practice and examination, so that the management module can conveniently extract different data records for the user according to whether the user selects the practice button or the examination button. For example, if the user clicks the exercise button, a preset number of data records of the training type may be randomly extracted for the user according to the training type selected by the user subsequently; if the user clicks the examination button, the data records which are not exercised or examined by the user can be selected according to the training type selected by the user later, and the preset number of data records are extracted from the data records.
Step S203: and acquiring a corresponding training code packet according to the position information of the training code packet in the data record. The training code package is a code package corresponding to the executable program which is found and extracted by a developer in the software development process and has defects. And the management module of the software defect training system acquires a training code packet corresponding to the extracted data record according to the position information in the data record.
Step S204: and creating a packaging configuration file, and writing the position information in the data record, the dependence file for packaging the training code package and the configuration information into the packaging configuration file. Wherein, the package configuration file is an XML format file. The management module of the software defect training system creates a file in an XML format, writes the position information in the data record, the dependent file for packaging the training code packet and the configuration information into the XML file, and the XML file is used for packaging in step S207.
Step S205: creating a loading configuration file comprising configuration parameters for each of said software defect types. The configuration parameters comprise names of software defect types, parameters needing to be initialized, pre-dependency and the like. The management module of the software defect training system creates a loading configuration file for loading the simulation program generated in step S206 into the memory at runtime.
Step S206: and packaging the training code package, the packaging configuration file and the loading configuration file to obtain a simulation program. The management module of the software defect training system calls a compiling and packing program to pack training code packages, packing configuration files and loading configuration files into a package.
Step S207: creating a link for the simulation program and returning the link. Wherein the link is a URL (Uniform Resource Locator ). And the management module of the software defect training system creates a URL link for the simulation program, and then outputs the URL link to a user interface of the software defect training system for display. The learner clicks the link on the user interface to download the simulation program.
Step S208: and allocating a unique identifier for the simulation program, and storing the identifier and a code corresponding to the simulation program in a code library. The management module of the software defect training system distributes unique identification for the simulation program, and the identification can acquire codes of the corresponding simulation program from a code library after receiving a code acquisition request and then returns the codes to a user.
Step S209: and operating the simulation program and outputting an operation result. The learner runs the downloaded simulation program, analyzes abnormal phenomena occurring in the running process of the simulation program to locate defects, such as which function, which operation or which codes cause the abnormal phenomena, and then clicks a code call button of a user interface to output identification of the simulation program to a management module of the software defect training system through a code acquisition request.
Step S210: and receiving a code acquisition request, and returning a corresponding code according to the code acquisition request. Wherein the code acquisition request includes an identification of the simulation program. And the management module of the software defect training system reads the corresponding codes from the code library according to the identification, and outputs the codes to the user interface for display.
Step S211: and receiving defect position mark information, comparing the defect position mark information with preset defect position information, and outputting a comparison result. The learner marks the location of the defect code corresponding to the anomaly in the user interface, and submitting the marked defect code positions to a management module of the software defect training system as defect position marking information. And the management module compares the defect position mark information with preset defect position information and returns the comparison result to the user interface. And a student can know whether the position of the defect code marked by the student is correct or not by checking the comparison result.
According to the software defect training method, the training code package corresponding to the software defect type selected by the user is obtained, the simulation program corresponding to the training code package is generated, after the simulation program is operated, the defect position of the simulation program corresponding to the code analyzed by the user is compared with the preset defect position, and the comparison result is fed back to the user, so that the user can find the code defect by himself or herself and perform defect positioning, and the capability of finding and positioning the code defect by the user can be rapidly improved in a short time; the method has the advantages that the packaging configuration file is created and the loading configuration file is created, so that subsequent packaging is facilitated, and the packaged simulation program can be loaded into the memory during running; the unique identification is allocated to the simulation program to acquire codes corresponding to the simulation program requested by the user, so that the user can perform code defect marking subsequently; by creating links for the simulation program, a user can conveniently run the simulation program after downloading the simulation program so as to locate the defect position of the code according to the running result; according to the problems of the executable program in the running process, each training code packet is divided into software defect types in advance, so that the existing experience is fully utilized, different software defect types can be trained by a user, and the user capacity is improved.
FIG. 3 is a schematic diagram of the major modules of a software defect training system according to an embodiment of the present invention. As shown in fig. 3, the software defect training system 300 according to the embodiment of the present invention mainly includes:
the acquiring module 301 is configured to receive a software defect type to be trained, and acquire a corresponding training code packet according to the software defect type; the training code package is a code package which is found and extracted in the software development process and corresponds to the executable program with the defect. The software defect types are classified according to problems of the executable program in the running process, such as memory leakage and excessive CPU load, and one problem corresponds to one software defect type. The method comprises the steps of storing position information of training code packages corresponding to various software defect types in a database in advance, acquiring the position information of the training code packages corresponding to the software defect types from the database when the software defect types selected by a user to be trained are received, and acquiring the training code packages through the position information.
And the packaging module 302 is configured to create a configuration file for the training code package, and package the training code package and the configuration file to obtain a simulation program. Firstly, creating a packaging configuration file, and writing the extracted data record into the packaging configuration file; then creating a loading configuration file comprising configuration parameters of each software defect type; and packaging the training code package, the packaging configuration file of the written data record and the loading configuration file to finally obtain the simulation program. In an embodiment, the package configuration file is an XML format file; the loading configuration file is used for loading the simulation program into the memory when the simulation program runs, and the configuration parameters comprise names of software defect types, parameters needing to be initialized, pre-dependency and the like.
And the output module 303 is used for running the simulation program and outputting the running result and the code of the simulation program. The user clicks the simulation program to run the simulation program, analyzes the cause of the problem of the simulation program based on the running result, and applies for obtaining the code of the simulation program. When a code acquisition request for the simulation program is received from a user, the code of the simulation program is output.
A comparing module 304, configured to, when defect position mark information of a code of the simulation program is received, compare the defect position mark information with preset defect position information, and output a comparison result; wherein the defect position mark information is derived based on the operation result. The user finds the position of the code defect based on the running result of the simulation program, marks the code, compares the defect position marking information of the code with preset defect position information, and feeds back the comparison result to the user. The user can know whether the user marks the defect position of the code correctly by checking the comparison result.
In addition, the software defect training system 300 according to the embodiment of the present invention may further include: the identifier assignment module, the link creation module, and the software defect type partitioning module (not shown in fig. 3). The identification distribution module is used for distributing identification for the simulation program; the link creation module is used for creating a link for the simulation program and returning the link so that a user downloads the simulation program through the link; the software defect type dividing module is used for dividing the software defect types for each training code packet according to the problems of the executable program in the running process, and one problem corresponds to one software defect type. All the modules form a management module of the software defect training system.
From the above description, it can be seen that by acquiring a training code packet corresponding to a software defect type selected by a user, generating a simulation program corresponding to the training code packet, after running the simulation program, comparing the defect position of a code corresponding to the simulation program analyzed by the user with a preset defect position, and feeding back a comparison result to the user, the user can find the code defect by himself or herself in this way, and perform defect positioning, so that the capability of the user for finding and positioning the code defect can be rapidly improved in a short time; the method has the advantages that the packaging configuration file is created and the loading configuration file is created, so that subsequent packaging is facilitated, and the packaged simulation program can be loaded into the memory during running; the unique identification is allocated to the simulation program to acquire codes corresponding to the simulation program requested by the user, so that the user can perform code defect marking subsequently; by creating links for the simulation program, a user can conveniently run the simulation program after downloading the simulation program so as to locate the defect position of the code according to the running result; according to the problems of the executable program in the running process, each training code packet is divided into software defect types in advance, so that the existing experience is fully utilized, different software defect types can be trained by a user, and the user capacity is improved.
FIG. 4 illustrates an exemplary system architecture 400 to which a software defect training method or software defect training system of embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 is used as a medium to provide communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 405 via the network 404 using the terminal devices 401, 402, 403 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 401, 402, 403.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (by way of example only) that provides support for click events generated by users using the terminal devices 401, 402, 403. The background management server may analyze the received click data, text content, and other data, and feedback the processing result (e.g., the target push information, the product information—only an example) to the terminal device.
It should be noted that, the software defect training method provided in the embodiment of the present application is generally executed by the server 405, and accordingly, the software defect training system is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
According to an embodiment of the invention, the invention further provides an electronic device and a computer readable medium.
The electronic device of the present invention includes: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the software defect training method.
The computer readable medium of the present invention has stored thereon a computer program which when executed by a processor implements a software defect training method of an embodiment of the present invention.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing an embodiment of the present invention. The electronic device shown in fig. 5 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the computer system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, the processes described above in the main step diagrams may be implemented as computer software programs according to the disclosed embodiments of the invention. 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 main step diagrams. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 501.
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 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 document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, 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 flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes an acquisition module, a packaging module, an output module, and a comparison module. The names of these modules do not in any way limit the module itself, for example, the acquisition module may also be described as "a module that receives a software defect type to be trained, and acquires a corresponding training code package according to the software defect type".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: receiving a software defect type to be trained, and acquiring a corresponding training code packet according to the software defect type; the training code package is a code package which is found and extracted in the software development process and corresponds to the executable program with the defect; creating a configuration file for the training code package, and packaging the training code package and the configuration file to obtain a simulation program; running the simulation program, and outputting a running result and codes of the simulation program; when defect position mark information of codes of the simulation program is received, comparing the defect position mark information with preset defect position information, and outputting a comparison result; wherein the defect position mark information is derived based on the operation result.
From the above description, it can be seen that by acquiring a training code packet corresponding to a software defect type selected by a user, generating a simulation program corresponding to the training code packet, after running the simulation program, comparing the defect position of a code corresponding to the simulation program analyzed by the user with a preset defect position, and feeding back a comparison result to the user, the user can find the code defect by himself or herself in this way, and perform defect positioning, so that the capability of the user for finding and positioning the code defect can be rapidly improved in a short time; the method has the advantages that the packaging configuration file is created and the loading configuration file is created, so that subsequent packaging is facilitated, and the packaged simulation program can be loaded into the memory during running; the unique identification is allocated to the simulation program to acquire codes corresponding to the simulation program requested by the user, so that the user can perform code defect marking subsequently; by creating links for the simulation program, a user can conveniently run the simulation program after downloading the simulation program so as to locate the defect position of the code according to the running result; according to the problems of the executable program in the running process, each training code packet is divided into software defect types in advance, so that the existing experience is fully utilized, different software defect types can be trained by a user, and the user capacity is improved.
The product can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the methods provided in the embodiments of the present invention.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (14)

1. A method for training software defects, comprising:
receiving a software defect type to be trained, and acquiring a corresponding training code packet according to the software defect type; the training code package is a code package which is found and extracted in the software development process and corresponds to the executable program with the defect;
creating a configuration file for the training code package, and packaging the training code package and the configuration file to obtain a simulation program;
running the simulation program, and outputting a running result and codes of the simulation program;
When defect position mark information of codes of the simulation program is received, comparing the defect position mark information with preset defect position information, and outputting a comparison result; wherein the defect position mark information is derived based on the operation result.
2. The method according to claim 1, characterized in that: the obtaining the corresponding training code package according to the software defect type comprises the following steps:
acquiring corresponding data records from a database according to the software defect type; the database comprises data records corresponding to executable programs with different software defect types, and the data records comprise position information of the training code package;
extracting a preset number of data records, and acquiring a corresponding training code packet according to the extracted position information in the data records.
3. The method according to claim 2, characterized in that: the configuration files comprise a packaging configuration file and a loading configuration file;
the creating a configuration file for the training code package comprises:
creating a packaging configuration file, and writing the extracted data record into the packaging configuration file;
Creating a loading configuration file comprising configuration parameters of each of the software defect types;
the step of packaging the training code package and the configuration file to obtain a simulation program comprises the following steps: and packaging the training code package, the packaging configuration file of the written data record and the loading configuration file to obtain a simulation program.
4. The method according to claim 1, characterized in that: after the step of obtaining the simulation program, the method further comprises: assigning an identification to the simulation program;
outputting code of the simulation program, comprising: when a code acquisition request comprising the identifier is received, acquiring the code of the simulation program corresponding to the identifier from a code library, and outputting the code.
5. The method according to claim 1, characterized in that: after the step of obtaining the simulation program, the method further comprises: creating a link for the simulation program, and returning the link so that a user downloads the simulation program through the link.
6. The method according to any one of claims 1 to 5, characterized in that: before the step of obtaining the corresponding training code package according to the software defect type, the method further comprises the following steps: and dividing the software defect types for each training code package according to the problems of the executable program in the running process, wherein one problem corresponds to one software defect type.
7. A software defect training system, comprising:
the acquisition module is used for receiving the software defect type to be trained and acquiring a corresponding training code packet according to the software defect type; the training code package is a code package which is found and extracted in the software development process and corresponds to the executable program with the defect;
the packaging module is used for creating a configuration file for the training code package, and packaging the training code package and the configuration file to obtain a simulation program;
the output module is used for running the simulation program and outputting the running result and codes of the simulation program;
the comparison module is used for comparing the defect position mark information with preset defect position information when receiving the defect position mark information of the codes of the simulation program and outputting a comparison result; wherein the defect position mark information is derived based on the operation result.
8. The system according to claim 7, wherein: the acquisition module is further configured to:
acquiring corresponding data records from a database according to the software defect type; the database comprises data records corresponding to executable programs with different software defect types, and the data records comprise position information of the training code package;
Extracting a preset number of data records, and acquiring a corresponding training code packet according to the extracted position information in the data records.
9. The system according to claim 8, wherein: the configuration files comprise a packaging configuration file and a loading configuration file;
the packaging module is further configured to:
creating a packaging configuration file, and writing the extracted data record into the packaging configuration file;
creating a loading configuration file comprising configuration parameters of each of the software defect types; and
and packaging the training code package, the packaging configuration file of the written data record and the loading configuration file to obtain a simulation program.
10. The system according to claim 7, wherein: the system further comprises: the identifier distribution module is used for distributing identifiers for the simulation program;
the output module is further configured to: when a code acquisition request comprising the identifier is received, acquiring the code of the simulation program corresponding to the identifier from a code library, and outputting the code.
11. The system according to claim 7, wherein: the system further comprises: and the link creation module is used for creating a link for the simulation program and returning the link so as to enable a user to download the simulation program through the link.
12. The system according to any one of claims 7 to 11, characterized in that: the system further comprises: and the software defect type dividing module is used for dividing the software defect types for each training code packet according to the problems of the executable program in the running process, and one problem corresponds to one software defect type.
13. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
14. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
CN201810164060.5A 2018-02-27 2018-02-27 Software defect training method and system Active CN110196803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810164060.5A CN110196803B (en) 2018-02-27 2018-02-27 Software defect training method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810164060.5A CN110196803B (en) 2018-02-27 2018-02-27 Software defect training method and system

Publications (2)

Publication Number Publication Date
CN110196803A CN110196803A (en) 2019-09-03
CN110196803B true CN110196803B (en) 2024-04-16

Family

ID=67750884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810164060.5A Active CN110196803B (en) 2018-02-27 2018-02-27 Software defect training method and system

Country Status (1)

Country Link
CN (1) CN110196803B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778503A (en) * 2020-10-13 2021-12-10 北京沃东天骏信息技术有限公司 Software maintenance method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799531A (en) * 2012-07-26 2012-11-28 浪潮电子信息产业股份有限公司 Software test method based on hierarchy analysis theory
CN104407973A (en) * 2014-11-25 2015-03-11 珠海格力电器股份有限公司 Automatic unit test realizing method and device
CN105279084A (en) * 2014-06-24 2016-01-27 Sap欧洲公司 Defect localization in software integration tests
CN105957422A (en) * 2016-07-21 2016-09-21 兰州安信铁路科技有限公司 An interlocking engineer training system capable of manually setting interlocking logic flaws
CN107346286A (en) * 2017-07-03 2017-11-14 武汉大学 A kind of Software Defects Predict Methods based on core principle component analysis and extreme learning machine
CN107729235A (en) * 2017-09-29 2018-02-23 百度在线网络技术(北京)有限公司 Method, apparatus, equipment and the computer-readable medium of the location code defect producer

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203908246U (en) * 2011-10-25 2014-10-29 中岛繁 Coating drying device
CN102622510A (en) * 2012-01-31 2012-08-01 龚波 System and method for quantitative management of software defects

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799531A (en) * 2012-07-26 2012-11-28 浪潮电子信息产业股份有限公司 Software test method based on hierarchy analysis theory
CN105279084A (en) * 2014-06-24 2016-01-27 Sap欧洲公司 Defect localization in software integration tests
CN104407973A (en) * 2014-11-25 2015-03-11 珠海格力电器股份有限公司 Automatic unit test realizing method and device
CN105957422A (en) * 2016-07-21 2016-09-21 兰州安信铁路科技有限公司 An interlocking engineer training system capable of manually setting interlocking logic flaws
CN107346286A (en) * 2017-07-03 2017-11-14 武汉大学 A kind of Software Defects Predict Methods based on core principle component analysis and extreme learning machine
CN107729235A (en) * 2017-09-29 2018-02-23 百度在线网络技术(北京)有限公司 Method, apparatus, equipment and the computer-readable medium of the location code defect producer

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
光电子技术;中国无线电电子学文摘(第05期);全文 *
静态软件缺陷预测分析;褚洪波;;农家参谋;20180205(第03期);全文 *
面向Android二进制代码的缺陷预测方法;董枫;刘天铭;徐国爱;郭燕慧;李承泽;;北京邮电大学学报;20180215(第01期);全文 *

Also Published As

Publication number Publication date
CN110196803A (en) 2019-09-03

Similar Documents

Publication Publication Date Title
CN108293081B (en) Deep linking of program playback to mobile application state through user interface events
US9977770B2 (en) Conversion of a presentation to Darwin Information Typing Architecture (DITA)
CN109871311B (en) Method and device for recommending test cases
CN110020329B (en) Method, device and system for generating webpage
CN110780874B (en) Method and device for generating information
CN111125064B (en) Method and device for generating database schema definition statement
US11095957B2 (en) Method and apparatus for publishing information, and method and apparatus for processing information
CN110543297A (en) method and apparatus for generating source code
CN111104479A (en) Data labeling method and device
CN113377653B (en) Method and device for generating test cases
CN107305528B (en) Application testing method and device
CN113076294A (en) Information sharing method and device
CN110928571A (en) Business program development method and device
CN113495730A (en) Resource package generation and analysis method and device
CN110196803B (en) Software defect training method and system
CN110647327B (en) Method and device for dynamic control of user interface based on card
US10140278B2 (en) Computer-implemented methods and systems for associating files with cells of a collaborative spreadsheet
US20130086694A1 (en) Virtual federation of remote portals
CN111813685A (en) Automatic testing method and device
CN113342450B (en) Page processing method, device, electronic equipment and computer readable medium
CN111400623B (en) Method and device for searching information
CN109857838B (en) Method and apparatus for generating information
US20210034507A1 (en) Systems and methods for automated invocation of accessibility validations in accessibility scripts
CN112860538A (en) Method and device for performing interface regression test based on online log
CN113760706B (en) Webpage debugging method and device

Legal Events

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