-
- Infrastructure
- Technical
-
-
-
- Questions
-
- Organization
-
- More Labs
Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
There exists one test project for each cultivate project. Additionally you need to checkout the cultivate.test project, which contains common files for all tests. The following directories may exist in each project:
For writing prolog tests take a look at the MisnamedTestCaseTest example in cultivate.basic.test:
Creation of a new test consists of 4 steps:
First you need to write your testdata. Do this by creating a new testdata-* src folder and adding it to the build path. Now write your packages and classes. Afterwards you must run the generator-factbases-project.launch via the eclipse launcher menu. This will create the file *.qlf in the factbases directory. Now you can write your test by extending the AbstractPrologTestCase. It will automatically consult the prolog file prolog/load.pl of your project. Additionally you have the following helper methods to use:
resources
folder
For executing predicates in a changing context, the ContextualPredicate
class is provided. it supports the following methods:
Context
IMPORTANT: Before you can run your tests with JUnit you have to alter cultivate.test/src/org.cs3.cultivate.test.framework/test.properties to match the correct paths.