Automated testing is crucial for long-term maintainability, but not all tests are made equal: a brittle test?tightly coupled to its implementation?can be worse than having no test at all!

If your test suite is more of a hindrance than a helper, you may be suffering from "Leadership said we have to write tests"-itis, a common ailment across the engineering community. Fortunately, this can be treated by taking the test suite you (might) already have and making it work *for* you instead of holding you back!

In this session, we'll analyze the characteristics of "good" and "bad" unit tests and how we can massage the latter into the former. Topics of discussion will include test organization, strict types, fixtures, test doubles, and the true value of code coverage as a metric. Examples use PHPUnit as the test runner, but the lessons are broadly applicable across test runners and languages. Some testing experience is encouraged, but not required.

Comments

Comments are closed.