CN103176901A - Method and system for embedded software test monitoring - Google Patents

Method and system for embedded software test monitoring Download PDF

Info

Publication number
CN103176901A
CN103176901A CN2013100618353A CN201310061835A CN103176901A CN 103176901 A CN103176901 A CN 103176901A CN 2013100618353 A CN2013100618353 A CN 2013100618353A CN 201310061835 A CN201310061835 A CN 201310061835A CN 103176901 A CN103176901 A CN 103176901A
Authority
CN
China
Prior art keywords
thread
snapshot
monitoring
running status
target program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2013100618353A
Other languages
Chinese (zh)
Inventor
刘炳伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth Digital Technology Co Ltd
Shenzhen Skyworth Software Co Ltd
Original Assignee
Shenzhen Skyworth Digital Technology Co Ltd
Shenzhen Skyworth Software 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 Shenzhen Skyworth Digital Technology Co Ltd, Shenzhen Skyworth Software Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN2013100618353A priority Critical patent/CN103176901A/en
Publication of CN103176901A publication Critical patent/CN103176901A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method for embedded software test monitoring. The method comprises the steps: whether a snapshot monitoring mode or a operation state tracking mode is started or not is judged; if the snapshot monitoring mode is started, whether a current time parameter of a snapshot monitoring thread satisfies a preset snapshot monitoring time parameter threshold value or not is judged; if the time parameter satisfies the threshold value, corresponding target program snapshot is established according to the current time parameter of the snapshot monitoring thread and the target program snapshot is saved; if the operation state tracking mode is started, whether a thread satisfying a preset operation state tracking condition exists in a target program or not is judged; and if the thread exists in the target program, the thread satisfying the preset operation state tracking condition in a target program is monitored. The invention further discloses a system for the embedded software test monitoring. According to the method and the system for the embedded software test monitoring, a test of embedded software can be monitored through the snapshot monitoring mode or the operation state tracking mode, software development efficiency is improved and research and development cost is reduced.

Description

