This repository defines a standardized interface for accessing an Exasol database for testing.
That allows you to write tests where you can switch the test-backend.
[!ATTENTION] Since version 3.0.0 only the local deployment works. The AWS mechanism this library was based on does not exist anymore. Future versions will add SaaS and / or Exasol Personal support.
In addition, it contains implementations for this interface for the following test-backends:
- Local - Docker (via Testcontainers)
class MyTest {
private static final ExasolTestSetup EXASOL = new ExasolTestSetupFactory().getTestSetup();
@Test
void test() {
var sqlConnection = EXASOL.createConnection();
//...
}
@AfterAll
static void afterAll() {
EXASOL.close();
}
}The ExasolTestSetupFactory in the example returns a test setup based on a local running Exasol-Testcontainer.
You can also select a specific test-setup in code. For that simply replace new ExasolTestSetupFactory().getTestSetup() by new ExasolTestcontainerTestSetup().
To change the Exasol Docker DB version being used you can define the com.exasol.dockerdb.image system property, e.g: mvn verify -Dcom.exasol.dockerdb.image=${{ matrix.docker_db_version }}.