Do You Need To Write A Test Class For Every Class That Need To Be Tested

Do You Need To Write A Test Class For Every Class That Need To Be Tested


  • 20 Jan, 2012

    This is a simple question. But the answer shows your organization skills.The technical answer is no. There is no need to write one test class for each every class that need to be tested. One test class can contain many tests for many test target classes.But the practical answer is yes. You should design one test class per test target class for low level basic tests. This makes your test classes much easier to manage and maintain.You should write separate test classes for high level tests that requires multiple target classes working together.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.