Using a selected port for test resource server instead of a constant port