Skip to content

Aspire tests and DI #7877

Answered by davidfowl
vdebellabre asked this question in Q&A
Mar 4, 2025 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

Aspire’s testing capabilities are for black box testing your entire distributed application, not for writing unit tests or doing white box integration testing. If you want to run your single project in memory and stub out the database then continue to use web application factory.

If you want to use a real database and talk to your API to make sure data is persisted into the real Postgres database then aspire testing is the way to go.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@vdebellabre
Comment options

@davidfowl
Comment options

@vdebellabre
Comment options

@davidfowl
Comment options

Answer selected by vdebellabre
@vdebellabre
Comment options

@davidfowl
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants