XUnit Net Core Web API Integration Test: “The ConnectionString property has not been initialized.”
问题 Just trying to build an Integration Test project for a NET Core Web API. So I've followed a few examples, including this one (https://dotnetcorecentral.com/blog/asp-net-core-web-api-integration-testing-with-xunit/) and naturally, I run into issues. When I run the simple GET test I get an exception: "System.InvalidOperationException : The ConnectionString property has not been initialized." Any help would be appreciated. 回答1: For server = new TestServer(new WebHostBuilder().UseStartup<Startup>