CN102184138B - Method and system for automatically reproducing and positioning software error - Google Patents

Method and system for automatically reproducing and positioning software error Download PDF

Info

Publication number
CN102184138B
CN102184138B CN 201110129892 CN201110129892A CN102184138B CN 102184138 B CN102184138 B CN 102184138B CN 201110129892 CN201110129892 CN 201110129892 CN 201110129892 A CN201110129892 A CN 201110129892A CN 102184138 B CN102184138 B CN 102184138B
Authority
CN
China
Prior art keywords
software
input operation
operand
daily record
mouse
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.)
Expired - Fee Related
Application number
CN 201110129892
Other languages
Chinese (zh)
Other versions
CN102184138A (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.)
Vtron Group Co Ltd
Original Assignee
Vtron Technologies 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 Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN 201110129892 priority Critical patent/CN102184138B/en
Publication of CN102184138A publication Critical patent/CN102184138A/en
Application granted granted Critical
Publication of CN102184138B publication Critical patent/CN102184138B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method and system for automatically reproducing and positioning a software error. The method comprises the steps of: recording an input operation of a user and an operated object, defining and generating a log document; when software has an error, analyzing the log document, and reducing the input operation of the user and the operated object; and simulating the input operation of the user according to the reduced input operation of the user and the reduced operated object, reproducing the error and automatically reproducing and positioning the error and rapidly finding a design defect of the software.

Description

