some code to do auto test using python