Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 1.17 KB

README.md

File metadata and controls

50 lines (30 loc) · 1.17 KB

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