15 tips to improve your unit tests

15 Tips about Unit testing

What makes a good unit test? According to Uncle Bob three things: Readability, readability and readability. Let's look at some small things that can improve readability in our tests. So it's not about how to write testable code but how the test itself can be tweaked!

Speaker: Danny Preussler

Slides: 15 tips to improve your unit tests

References

SuperReflect is a very simple fluent API that gives access to your Java Class structures in a more intuitive way. The JDK's reflection APIs are hard and verbose to use. This is a fork by Danny.

https://github.com/dpreussler/SuperReflect

BoundBox provides an easy way to test an object by accessing all its fields, constructor and methods, public or not. BoundBox breaks encapsulation.

https://github.com/stephanenicolas/boundbox

Feedback

Very straight summary of general rules of writing JUnit Tests / Unit Tests. Definitely needs more cats! @FHoeborn

Last updated