Return generic loop/step function from async tests