Journal
Performance Testing Database Queries with JMeter and JDBCDatabase performance often determines whether an application feels dependable or frustrating under load. A REST endpoint may return quickly during development,…How to Write Unit Tests for Java Reflection and Annotation ProcessingReflection and annotation processing often sit behind frameworks, dependency injection, validation, serialisation, mapping, and code generation. When the…Vagrant and Testcontainers for reliable dockerized test environmentsModern software teams rarely run tests against the same operating system, kernel, or system libraries that ship to production. Linux containers changed that,…Testing JPA Repositories with @DataJpaTest and TestcontainersJPA repositories sit close to the database, so tests that replace PostgreSQL with an in-memory H2 database can create misleading confidence. SQL generated by…Reliable Retry Logic for Flaky HTTP TestsFlaky HTTP tests pass and fail without a meaningful code change. They may time out when a service is briefly overloaded, receive a 502 from a reverse proxy, or…Generating Reliable Random Test Data in JavaRandom test data helps reveal assumptions that fixed fixtures often hide. A service may pass every test with Alice, 12345, and today’s date, then fail when it…Testing REST API Pagination and Sorting Logic for Production APIsWhen backend services serve thousands of records — product catalogues, transaction ledgers, ASX-listed share registers or NBN outage reports — pagination and…Testing Java code with Spock and Maven in a Groovy workflowJava developers who default to JUnit often inherit a sea of assertion libraries and ceremonial setup. Groovy paired with the Spock framework gives the same JVM…Mocking database calls with H2 and Spring TestSpring Boot applications spend a surprising amount of time talking to a database, and a surprising amount of test flakiness starts there. A query that works on…Coordinating Async Tests Using CountDownLatch and ExecutorServiceWhen Java code fires work onto a thread pool and continues without waiting, tests have a problem: how do you assert that the callback actually ran? Synchronous…