In order to test stress level of railway train drivers in real time, stress response inventory and ECG signal data of 16 subjects under different train speeds were collected by using high-speed rail driving behavior and safety simulation platform. Firstly, stress response inventory was analyzed to investigate drivers' stress level along with increasing train speed. Then, HRV features were statistically analyzed at different stress levels. Finally, K nearest neighbor (KNN) algorithm, support vector machine (SVM), and random forest (RF) were compared in testing stress level, and influence of different input characteristics on these classifiers' performance was analyzed. The results show that drivers' pressure will rise along with the increase of speed, and there are significant differences for number of successive normal to normal intervals pairs that differ more than 50 ms(NN50), proportion of number of successive normal to normal intervals more than 50ms(PNN50), ratio of low frequency and high frequency(LF/HF) and cardiac sympathetic index(CSI) between different driving speeds. Besides, PNN50, HF, and LF/HF decrease with increased driving speed, while NN50 increase. In particular, LF/HF decrease significantly. Moreover, feature selection and feature normalization could improve the model's accuracy, and best performance is achieved by SVM classifier model with radial basis function(RBF) as kernel function,with an accuracy of 71.2%.