A kind of embedded software test method for supervising and system
Technical field
The present invention relates to the embedded software test field, relate in particular to a kind of embedded software test method for supervising and system.
Background technology
Embedded software is based on the software of Embedded System Design, embedded software is widely used in the fields such as national defence, industry control, consumer electronics, communications industry, and such as mobile phone, palm PC, digital camera, set-top box etc. is all with the embedded software technology, traditional product to be carried out the result of intellectualized reconstruction.
when embedded software is in on-the-spot test during the stage, for example the set-top box product is in the research and development later stage, need the tester to carry out last fixed version test to the scene, if low frequency reproduction problem occurs in test process, and the slip-stick artist who is responsible for developing software is not at the scene, can only obtain test case by on-the-spot test personnel's description, the on-the-spot test personnel are described the problem that occurs by the mode of phone or mail, presenting a tester again is unfamiliar with tested software, inadequate to the content Grasping level that develops software, inaccurate during the problem that occurs in describing test result and test process.Realize monitoring to embedded application software by operating in shell script on computing machine independently in prior art, need independently computer equipment, and monitored program needs passive reception monitor data, terminal needs initiatively to send monitor data to script interpreter, process is more complicated, complex steps is unfavorable for the control of R﹠D costs.
Summary of the invention
Embodiment of the present invention technical matters to be solved is, a kind of embedded software test method for supervising and system are provided.Can adopt the test of snapshot monitoring mode or running status tracing mode monitoring embedded software, improve software development efficiency, reduce R﹠D costs.
In order to solve the problems of the technologies described above, the embodiment of the present invention provides a kind of embedded software test method for supervising, comprising:
Judge whether to open snapshot monitoring mode or running status tracing mode;
If open the snapshot monitoring mode, judge whether the time parameter of current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value;
If satisfy, set up corresponding target program snapshot according to the time parameter of described current snapshot monitoring thread, and preserve described target program snapshot;
If open the running status tracing mode, judge whether there is the thread that satisfies default running status tracking condition in target program;
If exist, monitor the thread that satisfies default running status tracking condition in described target program.
Wherein, the time parameter of described snapshot monitoring thread comprises at least: snapshot monitoring hold-up time and snapshot monitoring period interval.
Wherein, described default running status tracking condition comprises: one or more in the global variable name of the thread name of configuration, the function name of configuration, configuration;
The thread that satisfies default running status tracking condition in the described target program of described monitoring comprises:
If have the thread consistent with the thread name of described configuration in described target program, monitor thread consistent with the thread name of described configuration in described target program; Or
If have the thread consistent with the function name of described configuration in described target program, record the function interface corresponding to function name of described configuration; Or
If there be the thread consistent with the global variable name of described configuration in described target program, record the variation track of variate-value corresponding to the global variable name of described configuration.
Wherein, describedly comprise before judging whether to open snapshot monitoring mode or running status tracing mode:
Create and configure described snapshot monitoring thread; Or
Create and configure described running status track thread.
Wherein, comprise after the thread of the satisfied running status tracking condition of presetting in the described target program of described monitoring:
Obtain the running status tracking data according to described monitored results, and preserve described running status tracking data.
Correspondingly, the embodiment of the present invention also provides a kind of embedded software test supervisory system, comprising: snapshot monitoring module or running status tracking module, wherein:
Described snapshot monitoring module comprises: snapshot monitoring judging unit and snapshot are set up the unit, wherein, described snapshot monitoring judging unit is used for when opening the snapshot monitoring mode, judges whether the time parameter of current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value; Described snapshot is set up the unit, is used for when snapshot monitoring judgment unit judges result when being, according to the target program snapshot of the time parameter foundation correspondence of described current snapshot monitoring thread, and preserves described target program snapshot;
Described running status tracking module comprises: running status tracking condition judging unit and running state monitoring unit, wherein, described running status tracking condition judging unit, be used for when opening the running status tracing mode, judge whether there is the thread that satisfies default running status tracking condition in target program; Described running state monitoring unit is used for when described running status tracking condition judgment unit judges result monitoring the thread of the satisfied running status tracking condition of presetting in described target program when being.
Wherein, the time parameter of described snapshot monitoring thread comprises at least: snapshot monitoring hold-up time and snapshot monitoring period interval.
Wherein, described default running status tracking condition comprises: one or more in the global variable name of the thread name of configuration, the function name of configuration, configuration;
Described running state monitoring unit comprises:
The thread monitor subelement is used for monitoring thread consistent with the thread name of described configuration in described target program when there be the thread consistent with the thread name of described configuration in described target program;
Function interface records subelement, is used for recording the function interface corresponding to function name of described configuration when there be the thread consistent with the function name of described configuration in described target program;
Variation track records subelement, is used for when the described target program existence thread consistent with the global variable name of described configuration, records the variation track of variate-value corresponding to the global variable name of described configuration.
Wherein, described snapshot monitoring module also comprises:
Snapshot monitoring thread creating unit is used for creating and configuring described snapshot monitoring thread;
Described running status tracking module also comprises:
Running status track thread creating unit is used for creating and configuring described running status track thread.
Wherein, described running status tracking module also comprises:
Running status tracking data storage unit is used for obtaining the running status tracking data according to described monitored results, and preserves described running status tracking data.
Implement the embodiment of the present invention, can adopt the test of snapshot monitoring mode or running status tracing mode monitoring embedded software, and this embedded software test supervisory system can operate in together with embedded software on same embedded device, can also derive the problem that monitored results data and then reproduction capable of circulation test occurs, can reduce the R﹠D cycle, improve software development efficiency, reduced R﹠D costs.
Description of drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or description of the Prior Art, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The structural representation of a kind of embedded software test supervisory system that Fig. 1 provides for the embodiment of the present invention;
Fig. 2 is the process flow diagram of a kind of embedded software test method for supervising of providing of the embodiment of the present invention;
Fig. 3 is the process flow diagram of another embedded software test method for supervising of providing of the embodiment of the present invention;
Fig. 4 is the process flow diagram of the another kind of embedded software test method for supervising that provides of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
See also Fig. 1, the structural representation of a kind of embedded software test supervisory system that Fig. 1 provides for the embodiment of the present invention.Wherein, the embedded software test supervisory system that the embodiment of the present invention provides can realize in as terminals such as set-top box, smart mobile phone, panel computer, board information terminal, navigating instruments, and the embodiment of the present invention is discussed in detail as an example of the embedded software test supervisory system that realizes on set-top box example.As shown in Figure 1, this embedded software test supervisory system comprises snapshot monitoring module 101 or running status tracking module 102 at least, wherein:
The snapshot monitoring module comprises 101: snapshot monitoring judging unit 1011 and snapshot are set up unit 1012, wherein:
Snapshot monitoring judging unit 1011 is used for when opening the snapshot monitoring mode, judges whether the time parameter of current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value.In specific implementation, when opening the snapshot monitoring mode, for example can identify whether open the snapshot monitoring mode by statement 1 " SNAPSHOR_SERVER_STATE=YES " or statement 2 " SNAPSHOR_SERVER_STATE=NOT ", statement 1 is for opening the snapshot monitoring mode, and statement 2 is for closing the snapshot monitoring mode.
The time parameter of snapshot monitoring thread comprises at least: snapshot monitoring hold-up time and snapshot monitoring period interval.The snapshot monitoring hold-up time can be take second as the unit, but default settings for example 60 seconds, realizes that statement is for example: " Monitor_time=60 ", expression can be preserved the memory image of front 60 seconds of current time, be used for snapshot restore and with the contrast of succeeding state.Snapshot monitoring period interval can be take second as unit, but default settings for example 30 seconds, realizes that statement for example: " Monitor_time_gap=30 ", expression was carried out a snapshot and is set up every 30 seconds.Default snapshot monitoring time parameter threshold value, be that 60 seconds (" Monitor_time=60 "), default snapshot monitoring period are spaced apart 30 seconds (" Monitor_time_gap=30 ") etc. such as the default snapshot monitoring hold-up time, whether the time parameter that judges current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value, for example, in the embedded software test process, stop test at time point 1, holding time point 1 memory image of front 60 seconds; In the embedded software test process, judge whether current snapshot monitoring period interval satisfied 30 seconds.Snapshot (Snapshot) is a complete usable copy of specific data set, and this copy comprises that corresponding data is at the reflection of certain time point (time point of copy beginning).The effect of snapshot mainly contains: can carry out online data backup and recovery.Can carry out data recovery fast when memory device generation application and trouble or file corruption, data be recovered the state of certain available time point; For the storage user provides another data access passage, carry out online the application when processing when former data, the user can access snapshot data, can also utilize snapshot the work such as to test.
Snapshot is set up unit 1012, is used for judgment result is that when being when snapshot monitoring judging unit 1011, sets up the target program snapshot of correspondence according to the time parameter of described current snapshot monitoring thread, and preserves described target program snapshot.In specific implementation, if the time parameter of current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value, set up the target program snapshot, namely set up the target program snapshot every 30 seconds, and preserve this target program and shine soon in assigned catalogue, for example can pass through statement: " Monitor_save_path=./" realizes preserving this target program and shines in assigned catalogue soon.When preserving the target program snapshot, can upgrade former target program snapshot, namely delete former target program snapshot, newly-established target program snapshot is preserved in circulation, only has a target program snapshot in catalogue.And then, the target program snapshot can be passed through serial ports netting twine or USB(Universal Serial BUS, USB (universal serial bus)) the equipment derivation, can carry out backup and the recovery of test data.
Further alternative, the snapshot monitoring module 101 in the embodiment of the present invention can also comprise snapshot monitoring thread creating unit 1013, wherein:
Snapshot monitoring thread creating unit 1013 is used for creating and configuring described snapshot monitoring thread.In specific implementation, before opening the snapshot monitoring mode, snapshot monitoring thread creating unit 1013 creates and the configuration snapshot monitoring thread, for example create and configure a Snapshot_Server thread, wherein, the configuration snapshot monitoring thread can comprise: the snapshot monitoring time parameter threshold value that configuration is default.
Running status tracking module 102 comprises: running status tracking condition judging unit 1021 and running state monitoring unit 1022, wherein:
Running status tracking condition judging unit 1021 is used for when opening the running status tracing mode, judges whether there is the thread that satisfies default running status tracking condition in target program.In specific implementation, when opening the running status tracing mode, for example, can identify whether open the running status tracing mode by statement 3 " MONITOR_SERVER_STATE=YES " or statement 4 " MONITOR_SERVER_STATE=NOT ", statement 3 is for opening the running status tracing mode, and statement 4 is for closing the running status tracing mode.
Default running status tracking condition comprises: one or more in the global variable name of the thread name of configuration, the function name of configuration, configuration.Judge whether exist the thread that satisfies default running status tracking condition can comprise at least in target program: judge whether there be the thread consistent with the thread name that configures in target program; Or judge whether there be the thread consistent with the function name that configures in target program; Or judge whether there be the thread consistent with the global variable name that configures in target program.For example: judge whether there be the thread consistent with the thread name that configures in target program, realize that statement is for example: " Monitor_thread_names=" " ", if realize the thread name of nothing configuration in statement be defaulted as not monitoring, Configuration Values represents whole monitoring when being ALL; Judge and whether have the thread consistent with the function name that configures in target program, realize that statement is for example: " Monitor_function_names=" " ", if realize the function name of nothing configuration in statement be defaulted as not monitoring, Configuration Values represents whole monitoring when being ALL; Judge and whether have the thread consistent with the global variable name that configures in target program, realize that statement is for example: " Monitor_variable_names=" " ", if realize the global variable name of nothing configuration in statement be defaulted as not monitoring, Configuration Values represents whole monitoring when being ALL.Wherein, judge whether there be the thread consistent with the thread name that configures in target program, judge whether exist with the consistent thread of the function name that configures in target program or judge whether there be the thread consistent with the global variable name that configures in target program, above three judgements can independent operating, also can move simultaneously any two judgements, also can move simultaneously three judgements.
Running state monitoring unit 1022 is used for judgment result is that when being when described running status tracking condition judging unit 1021, monitor the thread of the satisfied running status tracking condition of presetting in described target program.In specific implementation, when having the thread that satisfies default running status tracking condition in target program, satisfy the thread of default running status tracking condition in the monitoring objective program.Further alternative, running state monitoring unit 1022 can comprise: thread monitor subelement, function interface record subelement or variation track records subelement, wherein:
The thread monitor subelement is used for monitoring thread consistent with the thread name of described configuration in described target program when there be the thread consistent with the thread name of described configuration in described target program.
Function interface records subelement, is used for recording the function interface corresponding to function name of described configuration when there be the thread consistent with the function name of described configuration in described target program.In specific implementation, by the trace routine counter, take thread as classification, the track that calls of function interface corresponding with the function name of configuration in each thread is recorded with tree structure.
Variation track records subelement, is used for when the described target program existence thread consistent with the global variable name of described configuration, records the variation track of variate-value corresponding to the global variable name of described configuration.
Further alternative, the running status tracking module 102 in the embodiment of the present invention can also comprise running status track thread creating unit 1023 and running status tracking data storage unit 1024, wherein:
Running status track thread creating unit 1023 is used for creating and configuring described running status track thread.In specific implementation, before opening the running status tracing mode, running status track thread creating unit 1023 creates and configuration operation status tracking thread, for example create and configure a Monitor_Server thread, wherein, configuration operation status tracking thread can comprise: the running status tracking condition that configuration is default.
Running status tracking data storage unit 1024 is used for obtaining the running status tracking data according to described monitored results, and preserves described running status tracking data.In specific implementation, obtain the running status tracking data according to the monitored results of running state monitoring unit 1022, the running status tracking data is saved in assigned catalogue, for example can pass through statement: " Monitor_save_path=./" realizes.Further alternative, can realize appending according to certain time interval according to statement " Monitor_time_gap=M " (M is the time value of concrete configuration, such as 30 seconds, 60 seconds etc.) and preserve the running status tracking data in assigned catalogue.
Further alternative, the embedded software test supervisory system of the embodiment of the present invention can only be opened the snapshot monitoring mode, also can only open the running status tracing mode, can also open simultaneously snapshot monitoring mode and running status tracing mode.
A kind of embedded software test supervisory system that provides by implementing the embodiment of the present invention, can adopt the test of snapshot monitoring mode or running status tracing mode monitoring embedded software, and this embedded software test supervisory system can operate in together with embedded software on same embedded device, can also derive the problem that monitored results data and then reproduction capable of circulation test occurs, can reduce the R﹠D cycle, improve software development efficiency, reduced R﹠D costs.
The specific implementation of the embedded software test method for supervising that the below's elaboration embodiment of the present invention provides.
Fig. 2 is the process flow diagram of a kind of embedded software test method for supervising in the embodiment of the present invention, and the embedded software test method for supervising comprises at least as shown in Figure 2:
Step S201 judges whether to open the snapshot monitoring mode, if so, and execution in step S204, if not, execution in step S203.In specific implementation, judging whether to open the snapshot monitoring mode can judge by concrete perform statement, for example, the snapshot monitoring mode is opened in statement 1 " SNAPSHOR_SERVER_STATE=YES " expression, and the snapshot monitoring mode is closed in statement 2 " SNAPSHOR_SERVER_STATE=NOT " expression.
Step S202 judges whether to open the running status tracing mode, if so, and execution in step S206, if not, execution in step S203.In specific implementation, judging whether to open the running status tracing mode can judge by concrete perform statement, for example, the running status tracing mode is opened in statement 3 " MONITOR_SERVER_STATE=YES " expression, and the running status tracing mode is closed in statement 4 " MONITOR_SERVER_STATE=NOT " expression.
In embodiments of the present invention, above-mentioned steps S201, step S202 do not have dividing of sequencing, can carry out simultaneously, can only carry out any one step yet.
Step S203, the operational objective program.In specific implementation, in the embedded system test process, when any pattern in definite snapshot monitoring mode or running status tracing mode is closed or two patterns when all closing, the operational objective program.
Step S204 judges whether the time parameter of current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value, judgment result is that when being that execution in step S205 when the determination result is NO, returns to step S204.in specific implementation, the time parameter of snapshot monitoring thread comprises at least: snapshot monitoring hold-up time and snapshot monitoring period interval, default snapshot monitoring time parameter threshold value, for example the default snapshot monitoring hold-up time is 60 seconds (realizing that statement for example: " Monitor_time=60 "), default snapshot monitoring period is spaced apart 30 seconds (realize statement such as: " Monitor_time_gap=30 ") etc., whether the time parameter that judges current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value, for example, in the embedded software test process, stop test at time point 1, holding time point 1 memory image of front 60 seconds, in the embedded software test process, judge whether current snapshot monitoring period interval satisfied 30 seconds.The effect of snapshot mainly contains: can carry out online data backup and recovery, can also utilize snapshot the work such as to test.
Step S205 sets up corresponding target program snapshot according to the time parameter of described current snapshot monitoring thread, and preserves described target program snapshot.In specific implementation, if the time parameter of current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value, set up the target program snapshot, namely set up the target program snapshot every 30 seconds, and preserve this target program and shine soon in assigned catalogue, for example can pass through statement: " Monitor_save_path=./" realizes preserving this target program and shines in assigned catalogue soon.When preserving the target program snapshot, can upgrade former target program snapshot, namely delete former target program snapshot, newly-established target program snapshot is preserved in circulation, only has a target program snapshot in catalogue.And then, the target program snapshot can be derived by serial ports netting twine or USB device, can carry out backup and the recovery of test data.
Step S206 judges whether exist the thread that satisfies default running status tracking condition to judgment result is that when being that execution in step S207 when the determination result is NO, returns to step S206 in target program.In specific implementation, default running status tracking condition comprises: one or more in the global variable name of the thread name of configuration, the function name of configuration, configuration.Judge whether exist the thread that satisfies default running status tracking condition can comprise at least in target program: judge whether there be the thread consistent with the thread name that configures in target program; Or judge whether there be the thread consistent with the function name that configures in target program; Or judge whether there be the thread consistent with the global variable name that configures in target program.Wherein, judge whether there be the thread consistent with the thread name that configures in target program, judge whether exist with the consistent thread of the function name that configures in target program or judge whether there be the thread consistent with the global variable name that configures in target program, above three judgements can independently be carried out, also can carry out simultaneously any two, also can carry out simultaneously three.
Step S207 monitors the thread that satisfies default running status tracking condition in described target program.In specific implementation, when having the thread that satisfies default running status tracking condition in target program, satisfy the thread of default running status tracking condition in the monitoring objective program.Further alternative, the thread that satisfies default running status tracking condition in the monitoring objective program can comprise: when having the thread consistent with the thread name of described configuration in described target program, monitor thread consistent with the thread name of described configuration in described target program; When having the thread consistent with the function name of described configuration in described target program, record the function interface corresponding to function name of described configuration; When having the thread consistent with the global variable name of described configuration in described target program, record the variation track of variate-value corresponding to the global variable name of described configuration.
A kind of embedded software test method for supervising in the embodiment of the present invention can adopt the test of snapshot monitoring mode or running status tracing mode monitoring embedded software, has improved software development efficiency, has reduced R﹠D costs.
Be the another process flow diagram of embedded software test method for supervising in the embodiment of the present invention as Fig. 3, this invention embedded software test method for supervising can comprise at least:
Step S301 creates and the configuration snapshot monitoring thread.In specific implementation, before opening the snapshot monitoring mode, create and the configuration snapshot monitoring thread, for example create and configure a Snapshot_Server thread, wherein, the configuration snapshot monitoring thread can comprise: the snapshot monitoring time parameter threshold value that configuration is default.
Step S302 judges whether the time parameter of current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value, judgment result is that when being that execution in step S303 when the determination result is NO, returns to step S302.In specific implementation, the time parameter of snapshot monitoring thread comprises at least: snapshot monitoring hold-up time and snapshot monitoring period interval.The snapshot monitoring hold-up time can be take second as the unit, but default settings for example 60 seconds, realizes that statement is for example: " Monitor_time=60 ", expression can be preserved the memory image of front 60 seconds of current time, be used for snapshot restore and with the contrast of succeeding state.Snapshot monitoring period interval can be take second as unit, but default settings for example 30 seconds, realizes that statement for example: " Monitor_time_gap=30 ", expression was carried out a snapshot and is set up every 30 seconds.Default snapshot monitoring time parameter threshold value, be that 60 seconds (" Monitor_time=60 "), default snapshot monitoring period are spaced apart 30 seconds (" Monitor_time_gap=30 ") etc. such as the default snapshot monitoring hold-up time, whether the time parameter that judges current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value, for example, in the embedded software test process, stop test at time point 1, holding time point 1 memory image of front 60 seconds; In the embedded software test process, judge whether current snapshot monitoring period interval satisfied 30 seconds.Snapshot is a complete usable copy of specific data set, and this copy comprises that corresponding data is at the reflection of certain time point (time point of copy beginning).The effect of snapshot mainly contains: can carry out online data backup and recovery.Can carry out data recovery fast when memory device generation application and trouble or file corruption, data be recovered the state of certain available time point; For the storage user provides another data access passage, carry out online the application when processing when former data, the user can access snapshot data, can also utilize snapshot the work such as to test.
Step S303 sets up corresponding target program snapshot according to the time parameter of described current snapshot monitoring thread, and preserves described target program snapshot.In specific implementation, if the time parameter of current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value, set up the target program snapshot, namely set up the target program snapshot every 30 seconds, and preserve this target program and shine soon in assigned catalogue, for example can pass through statement: " Monitor_save_path=./" realizes preserving this target program and shines in assigned catalogue soon.When preserving the target program snapshot, can upgrade former target program snapshot, namely delete former target program snapshot, newly-established target program snapshot is preserved in circulation, only has a target program snapshot in catalogue.And then, the target program snapshot can be derived by serial ports netting twine or USB device, can carry out backup and the recovery of test data.
A kind of embedded software test method for supervising in the embodiment of the present invention, adopt the test of snapshot monitoring mode monitoring embedded software, can regularly set up and preserve the target program snapshot, thereby can be according to test mode before and after the on-the-spot test of target program snapshot restore and contrast, and this embedded software test supervisory system can operate in together with embedded software on same embedded device, can reduce the R﹠D cycle, improve software development efficiency, reduce R﹠D costs.
Be another process flow diagram of embedded software test method for supervising in the embodiment of the present invention as Fig. 4, this invention embedded software test method for supervising can comprise at least:
Step S401 creates and configuration operation status tracking thread.In specific implementation, before opening the running status tracing mode, create and configuration operation status tracking thread, for example create and configure a Monitor_Server thread, wherein, configuration operation status tracking thread can comprise: the running status tracking condition that configuration is default.
Step S402 judges whether there be the thread consistent with the thread name of described configuration in described target program, judgment result is that when being, execution in step S403 when the determination result is NO, returns to step S402.In specific implementation, judge and whether have the thread consistent with the thread name that configures in target program, realize that statement is for example: " Monitor_thread_names=" " ", if realize the thread name of nothing configuration in statement be defaulted as not monitoring, Configuration Values represents whole monitoring when being ALL.
Step S403 monitors thread consistent with the thread name of described configuration in described target program.
Step S404 judges whether there be the thread consistent with the function name of described configuration in described target program, judgment result is that when being, execution in step S405 when the determination result is NO, returns to step S404.In specific implementation, judge and whether have the thread consistent with the function name that configures in target program, realize that statement is for example: " Monitor_function_names=" " ", if realize the function name of nothing configuration in statement be defaulted as not monitoring, Configuration Values represents whole monitoring when being ALL.
Step S405 records the function interface corresponding to function name of described configuration.In specific implementation, by the trace routine counter, take thread as classification, the track that calls of function interface corresponding with the function name of configuration in each thread is recorded with tree structure.
Step S406 judges whether there be the thread consistent with the global variable name of described configuration in described target program, judgment result is that when being, execution in step S407 when the determination result is NO, returns to step S406.In specific implementation, judge and whether have the thread consistent with the global variable name that configures in target program, realize that statement is for example: " Monitor_variable_names=" " ", if realize the global variable name of nothing configuration in statement be defaulted as not monitoring, Configuration Values represents whole monitoring when being ALL.
Step S407 records the variation track of variate-value corresponding to the global variable name of described configuration.In specific implementation, the variation track of the variate-value that the global variable name of recording configuration is corresponding.
In embodiments of the present invention, described step S402~step S403, step S404~step S405, step S406~step S407 does not have dividing of sequencing, can carry out simultaneously, can first carry out any one step yet and carry out other steps again.
Step S408 obtains the running status tracking data according to described monitoring record result, and preserves described running status tracking data.In specific implementation, obtain the running status tracking data according to the monitored results of step S403, the function interface of step S405 record and the variation track of step S407 record, the running status tracking data is saved in assigned catalogue, for example can passes through statement: " Monitor_save_path=./" realize.Further alternative, can realize appending according to certain time interval according to statement " Monitor_time_gap=M " (M is the time value of concrete configuration, such as 30 seconds, 60 seconds etc.) and preserve the running status tracking data in assigned catalogue.
a kind of embedded software test method for supervising in the embodiment of the present invention, adopt the test of running status tracing mode monitoring embedded software, the consistent thread of thread name that can monitor and configure, the variation track of the variate-value that the function interface corresponding to function name of record and configuration or record and the global variable name that configures are corresponding, thereby obtain the running status tracking data, can derive the running status tracking data by serial ports netting twine or USB device, thereby the situation of on-the-spot test is analyzed or reduced to test process, can reduce the R﹠D cycle, improved software development efficiency, and this embedded software test supervisory system can operate in together with embedded software on same embedded device, R﹠D costs have been reduced.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, to come the relevant hardware of instruction to complete by computer program, described program can be stored in a computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosed is only preferred embodiment of the present invention, certainly can not limit with this interest field of the present invention, and the equivalent variations of therefore doing according to claim of the present invention still belongs to the scope that the present invention is contained.

Claims (10)

1. an embedded software test method for supervising, is characterized in that, described method comprises:
Judge whether to open snapshot monitoring mode or running status tracing mode;
If open the snapshot monitoring mode, judge whether the time parameter of current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value;
If satisfy, set up corresponding target program snapshot according to the time parameter of described current snapshot monitoring thread, and preserve described target program snapshot;
If open the running status tracing mode, judge whether there is the thread that satisfies default running status tracking condition in target program;
If exist, monitor the thread that satisfies default running status tracking condition in described target program.
2. method according to claim 1, is characterized in that, the time parameter of described snapshot monitoring thread comprises at least: snapshot monitoring hold-up time and snapshot monitoring period interval.
3. method according to claim 1, is characterized in that, described default running status tracking condition comprises: one or more in the global variable name of the thread name of configuration, the function name of configuration, configuration;
The thread that satisfies default running status tracking condition in the described target program of described monitoring comprises:
If have the thread consistent with the thread name of described configuration in described target program, monitor thread consistent with the thread name of described configuration in described target program; Or
If have the thread consistent with the function name of described configuration in described target program, record the function interface corresponding to function name of described configuration; Or
If there be the thread consistent with the global variable name of described configuration in described target program, record the variation track of variate-value corresponding to the global variable name of described configuration.
4. method according to claim 1, is characterized in that, describedly comprises before judging whether to open snapshot monitoring mode or running status tracing mode:
Create and configure described snapshot monitoring thread; Or
Create and configure described running status track thread.
5. method according to claim 1, is characterized in that, the thread that satisfies default running status tracking condition in the described target program of described monitoring comprises afterwards:
Obtain the running status tracking data according to described monitored results, and preserve described running status tracking data.
6. an embedded software test supervisory system, is characterized in that, described system comprises: snapshot monitoring module or running status tracking module, wherein:
Described snapshot monitoring module comprises: snapshot monitoring judging unit and snapshot are set up the unit, wherein, described snapshot monitoring judging unit is used for when opening the snapshot monitoring mode, judges whether the time parameter of current snapshot monitoring thread satisfies default snapshot monitoring time parameter threshold value; Described snapshot is set up the unit, is used for when snapshot monitoring judgment unit judges result when being, according to the target program snapshot of the time parameter foundation correspondence of described current snapshot monitoring thread, and preserves described target program snapshot;
Described running status tracking module comprises: running status tracking condition judging unit and running state monitoring unit, wherein, described running status tracking condition judging unit, be used for when opening the running status tracing mode, judge whether there is the thread that satisfies default running status tracking condition in target program; Described running state monitoring unit is used for when described running status tracking condition judgment unit judges result monitoring the thread of the satisfied running status tracking condition of presetting in described target program when being.
7. system according to claim 6, is characterized in that, the time parameter of described snapshot monitoring thread comprises at least: snapshot monitoring hold-up time and snapshot monitoring period interval.
8. system according to claim 6, is characterized in that, described default running status tracking condition comprises: one or more in the global variable name of the thread name of configuration, the function name of configuration, configuration;
Described running state monitoring unit comprises:
The thread monitor subelement is used for monitoring thread consistent with the thread name of described configuration in described target program when there be the thread consistent with the thread name of described configuration in described target program;
Function interface records subelement, is used for recording the function interface corresponding to function name of described configuration when there be the thread consistent with the function name of described configuration in described target program;
Variation track records subelement, is used for when the described target program existence thread consistent with the global variable name of described configuration, records the variation track of variate-value corresponding to the global variable name of described configuration.
9. system according to claim 6, is characterized in that, described snapshot monitoring module also comprises:
Snapshot monitoring thread creating unit is used for creating and configuring described snapshot monitoring thread;
Described running status tracking module also comprises:
Running status track thread creating unit is used for creating and configuring described running status track thread.
10. system according to claim 6, is characterized in that, described running status tracking module also comprises:
Running status tracking data storage unit is used for obtaining the running status tracking data according to described monitored results, and preserves described running status tracking data.
CN2013100618353A 2013-02-27 2013-02-27 Method and system for embedded software test monitoring Pending CN103176901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013100618353A CN103176901A (en) 2013-02-27 2013-02-27 Method and system for embedded software test monitoring

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013100618353A CN103176901A (en) 2013-02-27 2013-02-27 Method and system for embedded software test monitoring

