This study aims to study the inspection of spare parts at different reliability levels based on hypothesis testing and Bayesian optimization models.Taking A production testing process of enterprise A as an example,the cost analysis is conducted in the testing process of its parts,and the decision optimization model with the maximum profit as the goal is established.Then it provides a scientific basis for the quality management and production decision of spare parts.