title: AspNetCore Integration Testing Multiple WebApplicationFactory Instances?
body: <p>Does any one know if it is possible to host multiple instances of <code>WebApplicationFactory&lt;TStartop&gt;()</code> in the same unit test?</p>
  
  <p>I have tried and can't seem to get anywhere with this one issue.</p>
  
  <p>i.e
  </p>
  
  <pre><code>_client = WebHost&lt;Startup&gt;.GetFactory().CreateClient();
  var baseUri = PathString.FromUriComponent(_client.BaseAddress);
  _url = baseUri.Value;
  
  _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
      "Bearer", "Y2E890F4-E9AE-468D-8294-6164C59B099Y");
  </code></pre>
  
  <p><code>WebHost</code> is just a helper class that allows me to build factory and then a client easily in one line.</p>
  
  <p>Under the covers all it does is this:</p>
  
  <p><code>new WebApplicationFactory&lt;TStartup&gt;()</code> but a few other things too.</p>
  
  <p>It <strong>would be</strong> <em>nice</em> if i could stand up another instace of a different web server to test server to server functionality.</p>
  
  <p>Does anyone know if this is possible or not?</p>