SADL IDE Test Cases

A suite of test cases for the SADL IDE are contained in a project on SourceForge. These test cases both validate that the IDE is functioning as expected and provide illustrations of various SADL capabilities. This document consists of two parts:

  1. Instructions on checking out and setting up the test case project, "TestSadlIde"
  2. An overview of some of the test cases that may be of interest as demonstrations

Installing the SADL Test Cases from SourceForge CVS Repository

Note: you may need to have a SourceForge account to check these files out from the repository.

  1. From the Eclipse Window pulldown menu, select "Window -> Open Perspective -> CVS Repository Exploring"
  2. Right-click anywhere in the "CVS Repositories" pane and select "New -> Repository Location..."
  3. Fill in the required information
  4. Expand the resulting CVS Repository listing: ... -> HEAD -> SadlModels
  5. Right-click on TestSadlIde and select "Check Out"
  6. If the project does not build (convert sadl model files to owl model files) automatically, make sure that "Build Automatically" is checked on the Project dropdown menu from the menu bar. You may use the Project -> Clean to rebuild the project. Note that some errors are to be expected in the ManualTests folder as part of the test suite is to make sure errors are detected.
  7. To run tests in a particular model, click on the plus sign (+) in front of the project name in the Eclipse Navigator to expand the project, then on plus sign in front of the "Test" directory name.
  8. Double click on any .sadl file to open the file. The first time you open a .sadl file you will be prompted to add the Xtext nature to the project. Answer yes.
  9. Right-click on the file name in the Project Explorer pane, then select "SADL Actions -> Test Model" on the popup action menu. Alternatively, with the focus on the editor window, press <alt-shift-t> to run tests. (Use <alt-shift-r> to bring up a query window.)
  10. Test results should appear in the console window.
  11. To run a suite of tests, e.g., AutoTests1.test in the Tests folder, right-click on the file name, then select "SADL Actions -> Run Test Suite".

An Overview of Some SADL Test Cases in TestSadlIde

The following SADL model files illustrate useful features of semantic modeling in OWL/SADL.

  1. negation.sadl -- shows negation in rules, tests, and queries
  2. NotKnownTest.sadl -- shows a test against the value "not known".
  3. Shapes folder contains a set of models that use aggregation to compute surface areas of 3D shapes, converts areas in one unit to areas in another unit, etc.

Other capabilities are not yet documented. Feel free to examine SADL files in the TestSadlIde project. The names are somewhat indicative of the model content. Note that some models require that OWL reasoning at various levels be enabled. Such models usually have comments to that effect in the input and/or in the console output generated by running the tests in the model.