Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Nov 11 '11 at 9:45

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

up vote 0 down vote accepted

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.

share|improve this answer
    
Thanks for your advice. –  grebwerd Jul 25 '11 at 3:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.