Warning:
This wiki has been archived and is now read-only.

Creating and browsing test cases

From OWL
Jump to: navigation, search

This page is outdated. Tests are now maintained at http://owl.semanticweb.org. Please see the documentation there on how to create, edit, and download test cases.

Test cases of the OWL WG are managed within this wiki, using one page per test case. To add new test cases, it is enough to create an according wiki page. A template simplifies this process. This page describes how to use the template, gives examples, and provides wiki code snippets that can be copied to start making new test cases. Note, however, that test cases created in this wiki are not automatically included into the test case document – see Test for information on how the working group decides about the approval or rejection of individual test.

Existing test cases and examples

The wiki automatically creates lists of existing test cases:

The page User:MikeSmith#Test_Cases also lists many examples.

Creating new test cases

The template TestCase is used to create new test cases. To create a new page, enter its name into the search field on the left, and select "create this page" if no results were found. Test cases currently have names starting with "Testcase:", typically followed by a short id. Names can be changed afterwards easily.

Using the template TestCase

The template TestCase accepts the following parameters:

description

  • Description of test case

author

  • The name of the author. It will automatically be linked to a wiki page. It makes sense to create minimal stub pages even for people outside the WG, so that red links always indicate typos. To allow different spellings, use a wiki redirect like this.

issue

  • An issue number from tracker, it will be turned into a link.

syntax

  • The format of the input ontologies, must be one of "functional", "rdfxml", or "owlxml".

consistent-ontology

  • Input ontology for consistency test or premise ontology for entailment and non-entailment tests.

inconsistent-ontology

  • Input ontology for inconsistency test.

conclusion-ontology

  • Conclusion ontology for entailment tests.

nonconclusion-ontology

  • Non-Conclusion ontology for non-entailment tests.

dl

  • Must be either 0 or 1. 1 if input ontology is syntactically DL. 0 else.

ql

  • Must be either 0 or 1. 1 if input ontology is syntactically DL-Lite. 0 else.

el

  • Must be either 0 or 1. 1 if input ontology is syntactically EL++. 0 else.

rl

  • Must be either 0 or 1. 1 if input ontology is syntactically OWL-R. 0 else.

semantics

  • Should only be used for tests which illustrate the differences between DL and Full semantics. If used, must be either "DL" or "FULL".

alternative-semantics

  • Should be used if and only if semantics is used, value should be id of test demonstrating the alternative semantics.

Cut And Paste Bits

Consistency Test Case (Functional Syntax)

{{TestCase
| description=
| author=
| issue=
| dl=
| ql=
| el=
| rl=
| syntax=functional
| consistent-ontology=

Namespace( ex = <http://example.org/ontology> )
Ontology(
)

}}

Inconsistency Test Case (RDF/XML Syntax)

{{TestCase
| id=
| description=
| author=
| issue=
| dl=
| ql=
| el=
| rl=
| syntax=rdfxml
| inconsistent-ontology=

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xmlns:ex="http://example.org/ontology#"
  xml:base="http://example.org/ontology#" >
</rdf:RDF>

}}

Entailment Test Case (RDF/XML Syntax)

{{TestCase
| description=
| author=
| issue=
| dl=
| ql=
| el=
| rl=
| syntax=rdfxml
| consistent-ontology=

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xmlns:ex="http://example.org/ontology#"
  xml:base="http://example.org/ontology#" >
</rdf:RDF>

| conclusion-ontology=

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:ex="http://example.org/ontology#"
  xmlns:ex="http://example.org/ontology#"
  xml:base="http://example.org/ontology#" >
</rdf:RDF>

}}

Non-Entailment Test Case (Functional)

{{TestCase
| description=
| author=
| issue=
| dl=
| ql=
| el=
| rl=
| syntax=functional
| consistent-ontology=

Namespace( ex = <http://example.org/ontology> )
Ontology(
)

| nonconclusion-ontology=

Namespace( ex = <http://example.org/ontology> )
Ontology(
)

}}