Waldo
Waldo

Reputation: 1155

Visual Studio (2015) Debugging Integration Tests Runing in a DOCKER Container

I try to figure out how I can debug unit tests and integration tests in Visual Studio 2015 that be execute in a Docker container.

I've made an ASP.Net Core 1.1 app that is Dockerized and is connect to a Postgresql Database via the docker-compose.json file.

I wrote some unit and integration tests. The integration tests run tests against a database, so I've created a docker-compose.json to :

I run the docker-compose by hand with powershell. Everything work well, but it's realy painfull to debug by reading thousand lines of log.

So, how can we execute the test suite in Visual Studio and debug the test code like we can debug code running in a Docker container (and use break point and other debug tools) ? (Debuging an ASP.Net Core app in a Docker container was explained in the Microsoft documentation)

Upvotes: 2

Views: 468

Answers (1)

Waldo
Waldo

Reputation: 1155

For now there isn't way to debug integrations test who are executed in a docker environment. The way I found is to launch the Dockerized Database by hand and execute integrations tests in Visual Studio.

With that, I cant execute and debug tests. I can also execute OpenCover, and that's nice.

Upvotes: 2

Related Questions