Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 2.29 KB

CodeCoverage.md

File metadata and controls

72 lines (47 loc) · 2.29 KB

Getting the code coverage

  1. Go to .NET project directory

  2. Clean the directory

dotnet clean snowflake-connector-net.sln && dotnet nuget locals all --clear
  1. Create parameters.json containing connection info for AWS, AZURE, or GCP account and place inside the Snowflake.Data.Tests folder

  2. Build the project for .NET6

dotnet build snowflake-connector-net.sln /p:DebugType=Full
  1. Run dotnet-cover on the .NET6 build
dotnet-coverage collect "dotnet test --framework net6.0 --no-build -l console;verbosity=normal" --output net6.0_AWS_coverage.xml --output-format cobertura --settings coverage.config
  1. Build the project for .NET Framework
msbuild snowflake-connector-net.sln -p:Configuration=Release
  1. Run dotnet-cover on the .NET Framework build
dotnet-coverage collect "dotnet test --framework net472 --no-build -l console;verbosity=normal" --output net472_AWS_coverage.xml --output-format cobertura --settings coverage.config

Repeat steps 3, 5, and 7 for the other cloud providers.
Note: no need to rebuild the connector again.

For Azure:

  1. Create parameters.json containing connection info for AZURE account and place inside the Snowflake.Data.Tests folder

  2. Run dotnet-cover on the .NET6 build

dotnet-coverage collect "dotnet test --framework net6.0 --no-build -l console;verbosity=normal" --output net6.0_AZURE_coverage.xml --output-format cobertura --settings coverage.config
  1. Run dotnet-cover on the .NET Framework build
dotnet-coverage collect "dotnet test --framework net472 --no-build -l console;verbosity=normal" --output net472_AZURE_coverage.xml --output-format cobertura --settings coverage.config

For GCP:
  1. Create parameters.json containing connection info for GCP account and place inside the Snowflake.Data.Tests folder

  2. Run dotnet-cover on the .NET6 build

dotnet-coverage collect "dotnet test --framework net6.0 --no-build -l console;verbosity=normal" --output net6.0_GCP_coverage.xml --output-format cobertura --settings coverage.config
  1. Run dotnet-cover on the .NET Framework build
dotnet-coverage collect "dotnet test --framework net472 --no-build -l console;verbosity=normal" --output net472_GCP_coverage.xml --output-format cobertura --settings coverage.config