Microsoft.AspNetCore.Mvc.Testing Namespace

Provides types that support MVC integration testing.

Classes

WebApplicationFactory<TEntryPoint>

Factory for bootstrapping an application in memory for functional end to end tests.

WebApplicationFactoryClientOptions

The default options to use to when creating HttpClient instances by calling CreateClient(WebApplicationFactoryClientOptions).

WebApplicationFactoryContentRootAttribute

Metadata that WebApplicationFactory<TEntryPoint> uses to find out the content root for the web application represented by TEntryPoint. WebApplicationFactory<TEntryPoint> will iterate over all the instances of WebApplicationFactoryContentRootAttribute, filter the instances whose Key is equal to TEntryPointFullName, order them by Priority in ascending order. WebApplicationFactory<TEntryPoint> will check for the existence of the marker in Path.Combine(ContentRootPath, Path.GetFileName(ContentRootTest))" and if the file exists it will set the content root to ContentRootPath.

Remarks

For more information about MVC integration testings, see Integration tests.