-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Closed
Labels
Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcseQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.testing/subsvc
Description
Description
The approach outlined in https://learn.microsoft.com/aspnet/core/test/integration-tests?view=aspnetcore-9.0#customize-webapplicationfactory no longer works. It was relying on implementation details, see #35126
It is also recommended to use the same provider for testing as the one used in production as they could have drastically different behaviors, see testing against the production database.
The connection / connection string for the same provider can be changed easily:
services.ConfigureDbContext<TestContext>(options => options.UseSqlite(connection));Page URL
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/test/integration-tests.md
Document ID
f499b131-8b14-7e10-1728-543fdd5a5656
Article author
Metadata
- ID: 77889d43-fedb-f8b4-8fea-379ec946555c
- Service: aspnet-core
- Sub-service: testing
Metadata
Metadata
Assignees
Labels
Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcseQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.testing/subsvc