Deciding What to Test
Learn how to effectively test our macros by deciding what to test and what not to test.
We'll cover the following...
Our next step is to decide what needs to be tested. Entire books are written on this subject, and the answers vary. We’ll review how to effectively test our while
macro that we created in the section Custom Language Constructs of Chapter 3. We will also explore ways to make assertions around stateful execution. It’s important to avoid agonizing over what we should be test, how much, and whether we’re abiding by a particular testing acronym.
There’s a handful of prominent testing methodologies and opinionated camps. Whether we’re practicing test-driven development, red-green-refactor, or simply writing regression tests, the result is the same. We can choose a testing style that fits our mental workflow. For some programmers, that’s test-driven development (TDD). For others, it’s ...