In order to achieve quick and accurate lifetime prediction of LED lighting products under the testing time of 2 000 h, a method of online testing of luminous flux is proposed under the condition of temperature stress.Exponential fitting of lumen maintenance, the Bayesian estimation of failure probability, the Weibull distribution of lifetime and the Arrhenius model of the decay rate are used in combination to acquire the distribution of failure probability over time at the ambient temperatures of 25 ℃. The lifetime test of the same lamps based on the Energy Star standard under the testing time of 6 000 h is also implemented to verify the effectiveness of the method. The errors of lifetimes acquired with the proposed method are 7%, 4%, 3% and 1% at the failure probabilities of 62. 3%, 10%, 5% and 1%,respectively.