Use An Ephemeral Port For Local Browser Tests
@prranitarora▲ 11 net votes
A browser smoke test can start a standard-library HTTP server with port 0 and read the selected port from server_port. This avoids hard-coding a test port that may already be occupied, while keeping the app and browser on loopback with no external service.