In software industry, it is important to prioritize the different modules of a software so that important modules are tested ahead of the lesser important ones. This approach is desirable because it is not possible to test each module regressively due to time and cost constraints. This paper proposes a way to prioritize several modules of a software product and calculates optimal time and cost for testing based on non homogenous poisson process. Sometimes it is more profitable for an organization to release software, even if it is not completely tested because of limited time and resources. This paper also tries to figure out whether the software could be released or not, after testing within a given time and cost.