Skip to content

luizhlelis/dotnet-docker-integration-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Integration test using Docker and .Net 5

Summary

Sample ASP NET Core 5 API using docker-compose to run integration tests. The API is a timesheet system sample that the employee of a company launch worked hours. Developed using .NET 5, SqlServer with Entity Framework Core 5, xUnit and Docker (containerized SQL Server and .NET 5 SDK).

Running the project

Locally via dotnet command line tool

Running the project locally requires initializing the database (SqlServer) on docker.

  cd src

  nuget restore

  docker-compose up -d sql-server-database

  dotnet run

In a docker container via docker-compose

Initializes the database (SqlServer) and the Api on docker.

  cd src

  docker-compose up timesheets-api

Running tests

Locally via dotnet command line tool

  cd src

  docker-compose up -d sql-server-database

  dotnet test

In a docker container via docker-compose

  cd src

  docker-compose up integration-tests

About

Integration tests using docker-compose and ASP NET Core 5

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published