Blog
How to test multi-threaded and concurrent Java
In the following tutorial, I will show you how to use VMLens with a simple example. We will build a concurrent Address class that holds a street and a city. The class should support parallel reading and writing from multiple threads.
June 10, 2025
A new way to test multi-threaded and concurrent Java
Testing multi-threaded, concurrent Java is hard since we can only test one thread interleaving at a time. An obvious solution is to repeat the test multiple times, hoping that we execute all possible interleavings. The problem with this solution is that every field access leads to a potential new interleaving. So the solution only works for small unit tests. This led me to develop the open-source tool VMLens.
June 5, 2025