refine the code of test snapshot.