Testing

In Polypheny, we believe in the importance of comprehensive testing. We have devised three separate test suites to test different aspects of Polypheny-DB. Each of these suits a specific purpose and ensures thorough testing across various platforms and setups.

Matrix

Matrix is the primary test suite and executes all unit tests unless specified otherwise. Tests are performed across various operating systems and Java versions. This exhaustive approach ensures the broadest possible compatibility and reliability of Polypheny-DB across multiple environments.

Docker CI

The Docker CI test suite is designed exclusively for Docker-specific testing. It is not meant to test adapters or other aspects of Polypheny-DB. If you want to add tests to this suite, annotate the class with the DockerManagerTest category, as shown in the following example:

@Category(DockerManagerTest.class)
public class TestClass {

Adapter Matrix CI

The Adapter Matrix CI test suite serves as a comprehensive integration testing tool that allows the execution of tests for all adapters. This suite is particularly useful when developing new adapters or improving existing ones.

To include a new adapter in the testing suite, follow these steps:

  • Add the adapter-specific deployment settings in org.polypheny.db.catalog.Adapter.
  • Create a new class in core/src/test/java/org/polypheny/db/excluded/, following the naming schema [NameOfAdapter]Excluded.
  • Add the name of the adapter to the matrix list in .github/workflows/integration.yml.

Excluding Tests from the Integration Testing Pipeline

Certain tests may not be supported by a particular adapter yet. To exclude such tests from the integration testing pipeline, annotate them with the adapter-specific [NameOfAdapter]Excluded class:

@Category([NameOfAdapter]Excluded.class)
public void testingMethodYourAdapterDoesNotSupport(...

The same annotation can also be used to exclude entire classes:

@Category([NameOfAdapter]Excluded.class)
public class TestClassWhichYourAdapterNotSupports {
© Polypheny GmbH. All Rights Reserved.