Add snapshot function to test to allow for fast retesting from certain points