Verification is reported as a scored skill, and skipping it is a common way to fail.
Write the test that could fail, rather than the one you know will pass. Good tests come from your must-pass list, not from the code.
Run after every small change, and run everything, since a fix can break something else.
When correct answers are hard to work out, test properties instead: the output is sorted, a round trip returns the original, or two methods agree.
- What makes a test valuable?
- It could actually fail. It targets an assumption, not just the example you already know works.
- What do you run after a fix?
- The full suite, because fixing one case often breaks another.
- What's a property test?
- Checking something that must always hold, such as sorted output or that two methods agree, across many inputs.
- Why shouldn't the AI be the only one writing your tests?
- It tends to test what the code does rather than what it should do, so shared wrong assumptions go unseen.