Skip to content

exasol/exasol-test-setup-abstraction-java

Repository files navigation

Exasol Test Setup Abstraction

Build Status Maven Central – exasol-test-setup-abstraction-java

Quality Gate Status

Security Rating Reliability Rating Maintainability Rating Technical Debt

Code Smells Coverage Duplicated Lines (%) Lines of Code

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)

Usage

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 }}.

Information for Users of This Library

Information for Developers of This Library

About

Common interface for testing with an Exasol database in local and AWS environments using Java.

Topics

Resources

License

Security policy

Stars

1 star

Watchers

6 watching

Forks

Contributors

Languages