There are many reasons that unit testing is not efficient. Schedule and Staff Constraints Rarely is time allocated within a program schedule to run unit test procedures as a means of regression testing software as the requirements and design evolve. Sufficient knowledgeable engineers are rarely available to perform initial unit testing or regression testing because of the schedule pressure that most large development programs are under. Building an environment with which to test software units is not a simple task. Knowledge of the entire surrounding environment is necessary before a test can be written.
Inexperienced engineers can spend much time spinning their wheels building such environments.
It is a tedious process to update software test drivers and component stubs that are used to perform unit testing. Most often, the tests are developed months earlier by engineers other than those who are now tasked with re-unit testing or regression testing the updated software. Because they are often-times not deliverable software components, test drivers and component stubs are seldom well documented making reuse by anyone other that the original author virtually impossible. Most often, the old test environment is discarded and a completely new unit test environment is constructed to test each iteration of the software. Lack of Detailed Testing Guidance Unit testing methods are almost always left to the discretion of the engineer.