###### Abstract  
Software is used in diverse settings and depends on development and testing environments. Software development should improve the reliability, quality, cost, and stability of software, making the software testing period crucial. We proposed a software reliability model (SRM) that considers the uncertainty of software environments and the fault detection rate function as a Rayleigh distribution, with an explicit mean value function solution in the model. The goodness-of-fit of the proposed model relative to several existing nonhomogeneous Poisson process (NHPP) SRMs is presented based on three software application failure datasets. Further, a cost model is also presented that addresses the error-removal risk level and required time. The optimal testing release policy for minimizing the expected total cost (ETC) is also determined for NHPP SRMs. The impact of the software environment is studied by varying it, and the optimal release times and minimum ETCs are compared. The goodness-of-fit comparison confirmed that the proposed model has more accurate prediction values than other models. Further, whereas the existing models applied to the cost model do not change after a certain operation period, the proposed model yields changes in release time even for long operating periods. non-homogeneous Poisson process; software reliability; Rayleigh function; mean squared error; operating environment; optimal release time 2024 202  
can operate in various hardware environments (servers, PCs, mobile devices, etc. ), and changes in network connection status, response time, data processing volume, etc. can also affect the system's reliability. These changes in hardware and network environments can reduce the software's performance and stability or cause faults that occur only in certain environments. Software reliability models (SRMs) serve as tools to systematically evaluate and predict the reliability of software systems, quantify the possibility of software defects and failures and derive improvement measures through various software reliability models. Many statistical models have been developed to estimate software reliability. The SRM measures how much improvement in reliability can be attributed to every additional defect discovery and repair. The models make varied assumptions about the defect discovery and elimination process. These assumptions establish the form and explanation of the model's parameters. Figure 1 shows the classification of SRMs. SRMs can be broadly divided into non-parametric and parametric models, and there are two main types of parametric models: probabilistic and deterministic models. The probabilistic model can be divided into error seeding, failure rate, reliability growth, non-homogeneous Poisson process (NHPP), and curve fitting. The error seeding model monitors detection and removal rates and determines the number of defects left behind. In the process, known defects are deliberately added to a component or system in advance to determine the error rate. It is a process of adding errors to source code that can be used to evaluate the amount of prediction error after the system software testing phase. The failure rate model is used to study the program failure rate per defect as the failure interval and changes the number of defects remaining in the program according to changes in the failure rate. The curve-fitting model refers to the process of constructing a mathematical function that has a curve that best fits given continuous data. SRMs based on NHPP have been used to estimate and predict the quality of software products in terms of reliability, the number of remaining errors, and failure intensity. In general, although NHPP SRMs are developed on the basis of software testing data in controlled environments, they are utilized to predict software reliability in field environments. [PERSON] and [PERSON] [PERSON] and [PERSON] (2019) investigated a generalized model that captures the uncertainty of an environment and its effects on software failure rate. Recently, [PERSON] et al.