Skip to main content

Database testing

Use SHAFT database actions to open a JDBC connection, execute statements, and attach query evidence to the test report.

See database actions, connection strings, and the Oracle setup.

SHAFT.DB database = new SHAFT.DB("jdbc:h2:mem:test");
ResultSet rows = database.executeSelectQuery("SELECT 1");

SHAFT.Validations.assertThat().object(rows).isNotNull();