The method and system that a kind of software error reappears and locatees automatically
Technical field
The technical field of design software design of the present invention and test particularly relates to the method and system that a kind of software error reappears and locatees automatically.
Background technology
In the use or test process of control software, owing to defective or the reason such as inconsiderate of design, attend various faults through regular meeting, and some fault is very difficult to reappear or the location.Therefore, how make fault recurrence by a kind of quick and simple method and for the designer, be very important concerning its location.
The method of using always the most is to adopt the method for analyzing journal file at present, and its principle is that each corresponding in control software program operation place adds daily record output information with the place that may break down, each step operation and corresponding data of recording user.When control software broke down, the designer progressively analyzed program according to the journal file that records in the control software running process, and then found out the reason of fault generation and the defective of finder design.
Though this method is simple, and the reason that can fault location produces and the defective of program design, but it has following two shortcomings: first, tend to produce a large amount of log informations in the control software running process, this has increased greatly analyzes and the difficulty of the reason that fault location produces, and analysis efficiency is often very low; Second, if the reason that the designer can't fault location produces according to log information and the defective of program design, actual operating process is manually simulated in the operating process that often needs to record according to daily record, and needs repeatedly to repeat simulation sometimes, can't accomplish automatic simulation.
Summary of the invention
First goal of the invention of the present invention is to provide a kind of software error to reappear automatically and the method for location, to overcome above-mentioned shortcoming and defect of the prior art.
First goal of the invention of the present invention is achieved by the following technical programs:
The method that a kind of software error reappears and locatees automatically said method comprising the steps of:
The input operation of recording user and generated the daily record document by operand definition;
When the daily record document is resolved when wrong appears in software, and also the original subscriber input operation and by operand;
According to the user's who reduces input operation and operand, the input operation of analog subscriber realizes wrong reproduction.
Mistake is divided into two classes: 1, common fault, this type of mistake refer to import under correct parameter or the operation normal condition, and software is but pointed out mistake and can not be carried out required function.2, serious or fatal error, this type of mistake refers to cause software crash, hang-up because importing correct or wrong parameter, normal or abnormal operation, can't respond etc. can not continue to use the mistake of software.
The determination methods of common fault: under software catalog, write the error condition file, load this document during software startup automatically.
File layout is as follows:
[Interrupt]; One of following mistake takes place, and software interrupts out of service automatically
Errcode=80001000,80001010
Errstring=" parameter error "
[Continue]; One of following mistake takes place, and software is ignored the mistake intermitten operation
Errcode=80002000,80002010
Errstring=" re-enter "
The determination methods of serious or fatal error: this mistake will cause software can not continue operation, and whether operating system can detect and eject automatically Start-up and Adjustment device software, and selection is to enter the software code debugging.
As a kind of preferred version, the input operation of described recording user and generated the daily record document by operand definition specifically comprises:
1) input operation of recording user and be defined as corresponding XML node form by operand;
2) record mouse and keyboard operation process and by operand, generate the daily record document in the mode of XML.
Utilize some system mechanisms (as mouse hook, keyboard hook, window message etc.) of operating system, seizure mouse-keyboard event also is recorded in the xml file.
When the daily record document is resolved when wrong appears in software, and also the original subscriber input operation and by operand, specifically comprise:
3) the daily record document that generates is resolved when wrong appears in software, parses user's input operation and by operand.
As a kind of preferred version, the input operation of analog subscriber realizes wrong reproduction, specifically comprises:
Start the debugging mode of software, the input operation of the user when then record is made mistakes mistake appears up to software, in the input operation according to the analysis result user of daily record document.
As further preferred version, described user's input operation comprises: mouse action and keyboard operation.
As preferred version further, described mouse action comprises the action of the position of mouse, key that mouse is clicked and click and the time of being taken place by operand and operation, and described keyboard operation comprises the object of key value and operation thereof and the time that operation takes place.
As further preferred version, analytic method described in the step 3) is: the action type that at first parses each node correspondence on the daily record document, resolve child node or attribute under each node again according to action type then, the mouse that parses is formed an operational set with keyboard operation and corresponding operand thereof, and arrange in chronological order.
Second goal of the invention of the present invention is to provide a kind of software error the automatic system of reappearing and locating, to use the automatic method of reappearing and locating of a kind of software error that first goal of the invention of the present invention is provided.
Second goal of the invention of the present invention adopts following technical scheme to realize:
The system that a kind of software error reappears and locatees automatically, described system comprises logging modle, parsing module and analog module:
Described logging modle is used for the input operation of recording user and is generated the daily record document by the operand definition;
Described parsing module, when the daily record document that logging modle generates is resolved when wrong appears in software, and also the original subscriber input operation and by operand;
Described analog module, according to the user's of parsing module reduction input operation and operand, the input operation of analog subscriber realizes wrong reproduction.
Compared with prior art, the present invention has the following advantages:
The technical program is by the direct modeling operating process, can more directly be determined to the fault that software is found clearly in the process of operation, and, owing to adopt xml record mouse-keyboard operating process and operand and deposit journal file in, can long-living a large amount of recording diaries information in operational process, saved the space, and be convenient to analytical tool to the parsing of daily record, alleviated and analyzed and the difficulty of the reason that fault location produces, the carrying out simulated operation repeatedly that repeats without the technician locates errors, and debugging acid correction just can directly be called in erroneous point in wrong back in the location.
Description of drawings
Fig. 1 is the process flow diagram of the automatic method of reappearing and locating of a kind of software error of the present invention;
Fig. 2 is the module map of the automatic system of reappearing and locating of a kind of software error of the present invention.
Embodiment
The present invention is described further below in conjunction with accompanying drawing.
As shown in Figure 1, the automatic method of reappearing and locating of a kind of software error of the present invention;
The method that a kind of software error reappears and locatees automatically may further comprise the steps:
1. the XML node form of mouse and keyboard operation and operand thereof is described in definition;
2. control software writes journal file with the mouse-keyboard operation of user's execution and the object of operation thereof according to defined XML node form in real time in operational process, forms XML daily record document;
3. will control whole mouse-keyboard operating process and the operand that XML daily record document that software generates is reduced to the user according to defined XML node form;
4. running control software under debugging mode;
5. whole mouse-keyboard operating process and the operand that comes real simulated to be restored by XML daily record document by analog mouse and keyboard message.When simulation when causing controlling keyboard that software breaks down or mouse action, will cause the above-mentioned control software that moves under debugging mode to break down to actual again, and then the defective that finds control software to design.
Mistake is divided into two classes: 1, common fault, this type of mistake refer to import under correct parameter or the operation normal condition, and software is but pointed out mistake and can not be carried out required function.2, serious or fatal error, this type of mistake refers to cause software crash, hang-up because importing correct or wrong parameter, normal or abnormal operation, can't respond etc. can not continue to use the mistake of software.
The determination methods of common fault: under software catalog, write the error condition file, load this document during software startup automatically.
File layout is as follows:
[Interrupt]; One of following mistake takes place, and software interrupts out of service automatically
Errcode=80001000,80001010
Errstring=" parameter error "
[Continue]; One of following mistake takes place, and software is ignored the mistake intermitten operation
Errcode=80002000,80002010
Errstring=" re-enter "
The determination methods of serious or fatal error: this mistake will cause software can not continue operation, and whether operating system can detect and eject automatically Start-up and Adjustment device software, and selection is to enter the software code debugging.
Mouse action and keyboard operation and operand thereof are defined as corresponding XML node form, utilize some system mechanisms (as mouse hook, keyboard hook, window message etc.) of operating system, catch the mouse-keyboard event and also be recorded in the xml file.Mouse action comprise position, the mouse of mouse clicked be right button or left button, click the object of clicking or double-clicking and operate and the time of operating generation; Keyboard operation comprises that key value, button press or upspring and time that the object operated and operation take place.Xml daily record document definition when for example mouse is clicked a certain button is as follows:
<operation,type=”MouseDown”>
<time〉HH-MM-SS</time 〉/time * that this operation of * produces/
<key〉0</key/* wherein defines 0 and represents left mouse button being pressed, 1 represent right mouse button be pressed */
<x〉220</x 〉/coordinate information when the * mouse is clicked, namely locate to press in (220,220).*/
<y>220</y>
<object〉button</object/object that the * mouse is clicked be button */
</operation>
Control software real time record user's in operational process mouse-keyboard operating process and operand, and write XML daily record document according to defined XML node form, corresponding corresponding mouse of each XML node (or keyboard) operation and operand thereof in the document.Simultaneously, design an XML document analytical tool, be used for resolving the XML daily record document that the control software running process produces, according to defined XML node form, by the running node in the XML daily record document is resolved, restore user's whole mouse-keyboard operating process and operand thereof.Then, under debugging mode, rerun the control software that breaks down, and enable simulating keyboard that the XML document analytical tool provides and the function of mouse information, whole mouse-keyboard operating process and operand according to the XML document analytical tool restores come real simulation actual user's operating process.When simulation when causing controlling keyboard that software breaks down or mouse action, will cause the above-mentioned control software that moves under debugging mode to break down to actual again, and then the defective that finds control software to design.
When analyzing XML daily record document, at first parse the action type of each node correspondence, resolve child node or attribute under each node again according to action type then.Namely for the mouse action node, its attribute or child node will according to position, the mouse of mouse clicked be right button or left button, click the object of clicking or double-clicking and operate and the time of operating generation resolved; For the keyboard operation node, its attribute or child node will be pressed or upspring and time that the object operated and operation take place resolves according to key value, button.For example, in the aforesaid XML daily record document that generates, parse the information such as time, button, position, click object of this operation.The mouse-keyboard operation and the operand thereof that parse are formed an operational set, and arrange in chronological order.
Under debugging mode, start control software.When simulation to actual when causing mouse that software breaks down or operation, the program code of control software will navigate to the fault location that software designs automatically.Analog mouse or keyboard operation in this step, be mouse and keyboard message module (each operating system system of calling system, as windows, Linux has the system interface function), carry out mouse or keyboard operation and operand thereof successively according to the corresponding operating in the operational set, and do corresponding delay or blank operation according to the mistiming between two continued operations.
Be illustrated in figure 2 as the system that a kind of software error reappears and locatees automatically, described system comprises logging modle, parsing module, analog module and debugging module, described logging modle is connected with parsing module, described analog module is connected with parsing module, be used for the analysis result according to parsing module, realize that simulated operation positions mistake, described debugging module is connected with analog module, result according to simulated operation debugs software, carries out location of mistake and defective and searches.

