Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Asp .net Core : unit tests in Docker

$
0
0

Hi,

I want to launch my tests (unit and integration test) at the time my project is build (on VSTS) and dismiss the rest of the CI pipeline if they fail.

I use docker support for my project and the following architecture :

MyService/
├── src/
│   └── MyService/
│       └── MyService.csproj
├── test/
│  └── MyService.Tests/
│       └── MyService.Tests.csproj
└── MyService.sln

Can someone explain me clearly the following points please :

  • does the Test project needs a Dockerfile ? If yes can someone give an example ?
  • does the dotnet test command should be launched in the MyService Dockerfile and then break the publish command if tests fail ?
  • if the point above is right : if I work with microservices, so each microservice may have a specific test projet in order to launch its dedicateddotnet test command referring to the linked test project in each microservice Dockerfile ?

Any feedback will be really helpful.

Thanks


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>