In 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 MoreHow to Measure Test Coverage in Invoker Tests with JaCoCo
May 31, 2021 · 2 min read · maven test-report integration-testing maven-plugin maven-plugin-testing maven-invoker-plugin jacoco test-coverage ·During the development of the P2 Maven Plugin, I wanted to get an overview about the test coverage of the code. The tests of this plugin can be divided in two groups: Unit tests, that is written with Java, Groovy and JUnit; integration tests, that is written with Maven Invoker Plugin JaCoCo is the defacto standard …
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 MoreSome weeks ago, I gave a workshop about Ansible and I was asked how to set up a local test environment for Ansible. Requirement is that this test environment can run on a Windows 10 without a Linux subsystem. I don't why, but it was not my first customer where Windows 10 could not be used with Linux subsystem (Don't …
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 MoreIf you introduce code formatting rules retroactively, you have to solve the problem how to format existing code base according to the new formatting rules. You could checkout every code repository one by one in your IDE and click on Autoformat the whole project. But this is boring and waste of time. Fortunately, …
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 MoreGuest Contribution by Markus Jenderek "Quality exists when the price is long forgotten", said Mr Royce to Mr Rolls with his petrol smeared face or Mr Rolls to Mr Royce - but anyway. The question is about which price is he talking about? Money, yes of course! But what about Pain, Features, Competition, Time, …
Read More