How to wait in Java with Awaitility

Testing asynchronous operations in Java can be challenging, especially when working with microservices, reactive applications, and event-driven architectures where you need to wait for conditions to become true without using unreliable Thread.sleep() calls. Awaitility is a lightweight Java library that simplifies waiting in your tests, allowing you to write clear, fluent, and robust asynchronous tests. In this updated guide, you will learn how to use Awaitility for testing Java, Spring Boot, Quarkus, and Jakarta EE applications, with practical examples aligned with modern testing practices for cloud-native environments and CI/CD pipelines.

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

Getting Started with Testcontainers for Java

Introduction In modern software development, it is crucial to write robust and reliable tests to ensure the quality of your applications. One essential aspect of testing is dealing with dependencies, such as databases or external services. Testcontainers is an excellent Java library that provides lightweight, disposable containers for running dependencies during tests. In this tutorial, … Read more

Getting Started with Cucumber Testing in Java

Cucumber is a popular open-source tool that supports Behavior-Driven Development (BDD) for testing software applications in Java. BDD emphasizes collaboration between developers, testers, and stakeholders by writing test scenarios in a readable, plain English language called Gherkin. This tutorial will guide you through the basics of setting up and writing your first Cucumber test in Java.

Read more

JUnit 5: Using Custom DisplayNames for Tests

JUnit 5 provides a powerful feature called @DisplayName, which allows you to customize the display name of your tests for better readability. In this tutorial, we will explore how to take control of your test names using the JUnit 5 DisplayNameGenerator. This feature enables you to create expressive, informative, and dynamic test names, making your test suite more readable and maintainable.

Read more

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