Is there away to test SignalR using TestServer generated as part of integration tests (https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests view=aspnetcore-2.1)?
All my retries failed to perform handshake to the TestServer instance fail with Exception: System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it
Running in Debug/Console/IIS works perfectly
Server Code
public void Configure(...)
{
...
app.UseSignalR(router => router.MapHub<MockHub>("/ws"));
...
}
TestCode
...
var server = factory.Server;
var connection = new HubConnectionBuilder()
.WithUrl(server.BaseAddress)
.Build();
await connection.StartAsync();