I always had the notion that when you do unit testing, you have to do TDD. However, after months of reading about it, it turns out that is not the case. The standard TDD workflow goes like write tests first, then write the code to satisfy your tests, then iterate.
The problem is, I can’t seem to imagine how to do unit testing but not following the TDD workflow. Do you know of any way I can do this?
TDD is first doing small design steps first, for example thinking up your “desired” method signature, then writing a test for it, then implementing it till green, then refactoring if necessary.
This workflow makes sense (to me anyway).
Alternatively, you can write test afterwards to “prove” some confidence. But you are missing the small design steps and then the emerging aspect, by design, implement to green, refactor, your design/implementation is emerging and at the same time you have your test to prove correct behavior.
These are my thoughts but if you feel this doesn’t suit your question then please be more specific about your needs.