Designing for Testability

July 3, 2016

How do we ensure that software does what it is built for? That it contains no bugs? We write tests. But writing good tests can be a challenge. The approach of writing tests separately or after production code is mostly obsolete. Instead, we employ practices like TDD and BDD, which put testing at the beginning of the actual development process. One reason this works out so well is that it constrains us to writing testable software.

Testability is the quality of a software system that makes it easy to isolate a part of it and demonstrate the presence of a bug or design flaw. Importantly, testability enables actual software engineering -- as in applying empirical methods to steer development. Testing for defects is just one such method.

Read on →

Still the Most Relevant Metric

June 30, 2016
Scala code review WTFs per minute
Read on →

Trying out Mutation Testing

June 17, 2016

Yesterday, my colleague Stefan Ludwig and I had a look at PIT, a mutation testing tool for the JVM, and tried it on the latest release candidate of the shiny new WebTester 2. We posted about our experiment on the NovaTec blog. Have a look!

Mutation testing looks really promising to me, because it addresses an important question: how reliable is my test suite? Simple code coverage metrics, computed for example with JaCoCo, only provide a very indirect measure of test quality. Especially in projects that mandate a certain level of code coverage, the metric is practically useless for developers. Worse, sooner or later a stressed out team member will add meaningless tests to the suite, simply to exercise production code and raise coverage.

Read on →