move the code that is run behind every test to a hook function

Also introduce a pre run hook for symmetry