Publications (1)

Publication Number Publication Date
CN103176901A true CN103176901A (en) 2013-06-26

Family

ID=48636796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013100618353A Pending CN103176901A (en) 2013-02-27 2013-02-27 Method and system for embedded software test monitoring

Country Status (1)

Country Link
CN (1) CN103176901A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117348A (en) * 2015-09-28 2015-12-02 佛山市朗达信息科技有限公司 Method for monitoring test execution progress of software
CN105204983A (en) * 2014-06-16 2015-12-30 北京基调网络系统有限公司 Java Web application performance diagnostic method and device
CN107577798A (en) * 2017-09-20 2018-01-12 郑州云海信息技术有限公司 A kind of snapshot creation method, device and computer-readable recording medium
CN109213636A (en) * 2018-09-25 2019-01-15 郑州云海信息技术有限公司 A kind of storage snapshot creation method, device, equipment and storage medium
CN110633183A (en) * 2019-08-01 2019-12-31 平安科技(深圳)有限公司 Method and related device for monitoring execution progress of software product
US11493902B2 (en) * 2019-01-28 2022-11-08 Kabushiki Kaisha Yaskawa Denki Industrial machine management system, method for managing industrial machine, and non-transitory computer-readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1605987A (en) * 2004-11-17 2005-04-13 中兴通讯股份有限公司 Method for realizing real time threads state monitoring in multiple thread system
CN102541750A (en) * 2011-12-31 2012-07-04 曙光信息产业股份有限公司 Implementation method and device for data snapshot
CN102622290A (en) * 2012-03-07 2012-08-01 苏州阔地网络科技有限公司 Process monitoring method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1605987A (en) * 2004-11-17 2005-04-13 中兴通讯股份有限公司 Method for realizing real time threads state monitoring in multiple thread system
CN102541750A (en) * 2011-12-31 2012-07-04 曙光信息产业股份有限公司 Implementation method and device for data snapshot
CN102622290A (en) * 2012-03-07 2012-08-01 苏州阔地网络科技有限公司 Process monitoring method and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105204983A (en) * 2014-06-16 2015-12-30 北京基调网络系统有限公司 Java Web application performance diagnostic method and device
CN105204983B (en) * 2014-06-16 2018-07-06 北京基调网络系统有限公司 Java Web application performances diagnostic methods and device
CN105117348A (en) * 2015-09-28 2015-12-02 佛山市朗达信息科技有限公司 Method for monitoring test execution progress of software
CN107577798A (en) * 2017-09-20 2018-01-12 郑州云海信息技术有限公司 A kind of snapshot creation method, device and computer-readable recording medium
CN109213636A (en) * 2018-09-25 2019-01-15 郑州云海信息技术有限公司 A kind of storage snapshot creation method, device, equipment and storage medium
US11493902B2 (en) * 2019-01-28 2022-11-08 Kabushiki Kaisha Yaskawa Denki Industrial machine management system, method for managing industrial machine, and non-transitory computer-readable storage medium
CN110633183A (en) * 2019-08-01 2019-12-31 平安科技(深圳)有限公司 Method and related device for monitoring execution progress of software product
CN110633183B (en) * 2019-08-01 2022-06-24 平安科技(深圳)有限公司 Method and related device for monitoring execution progress of software product

