TestCase and TestSuite
v1.3.9-alpha-54
- groupID
- at.tugraz.ist.ase
- artifactID
- cdrmodel-v2
In Knowledge Base Enginering, test cases are used to induce conflicts in the knowledge base. CA-CDR-V2 provides also Test Case Driven Algorithms [4]. Thus, cdrmodel-v2 provides base classes for managing test cases and test suites.
For more details related to knowledge base test cases, we refer to [4] in References.
Table of Contents
What the package provides
[TestCase
]
A test case is a conjunction of assignments, e.g., A=a1 & B=b3 & C=c2 & ...
,
where A=a1
is an assignment, ‘&’ represents an AND operator.
To feature models, test cases are simpler, e.g., A & ~B & C
,
where A
represents A=true
and ~B
represents B=false
.
A test suite is a set of test cases.
cdrmodel-v2 provides the following classes:
- [
ITestCase
] – an interface that defines which functionalities every type of test case needs to support. In another project, I have a new type of test case called [AggregatedTestCase
]. - [
TestCase
] – a test case that manages a list of assignments, a corresponding list of Choco constraints, and maybe a corresponding list of negative Choco constraints. - [
TestSuite
] – manages a list of [ITestCase
]. - [
TestSuiteBuilder
] – provides a function (buildTestSuite
) that reads a test suite from a test suite file. A test suite file will contain a total number of test cases in the first line and each test case written in other lines. If you need to support other structures of test suite files, you need to implement the interfaceITestSuiteBuildable
. - [
FMTestCaseBuilder
] – provides the capability of translating a feature model test case into aTestCase
object. To support other test case types (such as [Renault] test case -Var1 = S64 & Var3 = M9
), you need to implement the interfaceITestCaseBuildable
.
How tos
Using [TestCase
] and [TestSuite
] classes
Examples
TBD