Offline Test Generator
Usage Examples OptionsGenerates an offline test suite that achieves
link coverage of the
finite state machine (FSM) generated from a
model program. The test suite can then be executed by the
Conformance Tester,
ct. For example, the command
otg /r:PowerSwitch.dll PowerSwitch.Contract.Create
generates the test suite
TestSuite(TestCase(PowerOn(),PowerOff()))
It is typical to compose a
scenario expressed as an FSM with a
contract model program in C# in order to limit the size of the generated FSM.
Usage
otg [/reference:<string>]* [/mp:<string>]* [/file:<string>]* [/append[+|-]]* [/fsm:<string>]* <model>* @<file>
Examples
otg @otg_args.txt
otg /r:ClientServer.dll ClientServer.Factory.Create /fsm:Scenario.txt
otg /r:ClientServer.dll /mp:ClientServer /fsm:Scenario.txt
otg /r:ClientServer.dll ClientServer.Factory.Create /file:ContractTest.txt
otg /r:ClientServer.dll /mp:ClientServer /file:ContractTest.txt
Options
/?, /helpDisplays usage information and exits.
[/reference:<string>]* Referenced assemblies. (Short form:
/r)
[/mp:<string>]* Model programs given in the form
M or
M[F1,...,Fn] where
M is a model program name (namespace) and each
Fi is a feature in
M. Multiple model programs are composed into a product. No factory method is needed if this option is used.
[/file:<string>]*File where test suite is saved. The console is used if no file is provided. (Short form:
/f)
[/append[+|-]]*If false the file is overwritten, otherwise the generated test suite is appended at the end of the file. Default value: ``
-'' (Short form:
/a)
[/fsm:<string>]*File name of a file containing the term representation
fsm.ToTerm() of an
fsm (object of type FSM). Multiple fsms are composed into a product.
<model>*Fully qualified names of factory methods returning an object that is an instance of
ModelProgram. Multiple models are composed into a product. No factory method arguments are needed if the
/mp: option is used instead.
@<file>Read response file for more options.