Claims (7)

1. the method that software error reappears and locatees automatically is characterized in that, said method comprising the steps of:
The input operation of recording user and generated the daily record document by operand definition;
When the daily record document is resolved when wrong appears in software, and also the original subscriber input operation and by operand;
According to input operation and the operand of going back the original subscriber, the input operation of analog subscriber realizes wrong reproduction.
2. software error according to claim 1 automatically reappears and the method for location, it is characterized in that the input operation of described recording user and generated the daily record document by the operand definition specifically comprises:
1) input operation of recording user and be defined as corresponding XML node form by operand;
2) record mouse and keyboard operation process and by operand, generate the daily record document in the mode of XML;
When the daily record document is resolved when wrong appears in software, and also the original subscriber input operation and by operand, specifically comprise:
3) the daily record document that generates is resolved when wrong appears in software, parses user's input operation and by operand.
3. the automatic method of reappearing and locating of software error according to claim 1 is characterized in that, the input operation of analog subscriber realizes wrong reproduction, specifically comprises:
Start the debugging mode of software, the input operation of the user when then record is made mistakes mistake appears up to software, in the input operation according to the analysis result user of daily record document.
4. according to claim 1 or the automatic method of reappearing and locating of 2 or 3 described software errors, it is characterized in that described user's input operation comprises: mouse action and keyboard operation.
5. software error according to claim 4 automatically reappears and the method for location, it is characterized in that, described mouse action comprises the action of the position of mouse, key that mouse is clicked and click and the time of being taken place by operand and operation, and described keyboard operation comprises the object of key value and operation thereof and the time that operation takes place.
6. software error according to claim 3 automatically reappears and the method for location, it is characterized in that, analytic method described in the step 3) is: the action type that at first parses each node correspondence on the daily record document, resolve child node or attribute under each node again according to action type then, the mouse that parses is formed an operational set with keyboard operation and corresponding operand thereof, and arrange in chronological order.
7. a software error reappears and the system of location automatically, it is characterized in that described system comprises logging modle, parsing module and analog module:
Described logging modle is used for the input operation of recording user and is generated the daily record document by the operand definition;
Described parsing module, when the daily record document that logging modle generates is resolved when wrong appears in software, and also the original subscriber input operation and by operand;
Described analog module, according to the user's of parsing module reduction input operation and operand, the input operation of analog subscriber realizes wrong reproduction.
CN 201110129892 2011-05-19 2011-05-19 Method and system for automatically reproducing and positioning software error Expired - Fee Related CN102184138B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110129892 CN102184138B (en) 2011-05-19 2011-05-19 Method and system for automatically reproducing and positioning software error

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110129892 CN102184138B (en) 2011-05-19 2011-05-19 Method and system for automatically reproducing and positioning software error

