The number of software failures, software reliability, and failure rates can be measured and predicted by the software reliability growth model (SRGM). SRGM is developed and tested in a controlled environment where the operating environment is different. Many SRGMs have developed, assuming that the working and developing environments are the same. In this paper, we have developed a new SRGM incorporating the imperfect debugging and testing coverage function in the presence of a random environment. The proposed model’s parameters are estimated from two real data sets and compared with some existing SRGMs based on five goodness-of-fit criteria. The results show that the proposed model gives better descriptive and predictive performance than the existing model.