Technique for test coverage of visual programs
AssigneeInternational Business Machines Corporation
InventorsGary Martin Johnston, Mila Keren, Anthony Hayden Lindsey, Yael Shaham-Gafni
Life of this patent
Estimating the term…
Abstract
A method, system, and computer program for providing test coverage metrics in a visual programming environment. A test coverage model for visual programming is defined, which accounts for the specialized nature of visual programming, and the metrics are based on this model. The metrics are expressed in terms of elements familiar to the visual programmer, as opposed to using source code metrics. In a preferred embodiment, these elements comprise events, actions, connections, and attributes. The code implementing a visual program is instrumented according to this model, and test coverage information is gathered as the instrumented program executes.
Claims12
In a computing system having a capability for component-based visual programming, computer readable code readable by said system for providing test coverage metrics, comprising:
- a subprocess for providing one or more component-based, visually-constructed programs;
- a subprocess for instrumenting a selected one of said visually-constructed programs in order to collect test coverage information, further comprising:
- a subprocess for locating one or more elements of interest in said selected visually-constructed program, wherein said elements comprise instances of features of said selected visually-constructed program, said features comprising one or more of:
- (1) events to be signaled by components;
- (2) actions to be performed by components;
- (3) attributes of components;
- and (4) connections to be fired;
- and
- a subprocess for adding a plurality of code hooks to said selected visually-constructed program for each of said located elements;
- a subprocess for initializing said test coverage metrics;
- a subprocess for gathering said test coverage information for said selected visually-constructed program, using said instrumented program, further comprising:
- a subprocess for executing one or more tests against said instrumented program;
- and
- a subprocess for logging an entry upon detection of any of said code hooks during operation of said subprocess for executing;
- and
- a subprocess for updating said test coverage metrics to reflect said gathered test coverage information.
A system for providing test coverage metrics in a computing system having a capability for component-based visual programing, comprising:
- one or more component-based, visually-constructed programs;
- means for instrumenting a selected one of said visually-constructed programs in order to collect test coverage information, further comprising:
- means for locating one or more elements of interest in said selected visually-constructed program, wherein said elements comprise instances of features of said selected visually-constructed program, said features comprising one or more of:
- (1) events to be signaled by components;
- (2) actions to be performed by components;
- (3) attributes of components;
- and (4) connections to be fired;
- and
- means for adding a plurality of code hooks to said selected visually-constructed program for each of said located elements;
- means for initializing said test coverage metrics;
- means for gathering said test coverage information for said selected visually-constructed program, using said instrumented program, further comprising:
- means for executing one or more tests against said instrumented program;
- and
- means for logging an entry upon detection of any of said code hooks during operation of said means for executing;
- and
- means for updating said test coverage metrics to reflect said gathered test coverage information.
A method for providing test coverage metrics in a computing system having a capability for component-based visual programming, comprising the steps of:
- instrumenting a selected one of one or more component-based, visually-constructed programs in order to collect test coverage information further comprising the steps of:
- locating one or more elements of interest in said selected visually-constructed program, wherein said elements comprise instances of features of said selected visually-constructed program, said features comprising one or more of:
- (1) events to be signaled by components;
- (2) actions to be performed by components;
- (3) attributes of components;
- and (4) connections to be fired;
- and
- adding a plurality of code hooks to said selected visually-constructed program for each of said located elements;
- initializing said test coverage metrics;
- gathering a test coverage information for said selected visually-constructed program, using said instrumented program, further comprising the steps of;
- executing one or more tests against said instrumented program;
- and
- logging an entry upon detection of any of said code hooks during operation of said executing step;
- and
- updating said test coverage metrics to reflect said gathered test coverage information.
Dependencies are inferred from the claim text.