C
C#2w ago
Denis

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: - 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 I think it should be possible, by creating an image of the ASP.NET Core app and then throwing that at Test Containers. But, can I create the image and spin it up directly via the Test Containers SDK? Unfortunately, I was not able to figure out whether that can be done. Thanks in advance for any advice.
1 Reply
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?