JMeter DSL: How to Load Test from your code

Performance testing is crucial in ensuring the reliability and scalability of software systems. However, traditional approaches to performance testing often treat it as a separate phase, leading to delayed feedback and issues surfacing late in development. Continuous Performance Testing aims to address this by integrating performance tests into the development pipeline, providing early insights into … Read more

Getting started with JUnit 5 TestSuite

JUnit 5 provides powerful features for organizing and running tests efficiently. Test Suites, a collection of tests bundled together, allow you to execute multiple test classes or methods in one go. In this article we will show a step-by-step guide to create a JUnit 5 TestSyite with some practical examples. How to declare a JUnit … Read more

Testing JPA with TestContainers

Testcontainers is an open-source Java library that simplifies integration testing by providing lightweight, disposable containers for database systems, message brokers, and other third-party services. In this article we will learn how to combine Testcontainer with a JPA/Hibernate Test case.

Read more

How to fix “No ParameterResolver registered for parameter”

The error message you’re encountering, “No ParameterResolver registered for parameter x” is due to the incorrect usage of annotations in the JUnit 5 test.

In JUnit 5, @ParameterizedTest is used to indicate that the annotated method is a parameterized test. However, it seems like in your code snippet, the @ParameterizedTest annotation is mistakenly combined with @Test, causing confusion in the framework.

Here’s a step-by-step tutorial on how to fix this issue:

Read more

How to solve CVE-2023-44487

The CVE-2023-44487 vulnerability can be exploited by multiplexing requests through the HTTP/2 protocol and rapidly resetting the streams. This chain of events will result in high server resource consumption and eventually cause a Denial of Service. Let’s see which packages are affected and the current resolution or mitigation of the issue. HTTP/2 RESET of Connections … Read more

How to Test Private Methods with JUnit

When writing unit tests, the best practice is to test public methods, as they are the entry points to your classes and provide the intended behavior to external consumers. Testing private methods, on the other hand, is often considered an implementation detail and not directly exposed to the external API. In this article, we will discuss why testing private methods is not generally a good option and explore an approach to test them using JUnit 5.

Read more