Use localhost if staging not set and fail if selenium tests fail