Understanding the Solution

Visual Studio populates the new static model solution with three projects as follows in Solution Explorer.

Solution Explorer View1

These projects constitute a minimal sample solution which allows you to run all phases of model exploration, test generation, and test execution. You can modify these according to your needs. The names for these projects are the wizard defaults that you can override during the earlier dialogs of the Spec Explorer Model Wizard.

The skeleton sample provided in this static modeling solution is a simple adder/readout program. Numeric values can be added to a counter, or the counter can be read-out and reset.

  1. Project SpecExplorer1 contains the model. The model comprises two files: a C# file, AccumulatorModelProgram.cs, containing the model program, and a configuration file, Config.cord, that works in conjunction with the model program to configure and control Spec Explorer operation on behalf of exploring and testing the model. For your own solutions, the model project can have more than one C# file to define the model program. The model project can also contain more than one Cord configuration file, although this is not usually necessary.

  2. Project SpecExplorer1.Sample contains a skeleton sample of an implementation under test. For your own solutions, this project can contain either the actual implementation code, or a test adapter which connects to the implementation code. In the solution we are examining here, the SpecExplorer1.Sample project contains some actual implementation code. In file Accumulator.cs is a dummy implementation of an Accumulator class that is hard-coded to not conform to the model expressed in the SpecExplorer1 model project. This intentional non-conformity forces a testing failure for exposition purposes.

  3. Project SpecExplorer1.TestSuite provides the test suite in the form of a VSTT unit test project, contained in AccumulatorTestSuite.cs. This file is empty when the solution is created, as test code hasn’t been generated yet. This file will be overwritten by the test generation process.

See Also

Concepts

Using Spec Explorer for the First Time