-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup Ace.Grograpi.Infrastructure code coverage and report tools/scripts
- Loading branch information
1 parent
1a1a4ad
commit 21f39ec
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/tests/Ace.Geograpi.Infrastructure.IntegrationTests/run-test-coverage.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
$Project = "Ace.Geograpi.Infrastructure"; | ||
$Root = "..\.cov"; | ||
$ReportGeneratorPath = ".nuget\packages\reportgenerator\5.3.8\tools\net8.0\ReportGenerator.dll"; | ||
|
||
dotnet test --collect:"XPlat Code Coverage" --settings .\runsettings --results-directory "$Root\raw\$Project"; | ||
dotnet "$env:USERPROFILE\$ReportGeneratorPath" "-reports:$Root\raw\$Project\*\coverage.cobertura.xml" "-targetdir:$Root\reports\$Project" "-historydir:$Root\reports\.history\$Project" -reporttypes:Html; | ||
dotnet "$env:USERPROFILE\$ReportGeneratorPath" "-reports:$Root\raw\$Project\*\coverage.cobertura.xml" "-targetdir:$Root\reports\$Project" "-historydir:$Root\reports\.history\$Project" -reporttypes:Badges; | ||
|
||
Read-Host -Prompt "Press any key to continue.." |
26 changes: 26 additions & 0 deletions
26
src/tests/Ace.Geograpi.Infrastructure.IntegrationTests/runsettings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<RunSettings> | ||
<DataCollectionRunSettings> | ||
<DataCollectors> | ||
<DataCollector friendlyName="XPlat code coverage"> | ||
<Configuration> | ||
<Format>json,cobertura</Format> | ||
<UseSourceLink>true</UseSourceLink> | ||
<IncludeTestAssembly>false</IncludeTestAssembly> | ||
<Include>[Ace.Geograpi.Infrastructure]*</Include> | ||
<Exclude>[Migrations]*</Exclude> | ||
<ExcludeByFile>**/*.g.cs,**/GlobalUsings.cs,**/DependencyInjection.cs,**/Migrations/*.cs</ExcludeByFile> | ||
</Configuration> | ||
</DataCollector> | ||
</DataCollectors> | ||
</DataCollectionRunSettings> | ||
<InProcDataCollectionRunSettings> | ||
<InProcDataCollectors> | ||
<InProcDataCollector | ||
assemblyQualifiedName="Coverlet.Collector.DataCollection.CoverletInProcDataCollector, coverlet.collector, Version=6.0.2, Culture=neutral, PublicKeyToken=null" | ||
friendlyName="XPlat Code Coverage" | ||
enabled="True" | ||
codebase="coverlet.collector.dll" /> | ||
</InProcDataCollectors> | ||
</InProcDataCollectionRunSettings> | ||
</RunSettings> |