Improving Development with Context-Based Testing
It’s very common for developers to follow a “one test fixture per class/component” approach; that is, one file containing all of the tests that verify a given class or component. Then a new bug report comes in, the fix is a simple one-liner, but it requires 50 new lines of test code. There’s also a new feature that’s supposed to be easy to implement, but too hard to write tests for it because the test files are too messy. In both cases, the tendency is to simply ignore the tests, write the code, and call it done.
In this talk, we’ll take a look at context-based testing as an approach to organizing tests, making them easier to read, write, and maintain. It works for many types of tests, such as unit, integration, and end-to-end. And it keeps both developers and the business happy!