Danny Gloudemans
Danny Gloudemans

Reputation: 2677

Split test classes from the source classes?

I'm writing tests for plug-ins, now is my question is it better to make an apart test source folder for the test classes or can I put them all in the normal source directory?

Because I think it is better to split the functionality classes from the tests classes. So there can't be mistakes. Also if someones deploy the plug-in into the system, all the classes will deploy except the test classes. Am I right?

Upvotes: 1

Views: 132

Answers (1)

Erick Robertson
Erick Robertson

Reputation: 33068

Keep the test classes in a separate source folder.

You are right. It's best to have them in a separate source folder. You do not want to deploy these classes when you deploy your plug-in, so it's best to keep them separate. You also don't want these test classes in the same mix when you generate documentation.

Upvotes: 4

Related Questions