my blog. for you.

Let’s talk digital.

I’m an independent IT consultant and entrepreneur in the Internet and software business. I’m interested in design, enterprise applications, web apps and SaaS products. I design and develop business solutions and applications. I help companies in terms of software quality and knowledge transfer, e.g. with Angular and Spring Boot.

Beyond Built-in: Advanced Testing Techniques for Spring Boot Applications by Michael Vitz @ Spring I/O 2024

Read more

Unit Test Your Spring Architecture With ArchUnit by Roland Weisleder @ Spring I/O 2024

Read more

ArchUnit Spring Integration

ArchUnit is a tremendously useful library for enforcing Java application architecture via unit testing. Fellow software developer and consultant Roland Weisleder recently published a new library called ArchUnit Spring Integration that helps with - well - better integrating ArchUnit with Spring applications. By introducing a DSL, ArchUnit Spring Integration allows you to easily enforce constraints regarding common Spring stereotypes such as @RestController. For example, using ArchUnit Spring Integration you can make sure that methods annotated with @GetMapping (or other HTTP verb mappings, for ... Read more

WireMock Spring Boot

WireMock is an API mocking tool that enables developers to simulate REST APIs during testing. In a system-under-test fashion, it allows us to remove external, potentially flaky, dependencies from our test environment to make our unit tests more focussed and more reliable. WireMock Spring Boot is a new library by consultant and prolific open source contributor Maciej Walkowiak that "drastically simplifies WireMock configuration in a Spring Boot and JUnit 5 application". Featuring a fully declarative WireMock setup and automatic Spring environment setup, ... Read more

Testing with Spring, AOT, GraalVM, and JUnit 5 by Sam Brannen @ Spring I/O 2023

Read more

Things I Wish I Knew When I Started Testing Spring Boot Applications by Philip Riecks @ Spring I/O

Read more

Clearing the Spring Security Context During Unit Testing

Last week I wrote about a minimal Spring Security Context setup for unit testing. I'd like to add just a tiny, yet depending on your use case perhaps quite important, tidbit to that: In case you need to reset a SecurityContext setup, e.g., a mocked user authentication, because, for instance, other test methods from the same unit test class verify behaviour for an unauthenticated application state and hence expect an anonymous user, you can clear the SecurityContext (for example, in your ... Read more

Minimal Spring Security Context Setup for Unit Testing

Creating a minimal Spring Security setup for JUnit unit tests can be a tedious as well as somewhat daunting task. With its Authentication, Principal, GrantedAuthority, and UserDetails classes Spring Security is extremely flexible and configurable and probably accommodates pretty much every authentication and authorization use case under the sun. However, in software architecture such flexibility often comes at price, the trade-off in this case being that simple use cases can require more implementation effort than one would expect. One such use case ... Read more

SCuri: Automating Unit Test Boilerplate Code for Angular Components

As I wrote about quite some time ago in this blog post, which details my solution for managing transitive dependencies for Angular unit tests . although Angular applications in general are easily testable and unit tests are first-class citizens with the framework itself, there's still some potential for improvement when in it comes to test maintainability. In particular, listing and referencing an Angular component's dependencies (i.e. the dependencies of the system under test) such as providers or imported modules can become tedious ... Read more

Revisiting Popular Posts: Spring Batch Resources & Maven Failsafe With Spring Boot

Two of the most popular posts on this blog cover resources for Spring Batch and how to use Maven Failsafe with Spring Boot: Spring Batch Resources: Batch Processing, ETL And Data Conversion Using Maven Failsafe With Spring Boot While doing some regular blog housekeeping, I recently revised those articles and fixed a few broken links. If you're interested in these technologies and frameworks, you might want to check those articles out. Read more
Next Page »