GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - exasol/test-db-builder-java: Java library for creating and cleaning up test database structures and contents for integration tests

BranchesTags
Open more actions menu

Latest commit

 

History

121 Commits
121 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.mvn/wrapper
.mvn/wrapper
 
 
.settings
.settings
 
 
.vscode
.vscode
 
 
doc
doc
 
 
src
src
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.project-keeper.yml
.project-keeper.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
dependencies.md
dependencies.md
 
 
error_code_config.yml
error_code_config.yml
 
 
mvnw
mvnw
 
 
mvnw.cmd
mvnw.cmd
 
 
pk_generated_parent.pom
pk_generated_parent.pom
 
 
pom.xml
pom.xml
 
 
versionsMavenPluginRules.xml
versionsMavenPluginRules.xml
 
 

Repository files navigation

Test Database Builder Java

Build Status Maven Central – Test Database Builder for Java

Quality Gate Status

Security Rating Reliability Rating Maintainability Rating Technical Debt

Code Smells Coverage Duplicated Lines (%) Lines of Code

Overview

Exasol's Test Database Builder for Java (TDBJ) is a library that makes writing integration tests for database applications easier.

The main design goals are to make the code of the integration test compact and readable at the same time.

In a Nutshell

import com.exasol.dbbuilder.dialects.DatabaseObjectFactory;

class OnlineShopIT {
    final static DatabaseObjectFactory factory;

    @BeforeAll

    static void beforeAll() {
        // ... get a JDBC connection and store it in variable "connection"
        factory = new ExasolObjectFactory(connection);
    }

    @Test
    void testShopItemList() {
        // Test preparation in the database:
        final Schema schema = factory.createSchema("ONLINESHOP");
        final Table table = schema.createTable("ITEMS", "PRODUCT_ID", "DECIMAL(18,0)", "NAME", "VARCHAR(40)")
                .insert("1", "Cat food")
                .insert("2", "Toy mouse");
        final User user = factory.createUser("KIMIKO")
                .grant(CREATE_SESSION)
                .grant(table, SELECT, UDPATE);
        // ... the actual test
    }
}

For more details, please refer to the user guide.

What it is

This module is designed to be used in test code. It helps you write tests, quickly, easily while still focusing on readability.

What it isn't

TDBJ is not suited for production code. We sacrifice speed and features for compactness and ease-of-use. If you are looking for code that helps writing production code, please refer to

  • SQL Statement Builder

Supported Databases

  • Exasol
  • MySQL
  • PostgreSQL

Features

  • Create: schemas, tables, adapter scripts, users, connection definitions, virtual schemas
  • Grant privileges to users
  • Insert data into tables

Customer Support

This is an open source project which is written by enthusiasts at Exasol and not officially supported. We will still try to help you as much as possible. So please create GitHub issue tickets when you want to request features or report bugs.

Table of Contents

Information for Users

  • User Guide
  • Changelog
  • Dependencies

About

Java library for creating and cleaning up test database structures and contents for integration tests

Topics

builderdatabaseexasolexasol-integrationintegration-testingjavamysqlmysql-databasepostgrespostgresqlpostgresql-database

Resources

Readme
MIT license

Security policy

Security policy
Activity
Custom properties

Stars

2 stars

Watchers

4 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.