When your Java application wants to communicate with a server that used self-signed certificate, you get very often a javax.net.ssl.SSLHandshakeException, because the validation of self signed public key fails. It is possible to ignore this validation. But this is not recommended because of it simplifies a …
Read MoreIn this blog post, I'd like to show how to integrate Testcontainers in Spring Boot tests for running UI tests with Selenium. Why Testcontainers? Testcontainers is a library that helps to integrate infrastructure components like Selenium or databases in integration tests based on Docker Container. It helps to avoid …
Read MoreTest Coverage Reports For Maven Projects In SonarQube 8.3.x
Jun 10, 2020 · 5 min read · integration-testing jacoco maven sonarqube test-coverage test-report unit-testing ·Some years ago I write a blog post about how to generate test reports in SonarQube separate in test report for unit tests and for integration tests. Since SonarQube 6.2 the test report isn't separate in these categories any more (see SonarQube's blog post). SonarQube merges all test reports to one test report with an …
Read MoreUsing Testcontainers in Spring Boot Tests For Database Integration Tests
In this blog post I'd like to demonstrate how I integrate Testcontainers in Spring Boot tests for running integration tests with a database. I'm not using Testcontainers' Spring Boot modules. How it works with them, I will show in a separate blog post. All samples can be found on GitHub. Why Testcontainers? …
Read MoreThis blog post wants to show another approach how to implement the Strategy Pattern with dependency injection. As DI framework, I choose Spring framework From Wikipedia Firstly, let's have a look how the Strategy Pattern is implemented in the classic way. As starting point, we have a HeroController that should add …
Read MoreI create a sample Groovy project for Maven, that mixes Spock tests and JUnit 5 tests in one project. In the next section I'll describe how to set up such kind of Maven project. Enable Groovy in the Project First at all, you have to enable Groovy in your project. One possibility is to add the GMavenPlus Plugin to your …
Read MoreThis post demonstrates how JUnit 5 can be used in pre-Java 8 projects and explains why it could be a good idea. JUnit 5 requires at least Java 8 as runtime environment, so you want to update your whole project to Java 8. But sometimes there exists reason why you can't immediately update your project to Java 8. For …
Read MoreJersey has a great possibility to write integration test for REST-APIs, written with Jersey. Just extend the class JerseyTest and go for it. I ran in an issue, where I had to mock a SecurityContext, so that the SecurityContext includes a special UserPrincipal. The challenge is that Jersey wraps the SecurityContext in …
Read MoreI'd like to share some of my thoughts about my approach to solve the Gilded Rose Refactoring Kata by Emily Bache. If you don't know this kata, read the description for a better understanding. I have published my whole solution on GitHub . I tried to make a commit after every step, so you can keep track of my steps in …
Read MoreMy Notes From Conference "Herbstcampus 2015"
Nov 22, 2015 · 1 min read · cobol conference hc15 herbstcampus herbstcampus2015 notes software architecture software documentation solid design team building technical debt ·In September I visited the conference "Herbstcampus" in Nuremberg. I took notes about some sessions, that I like to share with you. The notes are in German. SOLIDes Design - Kriterien für objektorientiertes Design by David Tanzer Wie geht's? Was geht? Wann hat es Sinn? - Portierung von COBOL-Programmen …
Read More