Replies: 5 comments 56 replies
-
Yes, I'm supposed to write a sample, but there's currently one here: https://github.com/dotnet/eShop/blob/main/tests/Catalog.FunctionalTests/CatalogApiFixture.cs Still lots of clean up to do but definitely on the roadmap. |
Beta Was this translation helpful? Give feedback.
-
We're noticing that in Rider and VS.net that it will only allow debugging the test itself, we can't debug into the projects with breakpoints etc. And in vs code the tests don't work at all for debugging. Is there documentation on how to get this working? Is there work to get this working? |
Beta Was this translation helpful? Give feedback.
-
Is there some reference on running this in CI where you are already inside docker? |
Beta Was this translation helpful? Give feedback.
-
The solution works from the CatalogApiFixture, but what if I use an integration in the project like Seq? Program.cs for ApiService from AspireStarterProject Program.cs (AppHost)
This is because the reference to the Api project in the csproj of the integration test is
Link to Repo: https://github.com/Pacman1988/AspireAppIntegrationTestWithSeq |
Beta Was this translation helpful? Give feedback.
-
@davidfowl it's been a bit, and just wanted to see if there's any progress or additional thoughts on leveraging WebApplicationFactory in integration tests? I have successfully used your sample on a few different services in our org but it requires some heavier lifting to manually perform service discovery when I have multiple components that want to talk to each other. There's also a hard limit on some local container dependency calling our service because the WebApplicationFactory is only available in-proc - I haven't come across this use case but could see it happening. I know there's a ton of ongoing work with Aspire to prioritize so no worries if no update here. Additionally, I want to commend the team on the overall vision and product - it really is a joy to work with. |
Beta Was this translation helpful? Give feedback.
-
I've only heard about Aspire yesterday but it sounds like the perfect fit for a new project I've been working on. In my current solution I have a distributed system and I do a lot of the stuff Aspire does manually, I run everything in containers and manually wire up url's using docker-compose etc etc. Aspire looks like a great alternative to this as it is, admittedly, a headache.
The only thing that concerns me is there is no mention of integration testing using
WebApplicationFactory
along with the Aspire host. I'm not sure how this would work, but does anyone know if there is support for something similar on the roadmap? It seems like a no brainer that we are provided with something along these lines for Aspire.Thanks
Beta Was this translation helpful? Give feedback.
All reactions