Run ASP.NET Core app in Test Container
I have an ASP.NET Core app that is a server for my WPF UI applications.
The server depends on a SQL database and a NoSQL database.
I wish to perform automated UI tests on my applications while ensuring that the server is clean for each test.
I have discovered Test Containers and I understand that I can spin up containerized instances of the databases.
But can I also use Test Containers to run the ASP.NET Core app?
Why:
Thanks in advance for any advice.
The server depends on a SQL database and a NoSQL database.
I wish to perform automated UI tests on my applications while ensuring that the server is clean for each test.
I have discovered Test Containers and I understand that I can spin up containerized instances of the databases.
But can I also use Test Containers to run the ASP.NET Core app?
Why:
- the server depends on environment variables to connect to the databases and for other settings
- the server ensures that only a single instance of it is running on the machine
- I will only have to worry about one exposed port for a test run instance, instead of three - I could attempt to have each individual application be tested in parallel
Thanks in advance for any advice.