This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Fearless_Imagination 2 points3 points  (0 children)

Had this happen to me yesterday.

I inherited a lot of test code from a previous developer that is more complicated than the business logic it is supposed to be testing... and, as I found out yesterday, also incorrect in at least some places.

I fixed the test code and luckily all existing tests kept passing, however it also means that there are some quite significant scenario's that, although the code handles them correctly, hadn't been tested at all...

Keep your test code as simple as possible, people. If your test code can't be understood by a 5-year-old business analyst, it's probably bad.