C#C
C#2y ago
77 replies
Gipper

Can I set up an integration testing environment with no app available and no code? If so, how?

Right now I have a test solution set up for ASP.NET and I can't launch it because it says WebServer failed to listen on port port_number. I am trying to use XUnit now:
     public class TestesIntegracaoUser : IClassFixture<WebApplicationFactory<Program>>
    {
        private readonly WebApplicationFactory<Program> _factory;
        private const string URLBase = "http://User";

        public TestesIntegracaoUser(WebApplicationFactory<Program> factory)
        {
            _factory = factory;
        }
    //Actual test code
} 

I thought that WebApplicationFactory should have generated a web server for testing, but it's not doing so. I need it so I can debug this code, if I can.
Was this page helpful?