Parametrized and cleaned up Ping test