Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Moved to Testcase Generator

...

This test checks the operators and transformation rule of the probabilistic feature. The test consists of all relational operators and tests for the correct estimation of stochastic models.

test.component.jira

This test checks reported issues. Each test is named after a JIRA issue to make sure the reported issue remains fixed in future releases.

Creating New Test Components

...

  • Create a new bundle using the naming convention "de.uniol.inf.is.odysseus.test.component...."
  • add odysseus.core, odysseus.core.server and odysseus.test to the required plugins
  • Add a new class and inherit from one the following abstract classes:
    • AbstractTestComponent for a very basic test component
    • AbstractQueryTestComponent for a test component that should install a query
    • AbstractQueryExptectedTestComponent for a test that should compare the query results with an expected output by automatically adding TICompareSinks (look above under "Testing behavior").
  • Implement the needed methods
    • The createTestSets should return the list of sub tests that should be executed by the test component. The type of the test set depends on the type you choose before. So, if you used AbstractQueryTestComponent, you have to return a list of QueryTestSet, which contains the query to be executed. You can use the TestSetFactory class. It offers some methods to search and create test sets.
    • You can override the getName to name the test component.
  • create a service component description for the test component class (which inherits from on the abstract classes). It has to provide the "ITestComponent" service.
  • additionally, you have to check for lazy loading, so that your bundle is not started if one class is needed.
  • Look also at the tips from "Adding new Queries" above.
  • If the tests should run periodically, add the the component to de.uniol.inf.is.odysseus.test.feature.

Testcase Generator

The testcase generator is a RCP view to generate testcases for operators. You can create a new testcase by using the Testcase Wizard. The wizard will create a template for a testcase as show in the figure below.

Image Removed

 

In the testcase editor you can select the operator, define the schema for each input port and parameters for the operator. The schema definition consists of the attribute names, their datatypes and their min and max values. In addition you can select the used metadata in the testcase. After storing the configuration, click on the generate button and the tool will generate an integration test for each metadata configuration using the operator parameter settings. The min and max values for the schema attributes are used to create an input file for the testcase by creating a permutation of possible values (if the Null checkbox is selcted, the permutation will include NULL attribute values). An example of a generated integration test is shown below:

 

Code Block
languagejs
/// Odysseus Testcase: MyTestcase
/// Operator: ASSUREORDER
/// Date: Sun Apr 26 00:53:35 CST 2015
/// User: ckuka
/// Parameter: 
///  SUPPRESSPUNCTUATIONS: 
///  NAME: 
///  DESTINATION: 
///  ID: 
///  DEBUG: true
#PARSER PQL
#DROPALLSOURCES
#DROPALLQUERIES
#METADATA TimeInterval
#RUNQUERY
input0 = ACCESS({
    source='source',
    wrapper='GenericPull',
    transport='file',
    protocol='SimpleCSV',
    dataHandler='Tuple',
    options=[
        ['filename', '${BUNDLE-ROOT}/input0.csv'],
        ['csv.delimiter', ';'],
        ['csv.trim', 'true']
        ],
    schema=[['Attribute2', 'Double']]})
output = ASSUREORDER({DEBUG=true}, input0)

 

 Moved to Testcase Generator