Method and system for source-code model-based testing
First Claim
1. A method for testing a software package, the method comprising:
- providing a source-code model of at least some of the intended operations of the software package;
reading the source-code model;
compiling the source-code model into a compiled model;
running the compiled model to generate a state graph;
generating a plurality of test cases by traversing the state graph;
storing the plurality of generated test cases in a markup language; and
reading the stored markup language to run the generated test cases.
2 Assignments
0 Petitions
Accused Products
Abstract
Disclosed is a method for using source code to create the models used in model-based testing. After exploring the intended behavior of a software package, a test engineer writes source code to model that intended behavior. The source code is compiled into a model, and the model is automatically analyzed to generate numerous test scripts that can exercise the behavior of the software package. When the tests are run, their results are compared against intended behaviors, and discrepancies are used to correct the software package (or to correct the source-code model if it was prepared incorrectly). The model coding, test generation, test execution, and comparison steps are repeated as often as necessary to thoroughly test the software package. In some embodiments, the test scripts generated by the model are written in XML (Extensible Markup Language), allowing the easy integration of the test scripts with a number of XML-based tools.
71 Citations
40 Claims
-
1. A method for testing a software package, the method comprising:
-
providing a source-code model of at least some of the intended operations of the software package;
reading the source-code model;
compiling the source-code model into a compiled model;
running the compiled model to generate a state graph;
generating a plurality of test cases by traversing the state graph;
storing the plurality of generated test cases in a markup language; and
reading the stored markup language to run the generated test cases. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer-readable medium having computer-executable instructions for performing a method for testing a software package, the method comprising:
-
providing a source-code model of at least some of the intended operations of the software package;
reading the source-code model;
compiling the source-code model into a compiled model;
running the compiled model to generate a state graph;
generating a plurality of test cases by traversing the state graph;
storing the plurality of generated test cases in a markup language; and
reading the stored markup language to run the generated test cases.
-
-
9. A method for testing a software package, the method comprising:
-
providing a source-code model of at least some of the intended operations of the software package;
reading the source-code model;
compiling the source-code model into a compiled model;
running the compiled model to generate an instance of a grammar;
generating a plurality of test cases by invoking rules of the instance of a grammar;
storing the plurality of generated test cases in a markup language; and
reading the stored markup language to run the generated test cases. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A computer-readable medium having computer-executable instructions for performing a method for testing a software package, the method comprising:
-
providing a source-code model of at least some of the intended operations of the software package;
reading the source-code model;
compiling the source-code model into a compiled model;
running the compiled model to generate an instance of a grammar;
generating a plurality of test cases by invoking rules of the instance of a grammar;
storing the plurality of generated test cases in a markup language; and
reading the stored markup language to run the generated test cases.
-
-
16. A system for testing a software package, the system comprising:
-
a source-code model of at least some of the intended operations of the software package;
a compiler for compiling the source-code model into a compiled model;
a state explorer for generating a state graph from the compiled model;
a traverser for generating a plurality of test cases by traversing the state graph;
a first data store for storing the plurality of generated test cases in a markup language; and
a test executor for reading the stored markup language and for running the generated test cases. - View Dependent Claims (17, 18, 19, 20, 21, 22)
-
-
23. A system for testing a software package, the system comprising:
-
a source-code model of at least some of the intended operations of the software package;
a compiler for compiling the source-code model into a compiled model;
a rule processor for generating a plurality of test cases by invoking rules of a grammar;
a first data store for storing the plurality of generated test cases in a markup language; and
a test executor for reading the stored markup language and for running the generated test cases. - View Dependent Claims (24, 25, 26, 27, 28)
-
-
29. A method for testing a software package, the method comprising:
-
providing a source-code model of at least some of the intended operations of the software package;
reading the source-code model;
compiling the source-code model into a compiled model;
initializing the compiled model into a current state;
randomly selecting one action from a set of actions enabled in the current state of the compiled model;
setting a new current state for the compiled model, the new current state based, at least in part, on the randomly selected action; and
executing the randomly selected action as a test against the software package. - View Dependent Claims (30, 31, 32, 33, 34)
-
-
35. A computer-readable medium having computer-executable instructions for performing a method for testing a software package, the method comprising:
-
providing a source-code model of at least some of the intended operations of the software package;
reading the source-code model;
compiling the source-code model into a compiled model;
initializing the compiled model into a current state;
randomly selecting one action from a set of actions enabled in the current state of the compiled model;
setting a new current state for the compiled model, the new current state based, at least in part, on the randomly selected action; and
executing the randomly selected action as a test against the software package.
-
-
36. A system for testing a software package, the system comprising:
-
a source-code model of at least some of the intended operations of the software package;
a compiler for compiling the source-code model into a compiled model;
a state explorer for initializing the compiled model into a current state, for randomly selecting one action from a set of actions enabled in the current state of the compiled model, and for setting a new current state for the compiled model, the new current state based, at least in part, on the randomly selected action; and
a test executor for executing the randomly selected action as a test against the software package. - View Dependent Claims (37, 38, 39, 40)
-
Specification