Test environment for accumulating cumulative metric data
AssigneeThe MathWorks, Inc.
InventorsChristian A. Portal, Michael J. Thomas
Life of this patent
Estimating the term…
Abstract
A method for testing a system under test includes defining a test having a number of test elements where at least one of the test elements corresponds to a simulation model with a metric setting. A test vector is defined for the test, and it is used to determine a number of test iterations. The metric setting of the simulation model is mapped to a test variable, and when the test is run metric data is generated from the simulation model during each test iteration. The metric data generated for each test iteration is accumulated and displayed.
Claims23
A computer-implemented method for testing a system under test, the method comprising:
- defining in a test environment a test having a plurality of test elements, the plurality of test elements including:
- a first test element being a simulation model, the simulation model including a block having a property, and
- a second test element that is not a simulation model, the second test element being executable;
- defining, from within the test environment, at least one test vector for the test;
- mapping, from within the test environment, the at least one test vector to the property of the block;
- determining a plurality of test iterations of the simulation model based on the at least one test vector;
- defining a test variable within the test environment;
- from within the test environment performing one of:
- accepting a metric setting that was previously established for the simulation model in a second environment that is separate from the test environment, and
- overriding a previously established metric setting with a new metric setting for the simulation model;
- mapping to the test variable defined in the test environment:
- the previously established metric setting when the previously established metric setting is accepted, the new metric setting of the simulation model when the previously established metric settings is overridden;
- running, using a processor, the test from within the test environment such that the simulation model and the second test element execute at each test iteration;
- storing coverage metric data produced for the simulation model in the second environment during each iteration of the simulation model in the test variable of the test environment based on the mapping;
- accumulating the coverage metric data stored in the test variable for each test iteration of the simulation model;
- and
- displaying the accumulated coverage metric data from within the test environment.
A test system comprising:
- a model-based development environment configured to specify a model including a block having a property;
- and
- a processor configured to:
- implement a test environment that is separate from the model-based development environment, the test environment configured to:
- interface with the model-based development environment,
- create a test having plurality of test elements for testing a system under test, the plurality of test elements including:
- a first test element being the model, and
- a second test element that is not a model, the second test element being executable,
- map, from within the test environment, at least one test vector defined for the test to the property of the block,
- determine a plurality of test iterations of the model based on the at least one test vector,
- define a test variable,
- perform one of:
- accept a metric setting that was previously established for the model in the model-based development environment, and
- override a previously established metric setting with a new metric setting for the model,
- map to the test variable defined in the test environment:
- the previously established metric setting when the previously established metric setting is accepted, or
- the new metric setting for the model when the previously established metric setting is overridden,
- run the test such that the model and the second test element execute at each iteration,
- store metric data produced for the model in the model-based development environment during each iteration of the model in the test variable of the test environment based on the mapping,
- produce cumulative metric data for the model from the metric data stored in the test variable, and
- display the cumulative metric data.
A computing device readable media comprising instructions executable by a computing device, the media comprising:
- instructions to define in a test environment a test having a plurality of test elements, the plurality of test elements including:
- a first test element being a simulation model, the simulation model including a block having a property, and
- a second test element that is not a simulation model, the second test element being executable;
- instructions to define, from within the test environment, a plurality of test conditions through a single test vector for the simulation model;
- instructions to map, from within the test environment, the test conditions of the single test vector to the property of the block;
- instructions to determine a plurality of test iterations of the simulation model based on the plurality of test conditions defined through the single test vector;
- instruction to define a test variable within the test environment;
- instructions to perform one of:
- accept from within the test environment a metric setting that was previously established for the simulation model in a second environment that is separate from the test environment, and
- override at least one previously established metric setting with a new metric setting for the simulation model from within the test environment;
- instructions to map to the test variable defined in the test environment:
- the previously established metric setting when the previously established metric setting is accepted,
- the new metric setting of the simulation model when the at least one previously established metric setting is overridden;
- instructions executable by a processor to run the test from within the test environment such that the simulation model and the second test element execute at each iteration;
- instructions to store metric data produced within the second environment during each iteration of the simulation model in the temporary test variable of the test environment based on the instructions to map;
- instructions to accumulate the metric data stored in the test variable for each test iteration of the simulation model;
- and
- instructions to display the accumulated metric data from within the test environment.
An apparatus comprising:
- means for creating a test in a test environment;
- means for adding a plurality of test elements to the test;
- means for designating a simulation model as a first test element of the test, the simulation model including a block having a property;
- means for designating a second test element that is not a simulation model, the second test element being executable;
- means for specifying a plurality of test conditions for the test through at least one test vector defined within the test environment;
- means for mapping, from within the test environment, the test conditions of the at least one test vector to the property of the block;
- means for determining a plurality of test iterations of the simulation model based on the at least one test vector;
- means for defining a test variable within the test environment;
- is means for performing from within the test environment one of:
- accepting a metric setting that was previously established for the simulation model in a second environment that is separate from the test environment, and
- overriding at least one previously established metric setting with a new metric setting for the simulation model;
- means for mapping to the test variable defined in the test environment:
- the previously established metric setting when the previously established metric setting is accepted, or
- the new metric setting of the simulation model when the at least one previously established metric setting is overridden;
- means for executing the first test element corresponding to the simulation model and the second test element under each test condition within the second environment;
- means for obtaining metric data produced for the simulation model in the second environment for each test condition corresponding to each iteration of the plurality of iterations;
- means for storing the metric data in the test variable;
- means for accumulating the metric data stored in the test variable for each test condition to produce cumulative metric data for the simulation model;
- and
- means for presenting the accumulated metric data to a test operator.
Dependencies are inferred from the claim text.