Test code must be at least as good as production code, because it has to prove its effectiveness and efficiency on a daily basis. A good test infrastructure supporting this comprises:

  • Organization of tests in classes and suites
  • Separation of test logic from test helpers
  • Reusability for creation/generation of test data as well as creation/injection of test doubles
  • Maintainability of tests with simplification components on top of legacy APIs
  • Enabling TDD in the large by decoupling developments across teams by isolation

A test infrastructure ensures for a specific application that the next test can be written fast in a readable way without duplication. Fast is important so that sufficient tests are written even in stressful times (e.g. handling a customer ticket with high priority). Readable is important to avoid knowledge bottlenecks (e.g. onboarding of new colleagues). Last but not least, duplication-free is important for adaptiveness and maintainability (e.g. refactoring production code should require only few changes of the test code).

Winfried Schwarzmann

Winfried Schwarzmann studied Mathematics, with minor subject Computer Science, at the University of Ulm. During his studies in the USA, he graduated as Master of Science in Mathematics at the University of Wisconsin-Milwaukee. Since already 18 years he is working for SAP SE: first as developer for Supply Chain Optimization (C++), later as development architect for Logistics and Finance applications (ABAP OO). From 2011 onwards, he trained and coached internal and external development teams in Agile Software Engineering. Last year, he summarized his knowledge and experience in a training which focuses on building test infrastructures even for legacy code applications.

Throughout his career, Winfried has been eager to keep code and design clean. As ASE practitioner, he surely wants the same qualities for tests. And not just for his classes, but also for the ones of others. Similar to driving greenfield applications by tests, he drives legacy code improvements test-first. While cleaning up existing tests, he does not only become familiar with the previously unknown application, but also develops and evaluates ideas on how to improve the production design. Moreover, these clean tests and the test infrastructure to write further ones particularly help new developers to get started.