Huge project tons of classes and directories.
Do I make my unit test project mirror these directories or do I put them all at the root directory?
Somewhat annoying to have to make directory changes and class name changes twice.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You definitely want your unit test directories to mirror the directories of the code under test. It’s a mild pain to set up manually, but that pain doesn’t last nearly as long as the pain of having all your tests in a pile, or even worse, having them in some different structure than the code under test.
Evidently you’re not using Java, or your test code would already have the same package structure as the code under test and the question would be moot. (At least I can’t imagine doing it any other way.)