The Roman theatre in Bosra by Alessandra Kocman This is the second part of the post series dedicated to quality of automated tests. In the previous part I wrote about test names and granularity. Today I am going to focus on test data setup, its readability and how it is related with the evolution of … Continue reading "Storytelling with tests #2: setting up the stage"
Read MoreCategory: Java
Going native: enabling Specification Argument Resolver for GraalVM
In one of the previous articles, we described the GraalVM native image technology. The main motivation of the previous article was our willingness to evaluate technology in context of usage in our apps in the future. However, there is one additional motivation which stands behind our interest in this topic, the open source project maintained … Continue reading "Going native: enabling Specification Argument Resolver for GraalVM"
Read MoreSuper-fast Java with Spring Boot Native
Above the horizon of the Java ecosystem, a new star called “GraalVM” has started to shine. Are you tired of slow startups of your Java microservices, i.e. the time from starting the process to the service readiness seems to be too long? You have come to the right place. We decided to evaluate GraalVM by … Continue reading "Super-fast Java with Spring Boot Native"
Read MoreSpring Tips #2: Layered JARs with Spring Boot 2.3
Sample code referred in this article is available on GitHub. Using Docker containers for deployment of Java applications becomes more and more popular these days. To ship a new version of application you just build a Docker image with new version of JAR file and push it to the repository, so the deployment team can … Continue reading "Spring Tips #2: Layered JARs with Spring Boot 2.3"
Read MoreScaling down microservices
Microservice architecture became very popular in the last years. This approach has a lot of benefits, which are widely praised at conferences. Unfortunately, it is very common to forget about the problems and difficulties we may encounter. Those who know me a little, know that I have always been skeptical of this approach. In this … Continue reading "Scaling down microservices"
Read MoreSpring tips #1: structuring configuration for integration tests
Spring comes with a lot of features which support integration testing. We have MockMvc, TestRestTemplate and many other useful utilities. Nevertheless, building a proper test context for our app rests in our hands, and there are some pitfalls along the road. In today's article I would like to show you how to avoid one of them
Read MoreDecorating Spring @Components
It is a common situation when an existing Spring component requires some extensions. We have to add new functionality to the existing application. I would like to share my experience on how to deal with such situations in order to keep the application code clean and maintainable.
Read MoreWhen two beans collide
Today I would like to tell you about one mechanism of Spring IoC container that I think is a bit less known amongst programmers. We were not aware of it and it had caused us a bit of confusion lately. It seemed at first as if one of our beans had somehow disappeared.
Read MoreCustom fluent assertions with AssertJ
More often than not, developers put much less attention to the test code than to the production code. Libraries and frameworks, fluent APIs or just clean code in general are terms we usually connect with actual production code and not with tests. But investing some time to use them in test code can pay off very quickly.
Read MoreSome short thoughts on strategy pattern
Strategy is one of the most useful design patterns, which allows us to change algorithms or implementations of an operation during runtime. Typical use cases include validating or parsing data depending on some decisions made on the fly. And although the pattern is widely described in various sources and well known amongst programmers I think there is still a missing part in great number of examples we can find. Let me explain what I have in mind…
Read More