To define a new Quality Rule Model, use the File > New Quality Rule Model toolbar option or right click the blank Main window (Model tab) and select New Quality Rule Model. A dialog box will then be displayed enabling you to define the new model:

Model nameEnter a name for your Model - this simply identifies the Architecture Model to you.

Click OK to complete the creation of the Architecture Model. Please see CAST Architecture Checker - creating an example Quality Rule Model from A to Z for more information about how to create a model.

You should also use the Save option (see Toolbar for more information) to save your model as a .CASTArchitect file for future re-use.

When a Quality Rule Model is created, two default Sets called Scope and Violations are automatically initialized:

  • These two Sets cannot be removed or renamed
  • Quality Rule Models support only the creation of additional Sets of objects (the creation of custom Layers and Dependencies between items is not supported).

The two Sets are used as follows:

Scope

The default Scope set defines the "scope" of objects that will be tested by this Quality Rule Model.

For example you may want to test some aspect of the Java Methods in your Application, then you should use this set to define these objects, either directly, or through another Set. You can then define additional blocks to create "conditions" - i.e. all Java Methods, except those which are named in a specific way.

You are free to configure this set exactly as you want.

Violations

The default Violations set defines the the objects that will appear as Violations. By default, the objects defined by the default Scope set will always be included, however, you can then define additional "blocks" to create "conditions.

For example, you may want to test whether the Java Methods in your Application directly access objects in a database, such as a Stored Procedure. In this case, the Java Methods are already included (via the Scope set), so you will need to define an additional "block" which creates an AND condition, i.e. all Java Methods which ALSO access Stored Procedures directly.

  • This set can only have one selection criterion, it is not possible to add another selection criterion, however, it is possible to have many conditions (blocks) in the same selection criterion.
  • The member-of Scope block can not be removed / edited / replaced.
  • If there is no other sets configured, it is not possible to add another member-of block to this section as the only set is already used (the default Scope set).