is a model-based testing and analysis framework for model programs written in C#. It is explained and used in the book
Model-based Software Testing and Analysis with C#
In constrast with conventional unit testing, where a test engineer must code each test case,
is recommended where so many test cases are needed that it would be infeasible to code them all by hand. It is especially indicated for testing behaviors with data- and history-dependence and nondeterminism, where many different variations
(data values, interleavings etc.) should be tested for each scenario (or use case). Model-based testing has been applied to communication protocols, web applications, embedded control systems, and graphical user interfaces.
The NModel release includes:
The library also exposes the functionality of mpv
and more, so you may write your own tools which are more closely adapted to your environment, or which provide other capabilities.
To use NModel, you must write your own
in C# that models your implementation. Then you can use the
tool to visualize and analyze the behavior of your model program, in order to confirm that it behaves as you intend, and to check for design errors. To execute tests using the test runner
, you must write a test harness
in C# that couples your implementation to the tool. (The implementation does not have to be written in C# and does not have to use .NET.) You can use the test generator
to create tests from your model program in advance, or let
generate the test on-the-fly
from your model program as the test run executes. If you wish, you can write a custom
in C# that ct
uses to maximize coverage according to criteria you define. To express
, you can dispense with C# and write simple finite state machines
(FSMs), then use
to achieve scenario control
during testing or to check
during analysis. You can build up model programs from separate
or use composition to combine model programs in a well-structured way.
A good way to get started is to
, download the reference manual and samples from
, and try some of the
NModel requires .NET, but does not require Visual Studio.
NModel pages at Codeplex:
NModel pages elsewhere:
- PyModel: model-based testing in Python