Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 23
    Do what works best for you (after some experimentation). Blindly following dogma is never a good thing. Commented Apr 2, 2012 at 10:40
  • 8
    I daresay that writing all your tests at once much like writing all your app code at once. Commented Apr 2, 2012 at 13:29
  • 1
    @MichaelHaren All tests for a class (or functional module), sorry for the confusion Commented Apr 2, 2012 at 13:32
  • 5
    Addressing the "brain dump" issue: Sometimes there are points in the testing/coding when you realize the need for several different specific input tests, and there is a tendency to want to capitalize on the clarity of that realization before you get distracted with the minutiae of the coding. I usually manage that by maintaining a separate list (e.g. Mylyn), or else with a list of comments in the Test class of different things I want to remember to test (e.g. // test null case). However, I still only code one test at a time, and instead work my way down the list systematically. Commented Apr 2, 2012 at 13:51
  • 4
    well I don't know why nobody mentioned this, but you CAN'T write all tests at once. Writing all tests before hand is exactly the same as doing BDUF. And what has history taught us about BDUF? It almost never works. Commented Nov 30, 2013 at 5:00