Similar Documents

Publication Publication Date Title
CN104281520B (en) Tracking and method, the apparatus and system of debugging
CN103176901A (en) Method and system for embedded software test monitoring
CN104268055B (en) The monitoring method and device of a kind of program exception
CN111756575B (en) Performance analysis method and device of storage server and electronic equipment
CN104598380A (en) Method and system for automatic testing based on control
CN107678938A (en) The adjustment method and equipment of a kind of application program
CN109491860A (en) Method for detecting abnormality, terminal device and the medium of application program
CN104699591A (en) Reappearing method and device of test scenes
CN105184166A (en) Kernel-based Android application real-time behavior analysis method and system
CN104216811A (en) Log collecting method and system of application program
CN103605606B (en) A kind of embedded software test use-case batch execution method that can automatically change
CN103345419A (en) Dynamic evidence obtaining method based on Android platform
CN103577309A (en) Automatic test method and device
CN110610089B (en) User behavior simulation method and device and computer equipment
CN103577310A (en) Method and device for recording software debugging logs
CN107402855A (en) A kind of detection method of hard disk, device and server
CN107391325A (en) A kind of method of testing of hard disk, device and terminal
CN110224874A (en) A kind of processing method and processing device of equipment fault
CN103246566A (en) Resource monitoring method and device for application program
CN106528430A (en) Application program detection method and device and electronic equipment
WO2015199788A1 (en) Methods and apparatuses for automated testing of streaming applications using mapreduce-like middleware
CN104573434A (en) Account protection method, device and system
CN105512562B (en) Vulnerability mining method and device and electronic equipment
CN105657309A (en) Multi-way data collection method and system of law enforcement recorder
CN106528429A (en) UI testing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130626