Connect to a local server in tests