Ihor Rybak, Author of DevGuidance  Ihor Rybak

Java Full-Stack Software Engineer, Author of DevGuidance.com

RDMSs Isolation Level Comparison

Isolation level analyser This tool was developed for getting results for this article. Which generates such tables per each implementation of this interface. import org.hibernate.dialect.Dialect; import org.hibernate.dialect.PostgreSQL95Dialect; import org.springframework.stereotype.Component; import org.testcontainers.containers.JdbcDatabaseContainer; import org.testcontainers.containers.PostgreSQLContainer; @Component public class PostgreSQL14 implements DatabaseToAnalyze { @Override public JdbcDatabaseContainer<?> createContainer() { return new PostgreSQLContainer<>("postgres:14"); } @Override public Class<? extends Dialect> getDialect() { return PostgreSQL95Dialect.class; } } You can view all results here https://jrybak23.github.io/isolation-levels-analyzer/. Results may not be 100% correct!...

April 7, 2022

AWS S3 Java integration testing

Introduction Similarly to the previous article about integration testing , this one describes how to set up it for AWS S3 using LocalStack and Testcontainers. Here is the link to the repository with simple CRUD app and the complete example of S3 testing . Dependencies Besides, standard Quarkus dependencies here are libraries that are used specifically for S3 testing setup. <dependencies> <dependency> <groupId>io.quarkiverse.amazonservices</groupId> <artifactId>quarkus-amazon-s3</artifactId> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>url-connection-client</artifactId> </dependency> <!-- Required by testcontainers....

February 7, 2022

Integration testing setup for Java REST API applications with database persistence

Introduction This article is about how to set up step-by-step integration testing for the REST API app that persists data to the SQL database. Also, the idea may be applicable also for NoSQL DB testing. The application is simplified as much as possible, as the purpose of the article is to give the idea of proper integration testing. The repository link with the complete example is available here. Database provisioning for integration testing using Testscontainers By default, Quarkus configured to automatically provision backing services in the Docker using Testcontainers....

January 24, 2022