Alex Rivera | Logout

What is the most common mistake you make while writing unit tests?

Asked 2008-10-17T19:28:54.393
18

What is the one most common mistake you make while writing unit tests? Coupling? Lack of cohesion? Try to test too much functionality at once? Not testing enough functionality?

Post some example code if you have an example of that mistake

Edit
Report

4 Answers

4

Lack of coverage -- I rarely test all the cases I should on my first pass.

answered 2008-10-17T19:32:11.437
1

Testing using just some random values instead of including testing with equivalence partitioning and boundary value analysis.

answered 2008-10-17T19:41:58.907
1

Writing tests that are neither unit tests( testing only the specific method) nor acceptance tests( testing from user's perspective).

I find that tests that testing 3-4 layers of code in one test that is not grounded at concepts that biz people understand, usually lead to tests that are a burden to maintain and make people get disappointed and turned off by automated testing.

answered 2008-10-18T02:55:54.723
0
answered 2008-10-17T20:13:58.483

Your Answer