24. / 25. SEP 2019

Conference Topic
Quick & Dirty

Testing Real-World Java Code

Automated testing is one of the most fundamental agile development practices, but, truth be told, it's not easy to apply it to non-trivial code bases. There are so many practical problems ("the code is too complex", "there are too many external systems", "rewriting is not an option") that many attempts fail badly and automated testing is put aside for later... maybe. The theory is there, but in practice it doesn't work out.

That's a situation I've seen in many teams. But I've also seen many teams manage the transition and get happy with testing!

This workshop bridges the gap from the theory of blog posts and conference talks to the practical issues that show up in any non-trivial real-world project. We start with a simple application, test and evolve it step by step, and as it becomes more complex the benefits of more advanced testing tools and techniques become obvious. Here you'll learn how they can help you test your existing code - you need complex tools to test complex systems. And only when you've built a solid test suite, can you start refactoring a complex system to become more maintainable; and at the same time easier to test!

The workshop will be adapted to the needs of the participants, picking from the following topics:

  • Test Driven Development (TDD), Behavior Driven Development (BDD), and the red-green-refactor loop
  • mocking, spying, stubbing, faking, and all the rest
  • tests driving architecture: inside-out and outside-in
  • unit vs. integration vs. acceptance tests and more
  • triangulation and the Transformation Priorization Premise
  • parameterized tests and property-based testing
  • JUnit 5 (in depth), Mockito, AssertJ, PACT, Cucumber

Knowledge of Java is assumed and the exercises will be presented in IntelliJ IDEA, but you can bring any tool chain, as long as you know how to quickly execute your JUnit 5 tests. (Check the official user guide for setup details. Beyond that, Eclipse users may find Infinitest helpful.)

[The training will take place from 09:00 to 17:00 on September 25th. It will be in English, but Rüdiger is German so if everyone prefers it that way, he can hold it in German.]


Rüdiger zu Dohna

Agile practitioner since before the Manifesto, teller of uncomfortable truths, works for codecentric in Kalrsruhe More...