TestClient.onPort(int port)

Creates an instance that targets http://localhost:port.

Source

TestClient.onPort(int port) {
  baseURL = "http://localhost:$port";
}