Skip to main content Link Menu Expand (external link) Document Search Copy Copied

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

  1. What the package provides
    1. [TestCase]
  2. How tos
    1. Using [TestCase] and [TestSuite] classes

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:

  1. [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].
  2. [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.
  3. [TestSuite] – manages a list of [ITestCase].
  4. [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 interface ITestSuiteBuildable.
  5. [FMTestCaseBuilder] – provides the capability of translating a feature model test case into a TestCase object. To support other test case types (such as [Renault] test case - Var1 = S64 & Var3 = M9), you need to implement the interface ITestCaseBuildable.

How tos

Using [TestCase] and [TestSuite] classes

Examples

TBD