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:
- Instructions on checking out
and setting up the test case project, "TestSadlIde"
- An overview
of some of the test cases that may be of interest as demonstrations
Note: you may need to have a SourceForge account to check these files out
from the repository.
- From the Eclipse Window pulldown menu, select "Window -> Open Perspective
-> CVS Repository Exploring"
- Right-click anywhere in the "CVS Repositories" pane and select "New ->
Repository Location..."
- Fill in the required information
- Host: sadl.cvs.sourceforge.net
- Repository path: /cvsroot/sadl
- Your username and password
- Connection type will depend upon if you are behind a firewall
- Click "Finish"
- Expand the resulting CVS Repository listing: ... -> HEAD -> SadlModels
- Right-click on TestSadlIde and select "Check Out"
- 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.
- 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.
- 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.
- 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.)
- Test results should appear in the console window.
- 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".
The following SADL model files illustrate useful features of semantic
modeling in OWL/SADL.
- negation.sadl -- shows negation in rules, tests, and queries
- NotKnownTest.sadl -- shows a test against the value "not known".
- 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.