I am sure some else has experienced the problem of documentation regarding unit tests. I was wondering if anyone has used javadocs with their unit testing to generate their own internal javadoc files to keep track and document their unit tests? If so, did you find it successful? Or you think this a bad way to document unit tests, please let me know. If you have any suggestion for a better way for unit test documentation, it would be greatly appreciated.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
migrated from stackoverflow.com Nov 11 '11 at 9:45
This question came from our site for professional and enthusiast programmers.
I find it's best to write self-documenting unit-tests. The BDD approach works really well for that. I've been using RSpec in Ruby world (there certainly are some equivalent tools for Java). But even with standard JUnit simply having well-named test cases is a good substitute for explicitly documenting the tests. Often when tests need documentation they are too complex and should be simplified.