evaluation_engine - ConstantB/ontop-spatial GitHub Wiki

Introduction

To generate all the tests described in the previous page, we created a small program called TestFileGenerator.java. It generates different scenarios as JUnit test cases. The program can be found in the reformulation-core project in the package org.obda.reformulation.dllite.tests. An important note: this program requires an input text file that contains the tables of DL-Lite query answering.

The program reads and parses the input file to create several output files for the purpose of the testing. There are four kinds of output files. The first is the ontology (.owl) files, which is generated using the specified A-Boxes and T-Boxes. The second is the query (.obda) files that contains the specified queries. The third is the expected results (.xml) files that are used to compare the actual results during the test execution. And lastly is the JUnit test file (i.e., ReformulationTest.java) which contains all the test cases.

The parameters

There are five parameters required to run the TestFileGenerator program:

1. the location path to store the generated OWL and OBDA files.

2. the location path to store the generated XML files.

3. the location path to put the JUnit test file.

4. the location path to the input text file (i.e., the tables of DL-Lite query answering).

5. the type of query syntax (i.e., "sparql" and "datalog").

How to run the program

Follow these steps to run the program in Eclipse: 1. Choose "Run" > "Run Configurations".

2. Under "Java Application", crate a new run configuration.

3. In the "Main" tab, pick reformulation-core as the "Project" name and org.obda.reformulation.dllite.tests.TestFileGenerator as the "Main class".

4. Then, switch to the "Arguments" tab and insert the 5 parameters described previously in the "Program arguments" field.

Example:

/tmp/ontology/
/tmp/xml/
/tmp/
/tmp/dllite_completeness_test.txt
datalog

Make sure you have created the corresponding directories and placed the dllite_completeness_test.txt file in the /tmp folder. This file can be downloaded here.

5. Click "Apply" and then click "Run" to execute the porgram.

6. Browse on the /tmp folder to see the outputs.

7. Execute the JUnit test file (by default is ReformulationTest.java).

Note: the JUnit test requires a simple configuration so first open the code and make some adjustments.

⚠️ **GitHub.com Fallback** ⚠️