Abstract. The determination of optimal software release times constitutes an interesting decision making problem which involves the stochastic structure of the underlying software reliability model, as well as various cost parameters. There is an apparent tradeoff between testing the software further to improve its reliability, and releasing it for operational use to decrease the costs. We propose and analyze in depth a new dynamic model with sufficient generality. After each failure, a debugging activity, possibly imperfect, is undertaken and a decision is made regarding the duration of additional testing. If no failure is observed during this time, then the software is released. Otherwise, the failure is debugged and the decision process is repeated in a dynamic fashion. The problem is formulated using dynamic programming and interesting characterizations of the optimal release policy are presented. The dynamic solution procedure is demonstrated by some numerical illustrations.