AcuityController JUnit Test & Demo Application Overview
A. W. Crapo, last revised 02/22/2005
Copyright General Electric Company 2005, 2006
Introduction
A number of JUnit Tests and small Java demo applications have been implemented to validate and regression test
the AcuityController. Since these tests provide concise examples of
how to use the controller, an overview may be useful. Note that "AllTests"
is a JUnit test suite which runs a set of JUnit tests including tests not
described in this document. It does not necessarily include all of the tests listed below and does not include any of the
demo classes which are not JUnit tests.
Acuity Ontology Validation Tests
These tests check the OWL sub-language of a particular ontology and report any
inconsistencies detected by the Jena validator. The OWL file upon which they act
is included with a brief description. They include:
- com.ge.grc.acuity.ValidateTimeEntryOntology (http://www.isi.edu/~pan/damltime/time-entry.owl,
a simple ontology of time)
- com.ge.grc.acuity.ValidateAcuityUpperLevelOntology (http://research.ge.com/Acuity/aulo.owl,
our own upper-level ontology)
- com.ge.grc.acuity.ValidateProblemVantageFrameOntology (http://research.ge.com/Acuity/apvf.owl,
our ontology of the problem-vantage-frame concepts in support of
work-centered adaptive human-computer interaction)
- com.ge.grc.erp.ValidateAerpDataOntology (http://research.ge.com/Acuity/aerpData.owl, our ontology
of the engine removal planning problem space)
Testing Interaction with Legacy Databases
- com.ge.grc.acuity.GetDBInstancesTest (http://research.ge.com/Acuity/DBInstanceTest.owl);
tests queries which pull data from a MySQL database using instances of
apvf:DBInstancesDescriptor and apvf:hasDBStatementsDescriptor. The MySQL
database must be available as "jdbc:mysql://localhost/test",
userid "mysqluser", password "mysqlpassword". This test
database is included in the AcuityController distribution in the directory
"test"; the directory can be copied to the data directory of a
MySQL installation.
- com.ge.grc.acuity.GetDBInstancesTest2 (http://research.ge.com/Acuity/DBInstanceTest2.owl);
tests queries which pull data from a MySQL database using instances of
apvf:DBInstancesDescriptor and apvf:hasDBStatementsDescriptor and combine
with information in the base ontology. Uses same "test" database
as #1 above.
- com.ge.grc.acuity.LoginTest (http://research.ge.com/Acuity/login.owl); retrieves userids,
passwords, and user roles from a MySQL database. Uses "acuity"
MySQL database, which is provided in the distribution.
- com.ge.grc.acuity.LoginTestUsingDBOntology; similar to LoginTest above except that the
ontology is converted to a RDBMS-based ontology and then the retrieval of
userids, passwords, and roles is performed. Stores the ontology in the MySQL
database "ErfProto", user id and password "erf"/"erf".
Persistent Storage Tests
- com.ge.grc.acuity.NewInstanceStoreTest (http://research.ge.com/Acuity/apvf.owl, creates a
local file instance cache and verifies it's persistence by storing self
instances)
- com.ge.grc.acuity.LocalInstanceStoreTest (same ontology as above and similar except a
temporary instance is created and it is verified that it is not persisted)
- com.ge.grc.acuity.LocalInstanceDatabaseStoreTest (same as the above but using a
database-based ontology model)
Reasoning Tests
- com.ge.grc.acuity.AxiomTest (http://crapo.crd.ge.com/Acuity/axiomtest.owl, inference test of
an instance of WoodFurniture, see discussion)
- com.ge.grc.acuity.AxiomTest2 (http://crapo.crd.ge.com/Acuity/axiomtest2.owl, inference test
of an instance of WoodFurniture differently defined, see discussion)
- com.ge.grc.acuity.MissingInfoExample (http://crapo.crd.ge.com/Acuity/axiomtest3.owl, looks
for missing information about MyTable, see discussion)
- com.ge.grc.acuity.SimpleTest
- com.ge.grc.acuity.SimpleTest2
- com.ge.grc.acuity.Figure5Test
- com.ge.grc.acuity.PizzaTest
-
Ask and Action Tests
The set of tests defined in the Java class com.ge.grc.acuity.AskAndActionTest (which extends
AcuityControllerTest, which extends the JUnit class TestCase) uses the http://crapo.crd.ge.com/Acuity/TestAskAndAction.owl ontology (which imports apvf.owl). Its tests exercise the
AcuityController's various actions and conversion of missing Properties
identified as "askable" into menus of possible answers and actions.
See AcuityController
actions documentation for details.
Misc Application Tests
- CmdLogin (http://research.ge.com/Acuity/login.owl, used in a Java
application to validate a userid and expose the users roles; uses the same
ontology and database as LoginTest and LoginTestUsingDBOntology)