Skip to content

wo-roberts/DotNetDockerTest

 
 

Repository files navigation

DotNetDockerTest

.NET Core

A library which enables the running of dotnet tests in a docker container

Usage

  1. Reference the nuget package. The easiest way to do this for a number of projects is to include a Directory.Build.targets file at the root of the repo containing:
<Project>
  <ItemGroup>
    <PackageReference Include="DotNetDockerTest" Version="0.0.1">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>build</IncludeAssets>
    </PackageReference>
  </ItemGroup>
</Project>
  1. Specify the a base docker image to use for testing:
<DockerTestImage>microsoft/dotnet:2.1.402-sdk-alpine3.7</DockerTestImage>

Then When running tests specify:

dotnet test /p:TestOnDocker=true

Or specify TestOnDocker msbuild property in your project file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 92.6%
  • Batchfile 4.7%
  • PowerShell 2.7%