Publications (2)

Publication Number Publication Date
CN102184138A CN102184138A (en) 2011-09-14
CN102184138B true CN102184138B (en) 2013-09-18

Family

ID=44570318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110129892 Expired - Fee Related CN102184138B (en) 2011-05-19 2011-05-19 Method and system for automatically reproducing and positioning software error

Country Status (1)

Country Link
CN (1) CN102184138B (en)

Families Citing this family (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102360289B (en) * 2011-09-29 2013-11-27 用友软件股份有限公司 Data managing device and method
CN104714889B (en) * 2012-03-29 2019-04-02 北京奇虎科技有限公司 A kind of test method and system of browser
CN102929732B (en) * 2012-10-18 2015-04-08 北京奇虎科技有限公司 Method and device for calling file by application program and client-side equipment
CN102929733B (en) * 2012-10-18 2015-02-11 北京奇虎科技有限公司 Method and device for processing error files and client-side equipment
US9384117B2 (en) * 2013-03-01 2016-07-05 Infineon Technologies Ag Machine and methods for evaluating failing software programs
CN103902454A (en) * 2014-04-08 2014-07-02 安一恒通(北京)科技有限公司 Method and device for locating software faults
CN105320572B (en) * 2014-06-27 2019-02-22 腾讯科技(深圳)有限公司 Browser abnormality eliminating method, apparatus and system
CN104346248A (en) * 2014-10-17 2015-02-11 浪潮电子信息产业股份有限公司 Audit function implementation method based on history command
CN104461850B (en) * 2014-12-09 2018-08-28 北京全路通信信号研究设计院集团有限公司 Reproduction method, device and system of train control vehicle-mounted equipment and human-computer interface equipment
CN104965775B (en) * 2015-04-23 2018-02-23 腾讯科技(深圳)有限公司 Method for reconstructing, server and the terminal of application software fault in-situ
CN106293668B (en) * 2015-05-29 2020-01-14 北京拉酷网络科技有限公司 Automatic processing method and system for files among multiple windows
CN106708550B (en) * 2015-11-17 2020-05-29 百度在线网络技术(北京)有限公司 Method and device for loading shared object library
CN105718354A (en) * 2016-01-20 2016-06-29 上海斐讯数据通信技术有限公司 Fault information reproducing method and device
CN107404456B (en) * 2016-05-18 2020-05-05 阿里巴巴集团控股有限公司 Error positioning method and device
CN106055451B (en) * 2016-05-23 2019-02-15 努比亚技术有限公司 Information processing method and electronic equipment
CN106407103A (en) * 2016-07-20 2017-02-15 平安科技(深圳)有限公司 Abnormal signal processing method and apparatus
CN106326129A (en) * 2016-09-09 2017-01-11 福建中金在线信息科技有限公司 Program abnormity information generating method and device
CN107844412A (en) * 2016-09-19 2018-03-27 东华软件股份公司 Method and apparatus for program debugging
CN107391357A (en) * 2017-08-17 2017-11-24 杭州师范大学 Application crashes replay method, device and mobile terminal
CN107621989A (en) * 2017-09-13 2018-01-23 联想(北京)有限公司 A kind of information processing method and device
CN112036899A (en) * 2019-05-14 2020-12-04 阿里巴巴集团控股有限公司 Method and device for providing service information and electronic equipment
CN110716817B (en) * 2019-09-10 2024-06-25 中国平安财产保险股份有限公司 System operation fault processing method and device, storage medium and electronic equipment
CN110825605B (en) * 2019-11-06 2020-09-11 北京博睿宏远数据科技股份有限公司 Method, device, equipment and storage medium for simulating user operation
CN111818123B (en) * 2020-05-28 2023-10-20 中国平安财产保险股份有限公司 Network front-end remote playback method, device, equipment and storage medium
CN113760696A (en) * 2020-07-01 2021-12-07 北京沃东天骏信息技术有限公司 Program problem positioning method and device, electronic equipment and storage medium
CN113010400B (en) * 2021-04-26 2024-02-06 唐君宜 Computer processing technology document intelligent generation and multiple disk system and method
CN113221122A (en) * 2021-05-21 2021-08-06 珠海金山网络游戏科技有限公司 Vulnerability reproduction method and device
CN113391752B (en) * 2021-06-21 2023-11-14 昆明理工大学 Interaction method of touch interaction equipment based on mouse
CN113608988A (en) * 2021-08-10 2021-11-05 南京师范大学 Reproduction-oriented geographical simulation scene recording method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1645336A (en) * 2005-01-20 2005-07-27 上海复旦光华信息科技股份有限公司 Automatic extraction and analysis for formwork based on heterogenerous logbook
CN101887393A (en) * 2010-07-01 2010-11-17 中兴通讯股份有限公司 Equipment fault reproduction method and system based on para-virtualization technique

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110083123A1 (en) * 2009-10-05 2011-04-07 Microsoft Corporation Automatically localizing root error through log analysis

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1645336A (en) * 2005-01-20 2005-07-27 上海复旦光华信息科技股份有限公司 Automatic extraction and analysis for formwork based on heterogenerous logbook
CN101887393A (en) * 2010-07-01 2010-11-17 中兴通讯股份有限公司 Equipment fault reproduction method and system based on para-virtualization technique

Also Published As

Publication number Publication date
CN102184138A (en) 2011-09-14

Similar Documents

Publication Publication Date Title
CN102184138B (en) Method and system for automatically reproducing and positioning software error
US8924912B2 (en) Method of recording and replaying call frames for a test bench
US7627821B2 (en) Recording/playback tools for UI-based applications
US6968509B1 (en) Recording of user-driven events within a computer application
CN102804147B (en) Perform the code check executive system of the code check of ABAP source code
US7849364B2 (en) Kernel-mode in-flight recorder tracing mechanism
CN104281520B (en) Tracking and method, the apparatus and system of debugging
US20090019310A1 (en) Collecting and representing knowledge
CN103049371A (en) Testing method and testing device of Android application programs
CN111108481B (en) Fault analysis method and related equipment
US20130346917A1 (en) Client application analytics
WO2002052411A9 (en) Computer software run-time analysis systems and methods
CN102508775A (en) Interactive automation test system
CN103605556A (en) Virtual test subject integrally-constructing system and method
US8024706B1 (en) Techniques for embedding testing or debugging features within a service
CN102479152A (en) Method and device for obtaining tool automatic test results on basis of Android platform
WO2021142771A1 (en) Service ticket generation method, apparatus and system
CN112241370A (en) Verification method, system and device for API (application program interface) interface class
CN116775442A (en) Software debugging system
CN113326193A (en) Applet testing method and device
CN111522737B (en) Automatic test verification method and device for front-end interface and storage medium
CN113641572B (en) Debugging method for massive big data computing development based on SQL
CN112148608B (en) Mobile terminal automated software testing method based on control function labeling
CN113760588A (en) Method and device for acquiring abnormal information of software system
CN114971539A (en) Simulated manual operation method based on image matching

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: Kezhu road high tech Industrial Development Zone, Guangzhou city of Guangdong Province, No. 233 510670

Patentee after: Wei Chong group Limited by Share Ltd

Address before: 510663 No. 6, color road, hi tech Industrial Development Zone, Guangdong, Guangzhou, China

Patentee before: Guangdong Weichuangshixun Science and Technology Co., Ltd.

CP03 Change of name, title or address
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130918

Termination date: 20200519

CF01 Termination of patent right due to non-payment of annual fee