From 1b518bedc58e449bbadad8524663041dfec985d4 Mon Sep 17 00:00:00 2001 From: faisal Date: Tue, 28 Jan 2025 10:20:41 +0100 Subject: [PATCH 01/11] Upgrading versions, --- README.md | 4 ++-- .../Algorithms.Console/Algorithms.Console.csproj | 2 +- .../Algorithms.Core.NativeAot.Tests.csproj | 14 +++++++------- .../Algorithms.Core.Tests.csproj | 8 ++++---- .../Calculator.Console.Tests.csproj | 6 +++--- .../Calculator.Core.Tests.csproj | 6 +++--- .../Calculator.Server.IntegrationTests.csproj | 8 ++++---- .../Calculator.Server.Tests.csproj | 8 ++++---- .../src/CoverageStatus/CoverageStatus.csproj | 8 ++++---- .../ChangesetViewLibrary.Tests.csproj | 8 ++++---- .../CoverageStatus.Tests.csproj | 8 ++++---- .../MultiTfmLibrary.Tests.csproj | 8 ++++---- .../SourceViewLibrary.Tests.csproj | 8 ++++---- .../SampleLibrary.Tests/SampleLibrary.Tests.csproj | 10 +++++----- .../SampleLibrary/SampleLibrary.csproj | 2 +- .../WpfApplication.Tests.csproj | 8 ++++---- .../WpfApplication/WpfApplication.csproj | 2 +- src/Merging/TestProject/TestProject.csproj | 10 +++++----- 18 files changed, 64 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index 62c0b5f..8738e9d 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ Code coverage results: output.coverage. For existing projects to get latest features and best performance please keep up to date below references: ```xml - - + + ``` If your solution doesn't contain any C++ code it is recommended to disable native code coverage by adding into configuration below flags: diff --git a/samples/Algorithms/src/Algorithms.Console/Algorithms.Console.csproj b/samples/Algorithms/src/Algorithms.Console/Algorithms.Console.csproj index 45404d5..99e88e7 100644 --- a/samples/Algorithms/src/Algorithms.Console/Algorithms.Console.csproj +++ b/samples/Algorithms/src/Algorithms.Console/Algorithms.Console.csproj @@ -13,6 +13,6 @@ - + diff --git a/samples/Algorithms/tests/Algorithms.Core.NativeAot.Tests/Algorithms.Core.NativeAot.Tests.csproj b/samples/Algorithms/tests/Algorithms.Core.NativeAot.Tests/Algorithms.Core.NativeAot.Tests.csproj index 588f490..5fd7c51 100644 --- a/samples/Algorithms/tests/Algorithms.Core.NativeAot.Tests/Algorithms.Core.NativeAot.Tests.csproj +++ b/samples/Algorithms/tests/Algorithms.Core.NativeAot.Tests/Algorithms.Core.NativeAot.Tests.csproj @@ -11,13 +11,13 @@ - - - - - - - + + + + + + + diff --git a/samples/Algorithms/tests/Algorithms.Core.Tests/Algorithms.Core.Tests.csproj b/samples/Algorithms/tests/Algorithms.Core.Tests/Algorithms.Core.Tests.csproj index cc743b4..c43f2de 100644 --- a/samples/Algorithms/tests/Algorithms.Core.Tests/Algorithms.Core.Tests.csproj +++ b/samples/Algorithms/tests/Algorithms.Core.Tests/Algorithms.Core.Tests.csproj @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj b/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj index dcacc81..8317e83 100644 --- a/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj @@ -10,9 +10,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj b/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj index 29d2c53..a724e48 100644 --- a/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj @@ -10,9 +10,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj b/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj index 4f8fdec..9eb5406 100644 --- a/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj +++ b/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj b/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj index 968fbb5..16fb8a6 100644 --- a/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj @@ -10,10 +10,10 @@ - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/samples/VisualStudio/src/CoverageStatus/CoverageStatus.csproj b/samples/VisualStudio/src/CoverageStatus/CoverageStatus.csproj index 5ee9fc5..b64d3d1 100644 --- a/samples/VisualStudio/src/CoverageStatus/CoverageStatus.csproj +++ b/samples/VisualStudio/src/CoverageStatus/CoverageStatus.csproj @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/samples/VisualStudio/tests/ChangesetViewLibrary.Tests/ChangesetViewLibrary.Tests.csproj b/samples/VisualStudio/tests/ChangesetViewLibrary.Tests/ChangesetViewLibrary.Tests.csproj index b57950d..0bc96d0 100644 --- a/samples/VisualStudio/tests/ChangesetViewLibrary.Tests/ChangesetViewLibrary.Tests.csproj +++ b/samples/VisualStudio/tests/ChangesetViewLibrary.Tests/ChangesetViewLibrary.Tests.csproj @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/samples/VisualStudio/tests/CoverageStatus.Tests/CoverageStatus.Tests.csproj b/samples/VisualStudio/tests/CoverageStatus.Tests/CoverageStatus.Tests.csproj index 5139273..35dc038 100644 --- a/samples/VisualStudio/tests/CoverageStatus.Tests/CoverageStatus.Tests.csproj +++ b/samples/VisualStudio/tests/CoverageStatus.Tests/CoverageStatus.Tests.csproj @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/samples/VisualStudio/tests/MultiTfmLibrary.Tests/MultiTfmLibrary.Tests.csproj b/samples/VisualStudio/tests/MultiTfmLibrary.Tests/MultiTfmLibrary.Tests.csproj index ebe7bd3..2ed8f2c 100644 --- a/samples/VisualStudio/tests/MultiTfmLibrary.Tests/MultiTfmLibrary.Tests.csproj +++ b/samples/VisualStudio/tests/MultiTfmLibrary.Tests/MultiTfmLibrary.Tests.csproj @@ -11,10 +11,10 @@ - - - - + + + + diff --git a/samples/VisualStudio/tests/SourceViewLibrary.Tests/SourceViewLibrary.Tests.csproj b/samples/VisualStudio/tests/SourceViewLibrary.Tests/SourceViewLibrary.Tests.csproj index 1443b3a..76fac73 100644 --- a/samples/VisualStudio/tests/SourceViewLibrary.Tests/SourceViewLibrary.Tests.csproj +++ b/samples/VisualStudio/tests/SourceViewLibrary.Tests/SourceViewLibrary.Tests.csproj @@ -14,10 +14,10 @@ - - - - + + + + diff --git a/src/CodeCoverageSample/SampleLibrary.Tests/SampleLibrary.Tests.csproj b/src/CodeCoverageSample/SampleLibrary.Tests/SampleLibrary.Tests.csproj index 4e68660..9e8aa3d 100644 --- a/src/CodeCoverageSample/SampleLibrary.Tests/SampleLibrary.Tests.csproj +++ b/src/CodeCoverageSample/SampleLibrary.Tests/SampleLibrary.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable @@ -9,10 +9,10 @@ - - - - + + + + diff --git a/src/CodeCoverageSample/SampleLibrary/SampleLibrary.csproj b/src/CodeCoverageSample/SampleLibrary/SampleLibrary.csproj index 132c02c..30402ac 100644 --- a/src/CodeCoverageSample/SampleLibrary/SampleLibrary.csproj +++ b/src/CodeCoverageSample/SampleLibrary/SampleLibrary.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable diff --git a/src/CodeCoverageSample/WpfApplication.Tests/WpfApplication.Tests.csproj b/src/CodeCoverageSample/WpfApplication.Tests/WpfApplication.Tests.csproj index e227e8b..deffc2b 100644 --- a/src/CodeCoverageSample/WpfApplication.Tests/WpfApplication.Tests.csproj +++ b/src/CodeCoverageSample/WpfApplication.Tests/WpfApplication.Tests.csproj @@ -1,7 +1,7 @@ - net6.0-windows + net8.0-windows enable enable @@ -9,9 +9,9 @@ - - - + + + diff --git a/src/CodeCoverageSample/WpfApplication/WpfApplication.csproj b/src/CodeCoverageSample/WpfApplication/WpfApplication.csproj index 18b9a12..e3e33e3 100644 --- a/src/CodeCoverageSample/WpfApplication/WpfApplication.csproj +++ b/src/CodeCoverageSample/WpfApplication/WpfApplication.csproj @@ -2,7 +2,7 @@ WinExe - net6.0-windows + net8.0-windows enable enable true diff --git a/src/Merging/TestProject/TestProject.csproj b/src/Merging/TestProject/TestProject.csproj index a2dd291..ee740ed 100644 --- a/src/Merging/TestProject/TestProject.csproj +++ b/src/Merging/TestProject/TestProject.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1;net480;net6.0;net7.0 + net481;net8.0 enable enable 10.0 @@ -10,10 +10,10 @@ - - - - + + + + From 6cab8357f6a72e4abbec486632ecdb39ab399b76 Mon Sep 17 00:00:00 2001 From: faisal Date: Tue, 28 Jan 2025 11:19:05 +0100 Subject: [PATCH 02/11] Correct target framework --- .../Calculator.Console.Tests/Calculator.Console.Tests.csproj | 2 +- .../tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj | 2 +- .../Calculator.Server.IntegrationTests.csproj | 2 +- .../Calculator.Server.Tests/Calculator.Server.Tests.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj b/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj index 8317e83..1b9ad62 100644 --- a/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net6.0 enable enable diff --git a/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj b/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj index a724e48..0efb275 100644 --- a/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net6.0 enable enable diff --git a/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj b/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj index 9eb5406..bf4cc62 100644 --- a/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj +++ b/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net6.0 enable enable diff --git a/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj b/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj index 16fb8a6..6625023 100644 --- a/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net6.0 enable enable From d250842515ac88abb590876d8dd238dc323ae9d6 Mon Sep 17 00:00:00 2001 From: faisal Date: Tue, 28 Jan 2025 11:24:57 +0100 Subject: [PATCH 03/11] Upgrading dotnet version in yml files, --- .github/workflows/Calculator_Scenario01.yml | 2 +- .github/workflows/Calculator_Scenario02.yml | 2 +- .github/workflows/Calculator_Scenario03.yml | 2 +- .github/workflows/Calculator_Scenario04.yml | 2 +- .github/workflows/Calculator_Scenario05.yml | 2 +- .github/workflows/Calculator_Scenario06.yml | 2 +- .github/workflows/Calculator_Scenario07.yml | 2 +- .github/workflows/Calculator_Scenario08.yml | 2 +- .github/workflows/Calculator_Scenario09.yml | 2 +- .github/workflows/Calculator_Scenario10.yml | 2 +- .github/workflows/Calculator_Scenario11.yml | 2 +- .github/workflows/Calculator_Scenario12.yml | 2 +- .github/workflows/Calculator_Scenario13.yml | 2 +- .github/workflows/Calculator_Scenario14.yml | 2 +- .github/workflows/Calculator_Scenario15.yml | 2 +- .github/workflows/Calculator_Scenario16.yml | 2 +- .github/workflows/Calculator_Scenario17.yml | 2 +- .github/workflows/Calculator_Scenario18.yml | 2 +- .github/workflows/Calculator_Scenario19.yml | 2 +- .github/workflows/Calculator_Scenario20.yml | 2 +- .github/workflows/Calculator_Scenario21.yml | 2 +- .github/workflows/Calculator_Scenario22.yml | 2 +- .github/workflows/Calculator_Scenario23.yml | 2 +- .github/workflows/Calculator_Scenario24.yml | 2 +- .github/workflows/Calculator_Scenario25.yml | 2 +- samples/Calculator/scenarios/scenario01/README.md | 2 +- samples/Calculator/scenarios/scenario02/README.md | 2 +- samples/Calculator/scenarios/scenario03/README.md | 2 +- samples/Calculator/scenarios/scenario04/README.md | 2 +- samples/Calculator/scenarios/scenario05/README.md | 2 +- samples/Calculator/scenarios/scenario06/README.md | 2 +- samples/Calculator/scenarios/scenario07/README.md | 2 +- samples/Calculator/scenarios/scenario08/README.md | 2 +- samples/Calculator/scenarios/scenario09/README.md | 2 +- samples/Calculator/scenarios/scenario10/README.md | 2 +- samples/Calculator/scenarios/scenario11/README.md | 2 +- samples/Calculator/scenarios/scenario12/README.md | 2 +- samples/Calculator/scenarios/scenario13/README.md | 2 +- samples/Calculator/scenarios/scenario14/README.md | 2 +- samples/Calculator/scenarios/scenario15/README.md | 2 +- samples/Calculator/scenarios/scenario16/README.md | 2 +- samples/Calculator/scenarios/scenario17/README.md | 2 +- samples/Calculator/scenarios/scenario18/README.md | 2 +- samples/Calculator/scenarios/scenario19/README.md | 2 +- samples/Calculator/scenarios/scenario20/README.md | 2 +- samples/Calculator/scenarios/scenario21/README.md | 2 +- samples/Calculator/scenarios/scenario22/README.md | 2 +- samples/Calculator/scenarios/scenario23/README.md | 2 +- samples/Calculator/scenarios/scenario24/README.md | 2 +- samples/Calculator/scenarios/scenario25/README.md | 2 +- .../Calculator.Console.Tests/Calculator.Console.Tests.csproj | 2 +- .../tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj | 2 +- .../Calculator.Server.IntegrationTests.csproj | 2 +- .../Calculator.Server.Tests/Calculator.Server.Tests.csproj | 2 +- 54 files changed, 54 insertions(+), 54 deletions(-) diff --git a/.github/workflows/Calculator_Scenario01.yml b/.github/workflows/Calculator_Scenario01.yml index 824715b..608c58e 100644 --- a/.github/workflows/Calculator_Scenario01.yml +++ b/.github/workflows/Calculator_Scenario01.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario02.yml b/.github/workflows/Calculator_Scenario02.yml index be47c6e..ac7fbcd 100644 --- a/.github/workflows/Calculator_Scenario02.yml +++ b/.github/workflows/Calculator_Scenario02.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario03.yml b/.github/workflows/Calculator_Scenario03.yml index a375b4c..63ab18a 100644 --- a/.github/workflows/Calculator_Scenario03.yml +++ b/.github/workflows/Calculator_Scenario03.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario04.yml b/.github/workflows/Calculator_Scenario04.yml index 2bb98d6..873e413 100644 --- a/.github/workflows/Calculator_Scenario04.yml +++ b/.github/workflows/Calculator_Scenario04.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario05.yml b/.github/workflows/Calculator_Scenario05.yml index 7f491df..9d08f28 100644 --- a/.github/workflows/Calculator_Scenario05.yml +++ b/.github/workflows/Calculator_Scenario05.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario06.yml b/.github/workflows/Calculator_Scenario06.yml index 4173e6a..d697f8b 100644 --- a/.github/workflows/Calculator_Scenario06.yml +++ b/.github/workflows/Calculator_Scenario06.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario07.yml b/.github/workflows/Calculator_Scenario07.yml index b241b21..7d7e33d 100644 --- a/.github/workflows/Calculator_Scenario07.yml +++ b/.github/workflows/Calculator_Scenario07.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario08.yml b/.github/workflows/Calculator_Scenario08.yml index 7be58a5..30cc08a 100644 --- a/.github/workflows/Calculator_Scenario08.yml +++ b/.github/workflows/Calculator_Scenario08.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario09.yml b/.github/workflows/Calculator_Scenario09.yml index f7d454b..e9b72e2 100644 --- a/.github/workflows/Calculator_Scenario09.yml +++ b/.github/workflows/Calculator_Scenario09.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario10.yml b/.github/workflows/Calculator_Scenario10.yml index 1d420a9..e846857 100644 --- a/.github/workflows/Calculator_Scenario10.yml +++ b/.github/workflows/Calculator_Scenario10.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario11.yml b/.github/workflows/Calculator_Scenario11.yml index a7a3247..11fc710 100644 --- a/.github/workflows/Calculator_Scenario11.yml +++ b/.github/workflows/Calculator_Scenario11.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Restore dependencies (Console project) diff --git a/.github/workflows/Calculator_Scenario12.yml b/.github/workflows/Calculator_Scenario12.yml index 71928a4..ee7201f 100644 --- a/.github/workflows/Calculator_Scenario12.yml +++ b/.github/workflows/Calculator_Scenario12.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Restore dependencies (Console project) diff --git a/.github/workflows/Calculator_Scenario13.yml b/.github/workflows/Calculator_Scenario13.yml index 4bda4af..95417e1 100644 --- a/.github/workflows/Calculator_Scenario13.yml +++ b/.github/workflows/Calculator_Scenario13.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario14.yml b/.github/workflows/Calculator_Scenario14.yml index 9e7f658..805eb5a 100644 --- a/.github/workflows/Calculator_Scenario14.yml +++ b/.github/workflows/Calculator_Scenario14.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario15.yml b/.github/workflows/Calculator_Scenario15.yml index da42623..bbfff98 100644 --- a/.github/workflows/Calculator_Scenario15.yml +++ b/.github/workflows/Calculator_Scenario15.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario16.yml b/.github/workflows/Calculator_Scenario16.yml index a49eae6..8a9809b 100644 --- a/.github/workflows/Calculator_Scenario16.yml +++ b/.github/workflows/Calculator_Scenario16.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario17.yml b/.github/workflows/Calculator_Scenario17.yml index fd49124..0724721 100644 --- a/.github/workflows/Calculator_Scenario17.yml +++ b/.github/workflows/Calculator_Scenario17.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario18.yml b/.github/workflows/Calculator_Scenario18.yml index 637a0f8..77f6cdb 100644 --- a/.github/workflows/Calculator_Scenario18.yml +++ b/.github/workflows/Calculator_Scenario18.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario19.yml b/.github/workflows/Calculator_Scenario19.yml index 8b38263..01cef9e 100644 --- a/.github/workflows/Calculator_Scenario19.yml +++ b/.github/workflows/Calculator_Scenario19.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario20.yml b/.github/workflows/Calculator_Scenario20.yml index d9fa69f..4a9763b 100644 --- a/.github/workflows/Calculator_Scenario20.yml +++ b/.github/workflows/Calculator_Scenario20.yml @@ -22,7 +22,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario21.yml b/.github/workflows/Calculator_Scenario21.yml index 4486ac3..b2dbc31 100644 --- a/.github/workflows/Calculator_Scenario21.yml +++ b/.github/workflows/Calculator_Scenario21.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario22.yml b/.github/workflows/Calculator_Scenario22.yml index 4c79a05..2bf82f3 100644 --- a/.github/workflows/Calculator_Scenario22.yml +++ b/.github/workflows/Calculator_Scenario22.yml @@ -23,7 +23,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Restore dependencies (Console project) diff --git a/.github/workflows/Calculator_Scenario23.yml b/.github/workflows/Calculator_Scenario23.yml index 22266c0..36c09e3 100644 --- a/.github/workflows/Calculator_Scenario23.yml +++ b/.github/workflows/Calculator_Scenario23.yml @@ -23,7 +23,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Restore dependencies (Console project) diff --git a/.github/workflows/Calculator_Scenario24.yml b/.github/workflows/Calculator_Scenario24.yml index d1e8839..c73eb63 100644 --- a/.github/workflows/Calculator_Scenario24.yml +++ b/.github/workflows/Calculator_Scenario24.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/Calculator_Scenario25.yml b/.github/workflows/Calculator_Scenario25.yml index f645e45..f613de7 100644 --- a/.github/workflows/Calculator_Scenario25.yml +++ b/.github/workflows/Calculator_Scenario25.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Install dotnet-coverage run: dotnet tool install -g dotnet-coverage - name: Restore dependencies diff --git a/samples/Calculator/scenarios/scenario01/README.md b/samples/Calculator/scenarios/scenario01/README.md index d4e5746..f8f8c4c 100644 --- a/samples/Calculator/scenarios/scenario01/README.md +++ b/samples/Calculator/scenarios/scenario01/README.md @@ -22,7 +22,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario02/README.md b/samples/Calculator/scenarios/scenario02/README.md index 1ad4a5c..8efcc2e 100644 --- a/samples/Calculator/scenarios/scenario02/README.md +++ b/samples/Calculator/scenarios/scenario02/README.md @@ -20,7 +20,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario03/README.md b/samples/Calculator/scenarios/scenario03/README.md index 94762f5..56ffb45 100644 --- a/samples/Calculator/scenarios/scenario03/README.md +++ b/samples/Calculator/scenarios/scenario03/README.md @@ -22,7 +22,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario04/README.md b/samples/Calculator/scenarios/scenario04/README.md index 24749e3..e0a8242 100644 --- a/samples/Calculator/scenarios/scenario04/README.md +++ b/samples/Calculator/scenarios/scenario04/README.md @@ -20,7 +20,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario05/README.md b/samples/Calculator/scenarios/scenario05/README.md index 451a883..d315228 100644 --- a/samples/Calculator/scenarios/scenario05/README.md +++ b/samples/Calculator/scenarios/scenario05/README.md @@ -61,7 +61,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario06/README.md b/samples/Calculator/scenarios/scenario06/README.md index 8d1c80b..86fbe2b 100644 --- a/samples/Calculator/scenarios/scenario06/README.md +++ b/samples/Calculator/scenarios/scenario06/README.md @@ -54,7 +54,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario07/README.md b/samples/Calculator/scenarios/scenario07/README.md index 32779f3..718da02 100644 --- a/samples/Calculator/scenarios/scenario07/README.md +++ b/samples/Calculator/scenarios/scenario07/README.md @@ -45,7 +45,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario08/README.md b/samples/Calculator/scenarios/scenario08/README.md index 97d2faa..61f00ee 100644 --- a/samples/Calculator/scenarios/scenario08/README.md +++ b/samples/Calculator/scenarios/scenario08/README.md @@ -22,7 +22,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario09/README.md b/samples/Calculator/scenarios/scenario09/README.md index 92ab6c3..54158e8 100644 --- a/samples/Calculator/scenarios/scenario09/README.md +++ b/samples/Calculator/scenarios/scenario09/README.md @@ -45,7 +45,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario10/README.md b/samples/Calculator/scenarios/scenario10/README.md index e26baf6..ed9f827 100644 --- a/samples/Calculator/scenarios/scenario10/README.md +++ b/samples/Calculator/scenarios/scenario10/README.md @@ -27,7 +27,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario11/README.md b/samples/Calculator/scenarios/scenario11/README.md index 57242c5..9348530 100644 --- a/samples/Calculator/scenarios/scenario11/README.md +++ b/samples/Calculator/scenarios/scenario11/README.md @@ -47,7 +47,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Restore dependencies (Console project) diff --git a/samples/Calculator/scenarios/scenario12/README.md b/samples/Calculator/scenarios/scenario12/README.md index 369c527..58b8bf6 100644 --- a/samples/Calculator/scenarios/scenario12/README.md +++ b/samples/Calculator/scenarios/scenario12/README.md @@ -47,7 +47,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Restore dependencies (Console project) diff --git a/samples/Calculator/scenarios/scenario13/README.md b/samples/Calculator/scenarios/scenario13/README.md index adb51cd..132ae74 100644 --- a/samples/Calculator/scenarios/scenario13/README.md +++ b/samples/Calculator/scenarios/scenario13/README.md @@ -22,7 +22,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario14/README.md b/samples/Calculator/scenarios/scenario14/README.md index c423a56..415fe4a 100644 --- a/samples/Calculator/scenarios/scenario14/README.md +++ b/samples/Calculator/scenarios/scenario14/README.md @@ -29,7 +29,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario15/README.md b/samples/Calculator/scenarios/scenario15/README.md index bafbd1e..d40e03a 100644 --- a/samples/Calculator/scenarios/scenario15/README.md +++ b/samples/Calculator/scenarios/scenario15/README.md @@ -29,7 +29,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario16/README.md b/samples/Calculator/scenarios/scenario16/README.md index 2160f7f..eee6656 100644 --- a/samples/Calculator/scenarios/scenario16/README.md +++ b/samples/Calculator/scenarios/scenario16/README.md @@ -37,7 +37,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario17/README.md b/samples/Calculator/scenarios/scenario17/README.md index bf8f9ab..1f37aa8 100644 --- a/samples/Calculator/scenarios/scenario17/README.md +++ b/samples/Calculator/scenarios/scenario17/README.md @@ -36,7 +36,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario18/README.md b/samples/Calculator/scenarios/scenario18/README.md index 8b11618..9869b15 100644 --- a/samples/Calculator/scenarios/scenario18/README.md +++ b/samples/Calculator/scenarios/scenario18/README.md @@ -29,7 +29,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario19/README.md b/samples/Calculator/scenarios/scenario19/README.md index 43051e4..27aa529 100644 --- a/samples/Calculator/scenarios/scenario19/README.md +++ b/samples/Calculator/scenarios/scenario19/README.md @@ -61,7 +61,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario20/README.md b/samples/Calculator/scenarios/scenario20/README.md index dbda3fd..529a138 100644 --- a/samples/Calculator/scenarios/scenario20/README.md +++ b/samples/Calculator/scenarios/scenario20/README.md @@ -59,7 +59,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario21/README.md b/samples/Calculator/scenarios/scenario21/README.md index a5c4353..1cf3eb4 100644 --- a/samples/Calculator/scenarios/scenario21/README.md +++ b/samples/Calculator/scenarios/scenario21/README.md @@ -22,7 +22,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario22/README.md b/samples/Calculator/scenarios/scenario22/README.md index 0122b9b..65b2816 100644 --- a/samples/Calculator/scenarios/scenario22/README.md +++ b/samples/Calculator/scenarios/scenario22/README.md @@ -54,7 +54,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Restore dependencies (Console project) diff --git a/samples/Calculator/scenarios/scenario23/README.md b/samples/Calculator/scenarios/scenario23/README.md index da7fbb4..7271bd3 100644 --- a/samples/Calculator/scenarios/scenario23/README.md +++ b/samples/Calculator/scenarios/scenario23/README.md @@ -54,7 +54,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Restore dependencies (Console project) diff --git a/samples/Calculator/scenarios/scenario24/README.md b/samples/Calculator/scenarios/scenario24/README.md index e0576a6..36a8101 100644 --- a/samples/Calculator/scenarios/scenario24/README.md +++ b/samples/Calculator/scenarios/scenario24/README.md @@ -22,7 +22,7 @@ Executing tests is automatically creating `cobertura` report. Then `reportgenera - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/samples/Calculator/scenarios/scenario25/README.md b/samples/Calculator/scenarios/scenario25/README.md index 46f5d86..9834b64 100644 --- a/samples/Calculator/scenarios/scenario25/README.md +++ b/samples/Calculator/scenarios/scenario25/README.md @@ -24,7 +24,7 @@ Executing tests is automatically creating `cobertura` report. Then `reportgenera - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Install dotnet-coverage run: dotnet tool install -g dotnet-coverage - name: Restore dependencies diff --git a/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj b/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj index 1b9ad62..8317e83 100644 --- a/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable diff --git a/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj b/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj index 0efb275..a724e48 100644 --- a/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable diff --git a/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj b/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj index bf4cc62..9eb5406 100644 --- a/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj +++ b/samples/Calculator/tests/Calculator.Server.IntegrationTests/Calculator.Server.IntegrationTests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable diff --git a/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj b/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj index 6625023..16fb8a6 100644 --- a/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable From fff3586d0f696d6febcea940a49ab347d265aeb2 Mon Sep 17 00:00:00 2001 From: faisal Date: Tue, 28 Jan 2025 11:27:41 +0100 Subject: [PATCH 04/11] more, --- .../Calculator.Console.Tests/Calculator.Console.Tests.csproj | 2 +- .../tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj | 2 +- .../Calculator.Server.Tests/Calculator.Server.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj b/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj index 8317e83..f5c3fb9 100644 --- a/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Console.Tests/Calculator.Console.Tests.csproj @@ -12,7 +12,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj b/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj index a724e48..f37650c 100644 --- a/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Core.Tests/Calculator.Core.Tests.csproj @@ -12,7 +12,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj b/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj index 16fb8a6..cfbf4a5 100644 --- a/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj @@ -13,7 +13,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all From e9652e08faade91e9675f6eefcb60a5d069a6551 Mon Sep 17 00:00:00 2001 From: faisal Date: Tue, 28 Jan 2025 11:29:38 +0100 Subject: [PATCH 05/11] more, --- .../Calculator.Server.Tests/Calculator.Server.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj b/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj index cfbf4a5..f801147 100644 --- a/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj +++ b/samples/Calculator/tests/Calculator.Server.Tests/Calculator.Server.Tests.csproj @@ -10,7 +10,7 @@ - + From 98702e9f40ba2132be945eeb7837433cad2d47c6 Mon Sep 17 00:00:00 2001 From: faisal Date: Wed, 12 Feb 2025 17:27:30 +0100 Subject: [PATCH 06/11] Fixing warnings related to markdown, --- README.md | 27 ++++--- docs/configuration.md | 23 +++--- docs/instrumentation.md | 5 +- docs/performance/README.md | 5 +- docs/supported-os.md | 2 +- samples/Algorithms/README.md | 3 +- .../Algorithms/scenarios/scenario01/README.md | 10 +-- .../Algorithms/scenarios/scenario02/README.md | 12 +-- .../Algorithms/scenarios/scenario03/README.md | 10 +-- .../Algorithms/scenarios/scenario04/README.md | 10 +-- .../Algorithms/scenarios/scenario05/README.md | 10 +-- .../Algorithms/scenarios/scenario06/README.md | 10 +-- samples/Calculator/README.md | 5 +- .../Calculator/scenarios/scenario01/README.md | 10 +-- .../Calculator/scenarios/scenario02/README.md | 10 +-- .../Calculator/scenarios/scenario03/README.md | 10 +-- .../Calculator/scenarios/scenario04/README.md | 8 +- .../Calculator/scenarios/scenario05/README.md | 12 +-- .../Calculator/scenarios/scenario06/README.md | 13 ++-- .../Calculator/scenarios/scenario07/README.md | 12 +-- .../Calculator/scenarios/scenario08/README.md | 10 +-- .../Calculator/scenarios/scenario09/README.md | 12 +-- .../Calculator/scenarios/scenario10/README.md | 10 +-- .../Calculator/scenarios/scenario11/README.md | 13 ++-- .../Calculator/scenarios/scenario12/README.md | 13 ++-- .../Calculator/scenarios/scenario13/README.md | 10 +-- .../Calculator/scenarios/scenario14/README.md | 10 +-- .../Calculator/scenarios/scenario15/README.md | 8 +- .../Calculator/scenarios/scenario16/README.md | 10 +-- .../Calculator/scenarios/scenario17/README.md | 10 +-- .../Calculator/scenarios/scenario18/README.md | 10 +-- .../Calculator/scenarios/scenario19/README.md | 13 ++-- .../Calculator/scenarios/scenario20/README.md | 12 +-- .../Calculator/scenarios/scenario21/README.md | 10 +-- .../Calculator/scenarios/scenario22/README.md | 12 +-- .../Calculator/scenarios/scenario23/README.md | 12 +-- .../Calculator/scenarios/scenario24/README.md | 10 +-- .../Calculator/scenarios/scenario25/README.md | 10 +-- .../scenarios/scenario01/README.md | 1 + .../scenarios/scenario06/README.md | 2 +- .../scenarios/scenario07/README.md | 2 +- .../scenarios/scenario08/README.md | 73 ++++++++++--------- .../scenarios/scenario09/README.md | 12 +-- 43 files changed, 256 insertions(+), 236 deletions(-) diff --git a/README.md b/README.md index 8738e9d..ca2f675 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,15 @@ Microsoft code coverage functionality is closed source. This repository contains ## Get started To collect code coverage for .NET test project you can simply execute: + ```shell dotnet new mstest -o mstests cd mstests dotnet test --collect "Code Coverage;Format=cobertura" ``` + You should see output: + ```shell Determining projects to restore... All projects are up-to-date for restore. @@ -29,6 +32,7 @@ Attachments: ``` For any .NET application you can collect code coverage in this way: + ```shell dotnet new console -o sample1 cd sample1 @@ -37,9 +41,9 @@ dotnet-coverage collect "dotnet run" ``` You should see output: + ```shell -Microsoft (R) Code Coverage Command Line Tool (x64) -Copyright (c) Microsoft Corporation. All rights reserved. +dotnet-coverage v17.13.1.0 [win-x64 - .NET 9.0.2] SessionId: d1bf31db-f634-4b2c-a627-c708ac93d85b Hello, World! @@ -47,22 +51,25 @@ Code coverage results: output.coverage. ``` For existing projects to get latest features and best performance please keep up to date below references: + ```xml - - + + ``` If your solution doesn't contain any C++ code it is recommended to disable native code coverage by adding into configuration below flags: + ```xml False False ``` + Check other configuration options [here](docs/configuration.md). -## Documentation +## Documentation -* Documentation for `dotnet-coverage` tool is available at https://aka.ms/dotnet-coverage. -* Documentation for `Microsoft.CodeCoverage` is available at https://learn.microsoft.com/visualstudio/test/customizing-code-coverage-analysis +* Documentation for `dotnet-coverage` tool is available [here](https://aka.ms/dotnet-coverage). +* Documentation for `Microsoft.CodeCoverage` is available [here](https://learn.microsoft.com/visualstudio/test/customizing-code-coverage-analysis) * [Supported OS versions](docs/supported-os.md) * [Configuration](docs/configuration.md) * [Performance data](/docs/performance/README.md) @@ -77,7 +84,7 @@ Check other configuration options [here](docs/configuration.md). This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us -the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. +the rights to use your contribution. For details, visit [Contributor License Agreements](https://opensource.microsoft.com/cla/). When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions @@ -89,8 +96,8 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio ## Trademarks -This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft -trademarks or logos is subject to and must follow +This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft +trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies. diff --git a/docs/configuration.md b/docs/configuration.md index e1825cd..8ee249e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -10,7 +10,7 @@ | Name | Values | Default | Description | Example | |---|---|---|---|---| | CoverageLogLevel | `Errors`,`Dumps`,`Messages`,`All` | | Code coverage log level | `Dumps` | -| InstrumentationLogLevel | `Errors`,`Dumps`,`Messages`,`All` | | CLR Instrumentation Engine log level. More info here. | `Dumps` | +| InstrumentationLogLevel | `Errors`,`Dumps`,`Messages`,`All` | | CLR Instrumentation Engine log level. More info [here](https://github.com/microsoft/CLRInstrumentationEngine/blob/develop/docs/logging.md). | `Dumps` | | ManagedVanguardLogLevel | `Error`,`Info`,`Verbose`,`None` | | Managed instrumentation log level. Logging of managed side of code coverage. | `Info` | | CoverageFileLogPath | File or directory path | | File path or directory path to place where code coverage and CLR IE logs should be stored. Directory should be specified with `\` at the end. | `D:\examples\logs\coverage.log` | | CoverageFileName | File path | | File path to output code coverage report | `D:\examples\report.coverage` | @@ -27,7 +27,7 @@ | Name | Values | Default | Description | Example | |---|---|---|---|---| -| CommunicationTimeout | Integer | 60000 | Specifies comminication time out in milliseconds | `90000` | +| CommunicationTimeout | Integer | 60000 | Specifies communication time out in milliseconds | `90000` | | PipeClientsCount | Integer | 254 | Specifies number of pipe connections started by coverage server. | `2540` | | CollectFromChildProcesses | `True`, `False` | `True` | When set to True, collects coverage information from child processes that are launched by test or production code. | `True` | | UseVerifiableInstrumentation | `True`, `False` | `True` | Set this to True to collect coverage information for functions marked with the "SecuritySafeCritical" attribute. Instead of writing directly into a memory location from such functions, code coverage inserts a probe that redirects to another function, which in turns writes into memory. | `True` | @@ -44,18 +44,19 @@ | EnableStaticManagedInstrumentationRestore | `True`, `False` | `True` | Enable static managed instrumentation restore. If enabled all instrumented files are restored after collection. | `True` | | SymbolSearchPaths | XML | | Additional paths to search for .pdb (symbol) files. Symbols must be found for modules to be instrumented. If .pdb files are in the same folder as the .dll or .exe files, they are automatically found. Otherwise, specify them here. Note that searching for symbols increases code coverage runtime. So keep this small and local. | `C:\Users\User\Documents\Visual Studio 2012\Projects\ProjectX\bin\Debug` | | AllowedUsers | XML | | Supported only for .NET Framework. Additional users that will be able to access internal shared memory and pipes. | `UserName1` | -| ModulePaths | XML | | Include and exclude lists for module paths.
Empty "Include" clauses imply all; empty "Exclude" clauses imply none. Each element in the list is a regular expression (ECMAScript syntax). See /visualstudio/ide/using-regular-expressions-in-visual-studio. An item must first match at least one entry in the include list to be included. Included items must then not match any entries in the exclude list to remain included. | `.*CPPUnitTestFramework.*` | -| PublicKeyTokens | XML | | Include and exclude lists for public key tokens.
Matches the public key token of a signed assembly. | `^B77A5C561934E089$` | -| CompanyNames | XML | | Include and exclude lists for company names.
Matches the company name property in the assembly. | `.*microsoft.*` | -| Attributes | XML | | Include and exclude lists for attributes.
Matches attributes on any code element. | `^System\.Diagnostics\.DebuggerHiddenAttribute$` | -| Sources | XML | | Include and exclude lists for source files.
Matches the path of the source files in which each method is defined. | `.*\\atlmfc\\.*` | -| Functions | XML | | Include and exclude lists for functions.
Matches fully qualified names of functions. Use `\.` to delimit namespaces in C# or Visual Basic, `::` in C++.). | `^Fabrikam\.UnitTest\..*` | +| ModulePaths | XML | | Include and exclude lists for module paths.\\Empty "Include" clauses imply all; empty "Exclude" clauses imply none. Each element in the list is a regular expression (ECMAScript syntax). See /visualstudio/ide/using-regular-expressions-in-visual-studio. An item must first match at least one entry in the include list to be included. Included items must then not match any entries in the exclude list to remain included. | `.*CPPUnitTestFramework.*` | +| PublicKeyTokens | XML | | Include and exclude lists for public key tokens.\\Matches the public key token of a signed assembly. | `^B77A5C561934E089$` | +| CompanyNames | XML | | Include and exclude lists for company names.\\Matches the company name property in the assembly. | `.*microsoft.*` | +| Attributes | XML | | Include and exclude lists for attributes.\\Matches attributes on any code element. | `^System\.Diagnostics\.DebuggerHiddenAttribute$` | +| Sources | XML | | Include and exclude lists for source files.\\Matches the path of the source files in which each method is defined. | `.*\\atlmfc\\.*` | +| Functions | XML | | Include and exclude lists for functions.\\Matches fully qualified names of functions. Use `\.` to delimit namespaces in C# or Visual Basic, `::` in C++.). | `^Fabrikam\.UnitTest\..*` | | DumpStaticNativeDisassembly | `True`, `False` | `False` | Generates the assembler dump of the native static instrumentation close to the module. | `True` | | FileLogPath | `C:\folder\` or `C:\folder\log.txt` | | Set the path for the static native instrumentation. | `C:\folder\log.txt` | | LogLevel | `Errors`,`Dumps`,`Messages`,`All` | | Set the log level for the static native instrumentation. | `All` | + ## Example -``` +```xml @@ -161,8 +162,10 @@ ``` + To enable all available logs -``` + +```xml diff --git a/docs/instrumentation.md b/docs/instrumentation.md index 128f5b5..d3c557a 100644 --- a/docs/instrumentation.md +++ b/docs/instrumentation.md @@ -8,8 +8,8 @@ Therefore, in version [17.5.0](https://www.nuget.org/packages/Microsoft.CodeCove Dynamic instrumentation necessitates configuring environment variables (CLR Profiling) for code coverage collection. In environments where this isn't feasible, such as in IIS, we recommend opting for static instrumentation. - You can control dynamic and static instrumentation using below flags in your configuration: + ```xml True @@ -24,7 +24,8 @@ As we mentioned above when static instrumentation is enabled libraries and corre False ``` -It can be useful when debugging some issues or to speed up build inside pipeline. + +It can be useful when debugging some issues or to speed up build inside pipeline. > **_NOTE:_** Make sure instrumented binaries are not deployed into production. diff --git a/docs/performance/README.md b/docs/performance/README.md index acffea5..54095d5 100644 --- a/docs/performance/README.md +++ b/docs/performance/README.md @@ -1,3 +1,5 @@ +# Code coverage performance results + Project name | Configuration | No code coverage | Code coverage 16.5 | Code coverage 17.0 | Code coverage 17.5 | Code coverage 17.9 -------------|---------------------------|----------|----------|----------|----------|--------- InteractiveHost UnitTests | net8.0 Debug | 129.82s | 361.82s (+178.70%) | 278.19s (+114.28%) | 266.49s (+105.27%) | 188.61s (+45.28%) @@ -100,8 +102,7 @@ VBCSCompiler UnitTests | net472 Debug | 58.47s | 87.00s (+48.80%) | 75.98s (+29. VBCSCompiler UnitTests | net472 Release | 52.65s | 82.66s (+56.99%) | 71.18s (+35.18%) | 65.19s (+23.80%) | 60.04s (+14.02%) VBCSCompiler UnitTests | net8.0 Debug | 30.34s | 52.15s (+71.85%) | 47.68s (+57.12%) | 42.01s (+38.44%) | 39.00s (+28.52%) VBCSCompiler UnitTests | net8.0 Release | 29.26s | 48.75s (+66.62%) | 45.37s (+55.06%) | 39.92s (+36.45%) | 36.80s (+25.78%) -**Total** | | **11520.27s** | **25493.41s (+121.29%)** | **20270.25s (+75.95%)** | **16792.62s (+45.77%)** | **14520.69s (+26.04%)** - +**Total** | | **11520.27s** | **25493.41s (+121.29%)** | **20270.25s (+75.95%)** | **16792.62s (+45.77%)** | **14520.69s (+26.04%)** Package | Time | Ratio --------|------|------ diff --git a/docs/supported-os.md b/docs/supported-os.md index 56a9a10..2421632 100644 --- a/docs/supported-os.md +++ b/docs/supported-os.md @@ -33,4 +33,4 @@ Other operating systems are supported at best effort. On macOS and linux dynamic instrumentation requires [libxml2](https://github.com/GNOME/libxml2) package to be installed. -On Alpine 3.18+ dynamic instrumentation requires [libintl](https://pkgs.alpinelinux.org/package/edge/main/x86/libintl) package to be installed. \ No newline at end of file +On Alpine 3.18+ dynamic instrumentation requires [libintl](https://pkgs.alpinelinux.org/package/edge/main/x86/libintl) package to be installed. diff --git a/samples/Algorithms/README.md b/samples/Algorithms/README.md index 45bc178..8f84d9e 100644 --- a/samples/Algorithms/README.md +++ b/samples/Algorithms/README.md @@ -1,12 +1,13 @@ # Solution summary Solution contains two projects: + 1. `Algorithms.Core` - contains core logic for solution 2. `Algorithms.Console` - contains Native AOT console app 3. `Algorithms.Core.Tests` - contains unit tests for `Algorithms.Core`. It is [MSTest runner project](https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-mstest-runner-intro?tabs=dotnetcli) 4. `Algorithms.Core.MSTest.Sdk.Tests` - contains unit tests for `Algorithms.Core`. It is [MSTest runner project using MSTest SDK](https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-mstest-sdk) -# Scenarios +## Scenarios 1. [***Scenario 01*** Code coverage for MSTest Runner project using dynamic instrumentation](scenarios/scenario01/README.md) 2. [***Scenario 02*** Code coverage for MSTest Runner project using static instrumentation](scenarios/scenario02/README.md) diff --git a/samples/Algorithms/scenarios/scenario01/README.md b/samples/Algorithms/scenarios/scenario01/README.md index f1c2ede..1a3511d 100644 --- a/samples/Algorithms/scenarios/scenario01/README.md +++ b/samples/Algorithms/scenarios/scenario01/README.md @@ -4,7 +4,7 @@ Collect code coverage using dynamic instrumentation for MSTest runner project. > **_NOTE:_** MSTest runner project coverage extension by default is not collecting native code coverage. If you want to enable please set to `True` `EnableStaticNativeInstrumentation` or `EnableDynamicNativeInstrumentation` in configuration. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -14,7 +14,7 @@ dotnet run --coverage --coverage-output report.cobertura.xml --coverage-output-f You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow `reportgenerator` can be used to generate final github summary markdown. @@ -50,7 +50,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Algorithms_Scenario01.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -89,8 +89,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Algorithms/scenarios/scenario02/README.md b/samples/Algorithms/scenarios/scenario02/README.md index 7e2a503..c7b0e20 100644 --- a/samples/Algorithms/scenarios/scenario02/README.md +++ b/samples/Algorithms/scenarios/scenario02/README.md @@ -4,7 +4,7 @@ Collect code coverage using static instrumentation for MSTest runner project. As > **_NOTE:_** MSTest runner project coverage extension by default is not collecting native code coverage. If you want to enable please set to `True` `EnableStaticNativeInstrumentation` or `EnableDynamicNativeInstrumentation` in configuration. -# Configuration +## Configuration ```xml @@ -17,7 +17,7 @@ Collect code coverage using static instrumentation for MSTest runner project. As ``` -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -27,7 +27,7 @@ dotnet run --coverage --coverage-output report.cobertura.xml --coverage-output-f You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow `reportgenerator` can be used to generate final github summary markdown. @@ -63,7 +63,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Algorithms_Scenario02.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -102,8 +102,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Algorithms/scenarios/scenario03/README.md b/samples/Algorithms/scenarios/scenario03/README.md index f801e7c..2f15ede 100644 --- a/samples/Algorithms/scenarios/scenario03/README.md +++ b/samples/Algorithms/scenarios/scenario03/README.md @@ -4,7 +4,7 @@ Collect code coverage using compile-time instrumentation for MSTest runner proje > **_NOTE:_** MSTest runner project coverage extension by default is not collecting native code coverage. If you want to enable please set to `True` `EnableStaticNativeInstrumentation` or `EnableDynamicNativeInstrumentation` in configuration. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -15,7 +15,7 @@ dotnet run --no-build --coverage --coverage-output report.cobertura.xml --covera You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow `reportgenerator` can be used to generate final github summary markdown. @@ -51,7 +51,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Algorithms_Scenario03.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -85,8 +85,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Algorithms/scenarios/scenario04/README.md b/samples/Algorithms/scenarios/scenario04/README.md index cc093ef..fde6567 100644 --- a/samples/Algorithms/scenarios/scenario04/README.md +++ b/samples/Algorithms/scenarios/scenario04/README.md @@ -4,7 +4,7 @@ Collect code coverage using `dotnet-coverage` tool for MSTest runner project. > **_NOTE:_** MSTest runner project coverage extension by default is not collecting native code coverage. If you want to enable please set to `True` `EnableStaticNativeInstrumentation` or `EnableDynamicNativeInstrumentation` in configuration. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -16,7 +16,7 @@ dotnet-coverage collect --output report.cobertura.xml --output-format cobertura You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow `reportgenerator` can be used to generate final github summary markdown. @@ -54,7 +54,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Algorithms_Scenario04.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -99,8 +99,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Algorithms/scenarios/scenario05/README.md b/samples/Algorithms/scenarios/scenario05/README.md index 38e86ac..c38e000 100644 --- a/samples/Algorithms/scenarios/scenario05/README.md +++ b/samples/Algorithms/scenarios/scenario05/README.md @@ -4,7 +4,7 @@ Collect code coverage using `dotnet-coverage` tool for Native AOT console applic > **_NOTE:_** `Microsoft.CodeCoverage.MSBuild` package needs to be added as reference of console application. Remember to re-publish your application without coverage instrumentation before deploying to production. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -16,7 +16,7 @@ dotnet-coverage collect --output report.cobertura.xml --output-format cobertura You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow `reportgenerator` can be used to generate final github summary markdown. @@ -52,7 +52,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Algorithms_Scenario05.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -87,8 +87,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Algorithms/scenarios/scenario06/README.md b/samples/Algorithms/scenarios/scenario06/README.md index 19089b0..a371978 100644 --- a/samples/Algorithms/scenarios/scenario06/README.md +++ b/samples/Algorithms/scenarios/scenario06/README.md @@ -4,7 +4,7 @@ Collect code coverage for MSTest runner project in Native AOT mode. > **_NOTE:_** MSTest runner project coverage extension by default is not collecting native code coverage. If you want to enable please set to `True` `EnableStaticNativeInstrumentation` or `EnableDynamicNativeInstrumentation` in configuration. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -15,7 +15,7 @@ dotnet publish -r win-x64 -c Release /p:AotMsCodeCoverageInstrumentation="true" You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow `reportgenerator` can be used to generate final github summary markdown. @@ -50,7 +50,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Algorithms_Scenario06.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -84,8 +84,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/README.md b/samples/Calculator/README.md index f61eda3..4455bde 100644 --- a/samples/Calculator/README.md +++ b/samples/Calculator/README.md @@ -1,6 +1,7 @@ # Solution summary Solution contains seven projects: + 1. `Calculator.Core` - contains core logic for solution 2. `Calculator.Console` - console application, references `Calculator.Core` 3. `Calculator.Server` - ASP.NET Core service, references `Calculator.Core` @@ -9,7 +10,7 @@ Solution contains seven projects: 6. `Calculator.Server.Tests` - standard ASP.NET Core tests for `Calculator.Server` project 7. `Calculator.Server.IntegrationTests` - integration tests for `Calculator.Server` project. Before tests are executed `Calculator.Server` needs to be started locally -# Scenarios +## Scenarios 1. [***Scenario 01*** Default settings (binary .coverage report)](scenarios/scenario01/README.md) 2. [***Scenario 02*** Cobertura format by command line](scenarios/scenario02/README.md) @@ -35,4 +36,4 @@ Solution contains seven projects: 22. [***Scenario 22*** Code coverage for child processes using static instrumentation without binaries restore](scenarios/scenario22/README.md) 23. [***Scenario 23*** Code coverage for child processes using static instrumentation with binaries restore](scenarios/scenario23/README.md) 24. [***Scenario 24*** Code coverage for whole solution (only unit tests)](scenarios/scenario24/README.md) -25. [***Scenario 25*** Code coverage for whole solution (only unit tests - using dotnet-coverage)](scenarios/scenario25/README.md) \ No newline at end of file +25. [***Scenario 25*** Code coverage for whole solution (only unit tests - using dotnet-coverage)](scenarios/scenario25/README.md) diff --git a/samples/Calculator/scenarios/scenario01/README.md b/samples/Calculator/scenarios/scenario01/README.md index f8f8c4c..5a6dbd8 100644 --- a/samples/Calculator/scenarios/scenario01/README.md +++ b/samples/Calculator/scenarios/scenario01/README.md @@ -2,7 +2,7 @@ Collect code coverage using default settings. Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -12,7 +12,7 @@ dotnet test --collect "Code Coverage" You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow To generate summary report `.coverage` report needs to be converted to `cobertura` report using `dotnet-coverage` tool. Then `reportgenerator` can be used to generate final github summary markdown. @@ -52,7 +52,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur [Run example](../../../../../../actions/workflows/Calculator_Scenario01.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -83,8 +83,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.coverage) \ No newline at end of file +[Link](example.report.coverage) diff --git a/samples/Calculator/scenarios/scenario02/README.md b/samples/Calculator/scenarios/scenario02/README.md index 8efcc2e..c032bb4 100644 --- a/samples/Calculator/scenarios/scenario02/README.md +++ b/samples/Calculator/scenarios/scenario02/README.md @@ -2,7 +2,7 @@ Collect code coverage using cobertura report format without specifying configuration. Cobertura report format can be used to generate HTML report using [report generator](https://github.com/danielpalme/ReportGenerator). This format can be also used with [PublishCodeCoverageResults@2](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2?view=azure-pipelines) in Azure DevOps pipelines. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -12,7 +12,7 @@ dotnet test --collect "Code Coverage;Format=cobertura" You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -46,7 +46,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario02.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -90,8 +90,8 @@ steps: ![alt text](azure-pipelines2.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario03/README.md b/samples/Calculator/scenarios/scenario03/README.md index 56ffb45..96a2429 100644 --- a/samples/Calculator/scenarios/scenario03/README.md +++ b/samples/Calculator/scenarios/scenario03/README.md @@ -2,7 +2,7 @@ Collect code coverage using cobertura report format by specifying configuration. Cobertura report format can be used to generate HTML report using [report generator](https://github.com/danielpalme/ReportGenerator). This format can be also used with [PublishCodeCoverageResults@2](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2?view=azure-pipelines) in Azure DevOps pipelines. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -14,7 +14,7 @@ dotnet test --settings ../../scenarios/scenario03/coverage.runsettings You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -48,7 +48,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario03.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -92,8 +92,8 @@ steps: ![alt text](azure-pipelines2.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario04/README.md b/samples/Calculator/scenarios/scenario04/README.md index e0a8242..f14a41d 100644 --- a/samples/Calculator/scenarios/scenario04/README.md +++ b/samples/Calculator/scenarios/scenario04/README.md @@ -2,7 +2,7 @@ Collect code coverage with XML report format. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -12,7 +12,7 @@ dotnet test --collect "Code Coverage;Format=xml" You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -46,7 +46,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario04.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -88,7 +88,7 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") diff --git a/samples/Calculator/scenarios/scenario05/README.md b/samples/Calculator/scenarios/scenario05/README.md index d315228..58d4ed9 100644 --- a/samples/Calculator/scenarios/scenario05/README.md +++ b/samples/Calculator/scenarios/scenario05/README.md @@ -2,7 +2,7 @@ In this example we want to show you how to exclude from code coverage report whole project (tests project), method (`CalculateDivide`) and source file (`OperationConsts.cs`). We are also using cobertura report format by specifying configuration. Cobertura report format can be used to generate HTML report using [report generator](https://github.com/danielpalme/ReportGenerator). This format can be also used with [PublishCodeCoverageResults@2](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2?view=azure-pipelines) in Azure DevOps pipelines. -# Configuration +## Configuration ```xml @@ -41,7 +41,7 @@ In this example we want to show you how to exclude from code coverage report who > **_NOTE:_** Remember that any regex used for `` or `` is matched for file path not file name. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -53,7 +53,7 @@ dotnet test --settings ../../scenarios/scenario05/coverage.runsettings You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -87,7 +87,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario05.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -129,8 +129,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario06/README.md b/samples/Calculator/scenarios/scenario06/README.md index 86fbe2b..ac31b02 100644 --- a/samples/Calculator/scenarios/scenario06/README.md +++ b/samples/Calculator/scenarios/scenario06/README.md @@ -2,7 +2,7 @@ In this example we want to show you how to exclude from code coverage tests projects and any other libraries (moq, xunit). Regex `.*calculator[^/\\]*\.dll$` makes sure that only libraries containing `calculator` in file name are matched. If path is matched by one of the `` regexes and one of the `` regexes then finally path is excluded. Checking that after `calculator` string there is no `\` or '/' makes sure that path `D:\calculator\moq.dll` is not matched. Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. -# Configuration +## Configuration ```xml @@ -29,12 +29,11 @@ In this example we want to show you how to exclude from code coverage tests proj - ``` > **_NOTE:_** Remember that any regex used for `` or `` is matched for file path not file name. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -46,7 +45,7 @@ dotnet test --settings ../../scenarios/scenario06/coverage.runsettings You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -84,7 +83,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario06.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -115,8 +114,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.coverage) \ No newline at end of file +[Link](example.report.coverage) diff --git a/samples/Calculator/scenarios/scenario07/README.md b/samples/Calculator/scenarios/scenario07/README.md index 718da02..3bab0d9 100644 --- a/samples/Calculator/scenarios/scenario07/README.md +++ b/samples/Calculator/scenarios/scenario07/README.md @@ -2,7 +2,7 @@ In this example we want to show you how to collect code coverage using [static instrumentation](../../../../docs/instrumentation.md). This instrumentation is available on all operating systems ([more info](../../../../docs/supported-os.md)). Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. -# Configuration +## Configuration ```xml @@ -25,7 +25,7 @@ In this example we want to show you how to collect code coverage using [static i ``` -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -37,7 +37,7 @@ dotnet test --settings ../../scenarios/scenario07/coverage.runsettings You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -75,7 +75,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario07.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -106,8 +106,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.coverage) \ No newline at end of file +[Link](example.report.coverage) diff --git a/samples/Calculator/scenarios/scenario08/README.md b/samples/Calculator/scenarios/scenario08/README.md index 61f00ee..7e8a7d4 100644 --- a/samples/Calculator/scenarios/scenario08/README.md +++ b/samples/Calculator/scenarios/scenario08/README.md @@ -2,7 +2,7 @@ This example shows how our tool [dotnet-coverage](https://aka.ms/dotnet-coverage) can be used to collect code coverage for console application. Cobertura report format can be used to generate HTML report using [report generator](https://github.com/danielpalme/ReportGenerator). This format can be also used with [PublishCodeCoverageResults@2](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2?view=azure-pipelines) in Azure DevOps pipelines. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -14,7 +14,7 @@ dotnet-coverage collect -f cobertura "dotnet run --no-build add 10 24" You can also use [run.ps1](run.ps1) to execute this scenario. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -50,7 +50,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. [Run example](../../../../../../actions/workflows/Calculator_Scenario08.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -89,8 +89,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario09/README.md b/samples/Calculator/scenarios/scenario09/README.md index 54158e8..2bef57c 100644 --- a/samples/Calculator/scenarios/scenario09/README.md +++ b/samples/Calculator/scenarios/scenario09/README.md @@ -2,7 +2,7 @@ This example shows how our tool [dotnet-coverage](https://aka.ms/dotnet-coverage) can be used to collect code coverage for console application using [static instrumentation](../../../../docs/instrumentation.md). It is important to remember that files to be instrumented need to be specified using `--include-files`. When executing tests this is not needed as our tooling automatically detects directory with libraries and instrument it. Cobertura report format can be used to generate HTML report using [report generator](https://github.com/danielpalme/ReportGenerator). This format can be also used with [PublishCodeCoverageResults@2](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2?view=azure-pipelines) in Azure DevOps pipelines. -# Configuration +## Configuration ```xml @@ -25,7 +25,7 @@ This example shows how our tool [dotnet-coverage](https://aka.ms/dotnet-coverage ``` -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -37,7 +37,7 @@ dotnet-coverage collect -f cobertura -s ../../scenarios/scenario09/coverage.runs You can also use [run.ps1](run.ps1) to execute this scenario. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -73,7 +73,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. [Run example](../../../../../../actions/workflows/Calculator_Scenario09.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -112,8 +112,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario10/README.md b/samples/Calculator/scenarios/scenario10/README.md index ed9f827..b8fc6c6 100644 --- a/samples/Calculator/scenarios/scenario10/README.md +++ b/samples/Calculator/scenarios/scenario10/README.md @@ -2,7 +2,7 @@ This example shows how our tool [dotnet-coverage](https://aka.ms/dotnet-coverage) can be used to collect code coverage for console application using [static instrumentation](../../../../docs/instrumentation.md). `dotnet-coverage` `instrument` command is used to instrument files and code coverage session is started in background. Similar sequence can be used for more advanced scenarios - for example IIS. When executing tests this is not needed as our tooling automatically detects directory with libraries and instrument it. Cobertura report format can be used to generate HTML report using [report generator](https://github.com/danielpalme/ReportGenerator). This format can be also used with [PublishCodeCoverageResults@2](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2?view=azure-pipelines) in Azure DevOps pipelines. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -19,7 +19,7 @@ dotnet-coverage shutdown TagScenario10 You can also use [run.ps1](run.ps1) to execute this scenario. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -65,7 +65,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. [Run example](../../../../../../actions/workflows/Calculator_Scenario10.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -136,8 +136,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario11/README.md b/samples/Calculator/scenarios/scenario11/README.md index 9348530..6cec977 100644 --- a/samples/Calculator/scenarios/scenario11/README.md +++ b/samples/Calculator/scenarios/scenario11/README.md @@ -2,7 +2,7 @@ This example shows that dynamic code coverage by default is collecting code coverage also for all child processes. `Calculator.Console.Tests` run tests by spawning `Calculator.Console` as child process. Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. -# Configuration +## Configuration ```xml @@ -22,10 +22,9 @@ This example shows that dynamic code coverage by default is collecting code cove - ``` -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -39,7 +38,7 @@ dotnet test --settings ../../scenarios/scenario11/coverage.runsettings You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -81,7 +80,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario11.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -125,8 +124,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.coverage) \ No newline at end of file +[Link](example.report.coverage) diff --git a/samples/Calculator/scenarios/scenario12/README.md b/samples/Calculator/scenarios/scenario12/README.md index 58b8bf6..56c4ff6 100644 --- a/samples/Calculator/scenarios/scenario12/README.md +++ b/samples/Calculator/scenarios/scenario12/README.md @@ -2,7 +2,7 @@ This example shows dynamic code coverage with child processes collection disabled (compare with [scenario 11](../scenario11/README.md)). `Calculator.Console.Tests` run tests by spawning `Calculator.Console` as child process. Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. -# Configuration +## Configuration ```xml @@ -22,10 +22,9 @@ This example shows dynamic code coverage with child processes collection disable - ``` -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -39,7 +38,7 @@ dotnet test --settings ../../scenarios/scenario12/coverage.runsettings You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -81,7 +80,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario12.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -125,8 +124,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.coverage) \ No newline at end of file +[Link](example.report.coverage) diff --git a/samples/Calculator/scenarios/scenario13/README.md b/samples/Calculator/scenarios/scenario13/README.md index 132ae74..546a640 100644 --- a/samples/Calculator/scenarios/scenario13/README.md +++ b/samples/Calculator/scenarios/scenario13/README.md @@ -2,7 +2,7 @@ Collect code coverage for ASP.NET Core tests. Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -12,7 +12,7 @@ dotnet test --collect "Code Coverage" You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow To generate summary report `.coverage` report needs to be converted to `cobertura` report using `dotnet-coverage` tool. Then `reportgenerator` can be used to generate final github summary markdown. @@ -52,7 +52,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur [Run example](../../../../../../actions/workflows/Calculator_Scenario13.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -83,8 +83,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.coverage) \ No newline at end of file +[Link](example.report.coverage) diff --git a/samples/Calculator/scenarios/scenario14/README.md b/samples/Calculator/scenarios/scenario14/README.md index 415fe4a..448c3cc 100644 --- a/samples/Calculator/scenarios/scenario14/README.md +++ b/samples/Calculator/scenarios/scenario14/README.md @@ -2,7 +2,7 @@ Collect code coverage for ASP.NET Core integration tests. You can find here example how to collect coverage for server and tests if they are running in separate processes and server is started before tests execution. `dotnet-coverage` tool is used to collect code coverage for server. At the end code coverage results for server and tests are merged. Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. In pipelines during merging final coverage report is converted into cobertura format and published. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -19,7 +19,7 @@ dotnet-coverage merge --output merged.coverage **/*.coverage ../../src/Calculato You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow To generate summary report `.coverage` report needs to be converted to `cobertura` report using `dotnet-coverage` tool. Then `reportgenerator` can be used to generate final github summary markdown. @@ -66,7 +66,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur [Run example](../../../../../../actions/workflows/Calculator_Scenario14.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -147,8 +147,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario15/README.md b/samples/Calculator/scenarios/scenario15/README.md index d40e03a..db9b0c7 100644 --- a/samples/Calculator/scenarios/scenario15/README.md +++ b/samples/Calculator/scenarios/scenario15/README.md @@ -2,7 +2,7 @@ Collect code coverage for ASP.NET Core integration tests. You can find here example how to collect coverage for server and tests if they are running in separate processes and server is started before tests execution. `dotnet-coverage` tool in server mode is used to collect code coverage for server and tests. `connect` command is used to attach server and tests processes into coverage collection. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -19,7 +19,7 @@ dotnet-coverage shutdown TagScenario15 You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow To generate summary report `.coverage` report needs to be converted to `cobertura` report using `dotnet-coverage` tool. Then `reportgenerator` can be used to generate final github summary markdown. @@ -66,7 +66,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur [Run example](../../../../../../actions/workflows/Calculator_Scenario15.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -144,7 +144,7 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") diff --git a/samples/Calculator/scenarios/scenario16/README.md b/samples/Calculator/scenarios/scenario16/README.md index eee6656..2bc63ba 100644 --- a/samples/Calculator/scenarios/scenario16/README.md +++ b/samples/Calculator/scenarios/scenario16/README.md @@ -2,7 +2,7 @@ Collect code coverage for ASP.NET Core integration tests and take snapshots for each test. You can find here example how to collect coverage for server and tests if they are running in separate processes and server is started before tests execution. We generate code coverage report for each test separately using `dotnet-coverage` tool (`snapshot` command). Each snapshot operation resets all coverage data. At the end all snapshots are merged into final coverage report. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -27,7 +27,7 @@ dotnet-coverage merge --output-format cobertura --output report.cobertura.xml *. You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow `reportgenerator` can be used to generate final github summary markdown. @@ -91,7 +91,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario16.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -217,7 +217,7 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report examples +## Report examples ![alt text](example.report.jpg "Example report") @@ -225,4 +225,4 @@ steps: [snapshot1](example.snapshot1.cobertura.xml) [snapshot2](example.snapshot2.cobertura.xml) [snapshot3](example.snapshot3.cobertura.xml) -[snapshot4](example.snapshot4.cobertura.xml) \ No newline at end of file +[snapshot4](example.snapshot4.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario17/README.md b/samples/Calculator/scenarios/scenario17/README.md index 1f37aa8..b1f9951 100644 --- a/samples/Calculator/scenarios/scenario17/README.md +++ b/samples/Calculator/scenarios/scenario17/README.md @@ -2,7 +2,7 @@ Collect code coverage for ASP.NET Core integration tests and take snapshots after each test. You can find here example how to collect coverage for server and tests if they are running in separate processes and server is started before tests execution. After each test we take snapshot of code coverage using `dotnet-coverage` tool (`snapshot` command). Each snapshot operation does not reset all coverage data. This is probably not real example but we just want to show you snapshot operation without reseting counters. Note that with each snapshot taken code coverage should be increasing. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -26,7 +26,7 @@ cd ../../ You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow `reportgenerator` can be used to generate final github summary markdown. @@ -87,7 +87,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario17.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -206,7 +206,7 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report examples +## Report examples ![alt text](example.report.jpg "Example report") @@ -214,4 +214,4 @@ steps: [snapshot1](example.snapshot1.cobertura.xml) [snapshot2](example.snapshot2.cobertura.xml) [snapshot3](example.snapshot3.cobertura.xml) -[snapshot4](example.snapshot4.cobertura.xml) \ No newline at end of file +[snapshot4](example.snapshot4.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario18/README.md b/samples/Calculator/scenarios/scenario18/README.md index 9869b15..792db06 100644 --- a/samples/Calculator/scenarios/scenario18/README.md +++ b/samples/Calculator/scenarios/scenario18/README.md @@ -2,7 +2,7 @@ Collect code coverage for whole solution. You can find here example how to collect coverage for server and tests if they are running in separate processes and server is started before tests execution. `dotnet-coverage` tool is used to collect code coverage for server. At the end code coverage results for server and tests are merged. Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. In pipelines during merging final coverage report is converted into cobertura format and published. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -19,7 +19,7 @@ dotnet-coverage merge --output merged.coverage "./TestResults/**/*.coverage" ./s You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow To generate summary report `.coverage` report needs to be converted to `cobertura` report using `dotnet-coverage` tool. Then `reportgenerator` can be used to generate final github summary markdown. @@ -66,7 +66,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur [Run example](../../../../../../actions/workflows/Calculator_Scenario18.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -134,8 +134,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario19/README.md b/samples/Calculator/scenarios/scenario19/README.md index 27aa529..e0e1c68 100644 --- a/samples/Calculator/scenarios/scenario19/README.md +++ b/samples/Calculator/scenarios/scenario19/README.md @@ -2,7 +2,7 @@ Collect code coverage for whole solution. Runsettings are configured to exclude tests projects from coverage report. You can find here example how to collect coverage for server and tests if they are running in separate processes and server is started before tests execution. `dotnet-coverage` tool is used to collect code coverage for server. At the end code coverage results for server and tests are merged. Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. In pipelines during merging final coverage report is converted into cobertura format and published. -# Configuration +## Configuration ```xml @@ -29,12 +29,11 @@ Collect code coverage for whole solution. Runsettings are configured to exclude - ``` > **_NOTE:_** Remember that any regex used for `` or `` is matched for file path not file name. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -51,7 +50,7 @@ dotnet-coverage merge --output merged.coverage "./TestResults/**/*.coverage" ./s You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow To generate summary report `.coverage` report needs to be converted to `cobertura` report using `dotnet-coverage` tool. Then `reportgenerator` can be used to generate final github summary markdown. @@ -98,7 +97,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur [Run example](../../../../../../actions/workflows/Calculator_Scenario19.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -166,8 +165,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario20/README.md b/samples/Calculator/scenarios/scenario20/README.md index 529a138..4d8f54c 100644 --- a/samples/Calculator/scenarios/scenario20/README.md +++ b/samples/Calculator/scenarios/scenario20/README.md @@ -2,7 +2,7 @@ Collect code coverage for whole solution. Runsettings are configured to get all code coverage logs. You can find here example how to collect coverage for server and tests if they are running in separate processes and server is started before tests execution. `dotnet-coverage` tool is used to collect code coverage for server. At the end code coverage results for server and tests are merged. Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. In pipelines during merging final coverage report is converted into cobertura format and published. -# Configuration +## Configuration ```xml @@ -31,7 +31,7 @@ Collect code coverage for whole solution. Runsettings are configured to get all > **_NOTE:_** Remember that any regex used for `` or `` is matched for file path not file name. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -49,7 +49,7 @@ dotnet-coverage merge -l $LOGS_DIR/merge.log -ll Verbose --output merged.coverag You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow To generate summary report `.coverage` report needs to be converted to `cobertura` report using `dotnet-coverage` tool. Then `reportgenerator` can be used to generate final github summary markdown. @@ -103,7 +103,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur [Run example](../../../../../../actions/workflows/Calculator_Scenario20.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -184,8 +184,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario21/README.md b/samples/Calculator/scenarios/scenario21/README.md index 1cf3eb4..b1f50f3 100644 --- a/samples/Calculator/scenarios/scenario21/README.md +++ b/samples/Calculator/scenarios/scenario21/README.md @@ -2,7 +2,7 @@ Collect code coverage for whole solution. In this example we show that if you have script to run all tests you can easily prepend it with `dotnet-coverage collect` to collec coverage for whole solution. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -12,7 +12,7 @@ dotnet tool install -g dotnet-coverage dotnet-coverage collect --output-format cobertura --output report.cobertura.xml "bash ./scenarios/scenario21/tests.sh" ``` -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow To generate summary report `.coverage` report needs to be converted to `cobertura` report using `dotnet-coverage` tool. Then `reportgenerator` can be used to generate final github summary markdown. @@ -50,7 +50,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur [Run example](../../../../../../actions/workflows/Calculator_Scenario21.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -95,8 +95,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario22/README.md b/samples/Calculator/scenarios/scenario22/README.md index 65b2816..e6cefee 100644 --- a/samples/Calculator/scenarios/scenario22/README.md +++ b/samples/Calculator/scenarios/scenario22/README.md @@ -2,7 +2,7 @@ This example shows that code coverage by default is collecting code coverage also for all child processes. `Calculator.Console.Tests` run tests by spawning `Calculator.Console` as child process. Static instrumentation is used here, which requres specifying what files should be instrumented by `ModulePaths.IncludeDirectories` inside runsettings. Setting `EnableStaticManagedInstrumentationRestore` to `False` means our system will not restore instrumented binaries after the run. Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. -# Configuration +## Configuration ```xml @@ -31,7 +31,7 @@ This example shows that code coverage by default is collecting code coverage als ``` -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -46,7 +46,7 @@ dotnet test --settings ../../scenarios/scenario22/coverage.runsettings You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -88,7 +88,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario22.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -134,8 +134,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.coverage) \ No newline at end of file +[Link](example.report.coverage) diff --git a/samples/Calculator/scenarios/scenario23/README.md b/samples/Calculator/scenarios/scenario23/README.md index 7271bd3..95ac045 100644 --- a/samples/Calculator/scenarios/scenario23/README.md +++ b/samples/Calculator/scenarios/scenario23/README.md @@ -2,7 +2,7 @@ This example shows that code coverage by default is collecting code coverage also for all child processes. `Calculator.Console.Tests` run tests by spawning `Calculator.Console` as child process. Static instrumentation is used here, which requres specifying what files should be instrumented by `ModulePaths.IncludeDirectories` inside runsettings. Setting `EnableStaticManagedInstrumentationRestore` to `True` means our system will restore instrumented binaries after the run. Default format is binary (`.coverage` extension) which can be opened in Visual Studio Enterprise. -# Configuration +## Configuration ```xml @@ -31,7 +31,7 @@ This example shows that code coverage by default is collecting code coverage als ``` -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -46,7 +46,7 @@ dotnet test --settings ../../scenarios/scenario23/coverage.runsettings You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow ```yml steps: @@ -88,7 +88,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. [Run example](../../../../../../actions/workflows/Calculator_Scenario23.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -134,8 +134,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.coverage) \ No newline at end of file +[Link](example.report.coverage) diff --git a/samples/Calculator/scenarios/scenario24/README.md b/samples/Calculator/scenarios/scenario24/README.md index 36a8101..1e9f1ab 100644 --- a/samples/Calculator/scenarios/scenario24/README.md +++ b/samples/Calculator/scenarios/scenario24/README.md @@ -2,7 +2,7 @@ Gather code coverage for the entire solution. Refer to the provided example for collecting coverage across all unit tests. The system automatically consolidates coverage reports from all test projects. Integration tests are excluded for simplification, as the server is not initiated during this process. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -13,7 +13,7 @@ dotnet test --no-build --collect "Code Coverage" You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow Executing tests is automatically creating `cobertura` report. Then `reportgenerator` can be used to generate final github summary markdown. @@ -49,7 +49,7 @@ Executing tests is automatically creating `cobertura` report. Then `reportgenera [Run example](../../../../../../actions/workflows/Calculator_Scenario24.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -80,8 +80,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/Calculator/scenarios/scenario25/README.md b/samples/Calculator/scenarios/scenario25/README.md index 9834b64..8797fe1 100644 --- a/samples/Calculator/scenarios/scenario25/README.md +++ b/samples/Calculator/scenarios/scenario25/README.md @@ -2,7 +2,7 @@ Gather code coverage for the entire solution using dotnet-coverage tool. Refer to the provided example for collecting coverage across all unit tests. The system automatically consolidates coverage reports from all test projects. Integration tests are excluded for simplification, as the server is not initiated during this process. -# Collect code coverage using command line +## Collect code coverage using command line ```shell git clone https://github.com/microsoft/codecoverage.git @@ -14,7 +14,7 @@ dotnet-coverage collect -f cobertura -o report.cobertura.xml "dotnet test --no-b You can also use [run.ps1](run.ps1) to collect code coverage. -# Collect code coverage inside github workflow +## Collect code coverage inside github workflow Executing tests is automatically creating `cobertura` report. Then `reportgenerator` can be used to generate final github summary markdown. @@ -52,7 +52,7 @@ Executing tests is automatically creating `cobertura` report. Then `reportgenera [Run example](../../../../../../actions/workflows/Calculator_Scenario25.yml) -# Collect code coverage inside Azure DevOps Pipelines +## Collect code coverage inside Azure DevOps Pipelines ```yml steps: @@ -97,8 +97,8 @@ steps: ![alt text](azure-pipelines.jpg "Code Coverage tab in Azure DevOps pipelines") -# Report example +## Report example ![alt text](example.report.jpg "Example report") -[Link](example.report.cobertura.xml) \ No newline at end of file +[Link](example.report.cobertura.xml) diff --git a/samples/VisualStudio/scenarios/scenario01/README.md b/samples/VisualStudio/scenarios/scenario01/README.md index 58cd2f0..e626212 100644 --- a/samples/VisualStudio/scenarios/scenario01/README.md +++ b/samples/VisualStudio/scenarios/scenario01/README.md @@ -42,6 +42,7 @@ Collect and view code coverage in Microsoft Visual Studio Enterprise. ``` + ![runsettings-file](runsttings-set.png) ## Enable code coverage coloring diff --git a/samples/VisualStudio/scenarios/scenario06/README.md b/samples/VisualStudio/scenarios/scenario06/README.md index a26a3ab..b700720 100644 --- a/samples/VisualStudio/scenarios/scenario06/README.md +++ b/samples/VisualStudio/scenarios/scenario06/README.md @@ -27,4 +27,4 @@ Static C++ code coverage for [google test adapter](https://github.com/microsoft/ 5. View code coverage results - ![alt text](results.png "Code coverage results.") \ No newline at end of file + ![alt text](results.png "Code coverage results.") diff --git a/samples/VisualStudio/scenarios/scenario07/README.md b/samples/VisualStudio/scenarios/scenario07/README.md index d7cc5c3..ca4a2bd 100644 --- a/samples/VisualStudio/scenarios/scenario07/README.md +++ b/samples/VisualStudio/scenarios/scenario07/README.md @@ -20,4 +20,4 @@ Static C++ code coverage for new Native Unit Test project in Visual Studio ARM64 5. View code coverage results - ![alt text](results.png "Code coverage results.") \ No newline at end of file + ![alt text](results.png "Code coverage results.") diff --git a/samples/VisualStudio/scenarios/scenario08/README.md b/samples/VisualStudio/scenarios/scenario08/README.md index b539180..3381f84 100644 --- a/samples/VisualStudio/scenarios/scenario08/README.md +++ b/samples/VisualStudio/scenarios/scenario08/README.md @@ -5,55 +5,62 @@ Static code coverage for ASP.NET Core Web App (Razor Pages) in IIS. ## Collect code coverage from IIS 1. Generate ASP.NET Core Web App (Razor Pages) project in console -```console -dotnet new webapp --output aspnetcoreapp --no-https -``` -![alt text](create.png "Create ASP.NET Core Web App (Razor Pages) Project.") + + ```console + dotnet new webapp --output aspnetcoreapp --no-https + ``` + + ![alt text](create.png "Create ASP.NET Core Web App (Razor Pages) Project.") 2. Publish ASP.NET Core Web App (Razor Pages). -```console -dotnet publish -r win-x64 -``` -![alt text](publish.png "Publish ASP.NET Core Web App (Razor Pages) Project.") + + ```console + dotnet publish -r win-x64 + ``` + + ![alt text](publish.png "Publish ASP.NET Core Web App (Razor Pages) Project.") 3. Instrument `aspnetcoreapp.dll` in Developer PowerShell for VS Enterprise. -```console -Microsoft.CodeCoverage.Console.exe instrument aspnetcoreapp.dll -id iisdoc -``` -![alt text](instrument.png "Instrument ASP.NET Core Web App (Razor Pages)") -> **_NOTE:_** For more complicated projects you will need to instrument more libraries. -4. Create new website in IIS Manager. Use publish directory as **Physical path**. Use `AspNetCoreExample` as site name. Do not start website yet. + ```console + Microsoft.CodeCoverage.Console.exe instrument aspnetcoreapp.dll -id iisdoc + ``` + ![alt text](instrument.png "Instrument ASP.NET Core Web App (Razor Pages)") + > **_NOTE:_** For more complicated projects you will need to instrument more libraries. + +4. Create new website in IIS Manager. Use publish directory as **Physical path**. Use `AspNetCoreExample` as site name. Do not start website yet. ![alt text](createwebsite.png "Create new website in IIS Manager") 5. Create code coverage configuration file `aspnet.config` with `AspNetCoreExample` in `AllowedUsers`. -```xml - - - - - IIS APPPOOL\AspNetCoreExample - - - -``` + ```xml + + + + + IIS APPPOOL\AspNetCoreExample + + + + ``` 6. Start code coverage collection in Admin mode Developer Powershell for VS Enterprise. It is also required to have `SeCreateGlobalPrivilege` privilage to correctly pass coverage data to collector. -```console -Microsoft.CodeCoverage.Console.exe collect -sv -id iisdoc -s D:\configs\aspnet.config -``` -![alt text](startcollection.png "Start code coverage collection.") + + ```console + Microsoft.CodeCoverage.Console.exe collect -sv -id iisdoc -s D:\configs\aspnet.config + ``` + + ![alt text](startcollection.png "Start code coverage collection.") 7. Start and browse website. -![alt text](startandbrowse.png "Start code coverage collection.") + ![alt text](startandbrowse.png "Start code coverage collection.") 8. Stop website. -![alt text](stopwebsite.png "Start code coverage collection.") + ![alt text](stopwebsite.png "Start code coverage collection.") 9. Stop code coverage collection using **Ctrl+C**. -![alt text](stopcollection.png "Stop code coverage collection.") + ![alt text](stopcollection.png "Stop code coverage collection.") -9. Open `output.coverage` file in Visual Studio Enterprise. -![alt text](results.png "Code coverage results.") \ No newline at end of file +10. Open `output.coverage` file in Visual Studio Enterprise. + ![alt text](results.png "Code coverage results.") diff --git a/samples/VisualStudio/scenarios/scenario09/README.md b/samples/VisualStudio/scenarios/scenario09/README.md index 0f94ee7..da9fe02 100644 --- a/samples/VisualStudio/scenarios/scenario09/README.md +++ b/samples/VisualStudio/scenarios/scenario09/README.md @@ -19,11 +19,13 @@ Static C++ code coverage for new Native Console App project in Visual Studio. ![alt text](build.png "Build solution") 5. Collect code coverage in Developer PowerShell for VS Enterprise -```console -Microsoft.CodeCoverage.Console.exe collect --include-files .\x64\Debug\** .\x64\Debug\ConsoleApplication1.exe -``` -![alt text](collect.png "Collect code coverage") + + ```console + Microsoft.CodeCoverage.Console.exe collect --include-files .\x64\Debug\** .\x64\Debug\ConsoleApplication1.exe + ``` + + ![alt text](collect.png "Collect code coverage") 6. View code coverage results - ![alt text](results.png "Code coverage results.") \ No newline at end of file + ![alt text](results.png "Code coverage results.") From 9104604259b20aadd2973a5cafa31c4dec7b58e1 Mon Sep 17 00:00:00 2001 From: faisal Date: Thu, 13 Feb 2025 09:52:23 +0100 Subject: [PATCH 07/11] fix, --- docs/configuration.md | 30 +++++++++---------- .../Algorithms/scenarios/scenario01/README.md | 2 +- .../Algorithms/scenarios/scenario02/README.md | 2 +- .../Algorithms/scenarios/scenario03/README.md | 2 +- .../Algorithms/scenarios/scenario04/README.md | 2 +- .../Algorithms/scenarios/scenario05/README.md | 2 +- .../Algorithms/scenarios/scenario06/README.md | 2 +- .../Algorithms/scenarios/scenario07/README.md | 2 +- .../Calculator/scenarios/scenario01/README.md | 2 +- .../Calculator/scenarios/scenario02/README.md | 2 +- .../Calculator/scenarios/scenario03/README.md | 2 +- .../Calculator/scenarios/scenario04/README.md | 2 +- .../Calculator/scenarios/scenario05/README.md | 2 +- .../Calculator/scenarios/scenario06/README.md | 2 +- .../Calculator/scenarios/scenario07/README.md | 2 +- .../Calculator/scenarios/scenario08/README.md | 2 +- .../Calculator/scenarios/scenario09/README.md | 2 +- .../Calculator/scenarios/scenario10/README.md | 2 +- .../Calculator/scenarios/scenario11/README.md | 2 +- .../Calculator/scenarios/scenario12/README.md | 2 +- .../Calculator/scenarios/scenario13/README.md | 2 +- .../Calculator/scenarios/scenario14/README.md | 2 +- .../Calculator/scenarios/scenario15/README.md | 2 +- .../Calculator/scenarios/scenario16/README.md | 2 +- .../Calculator/scenarios/scenario17/README.md | 2 +- .../Calculator/scenarios/scenario18/README.md | 2 +- .../Calculator/scenarios/scenario19/README.md | 2 +- .../Calculator/scenarios/scenario20/README.md | 4 +-- .../Calculator/scenarios/scenario21/README.md | 2 +- .../Calculator/scenarios/scenario22/README.md | 2 +- .../Calculator/scenarios/scenario23/README.md | 2 +- .../Calculator/scenarios/scenario24/README.md | 2 +- .../Calculator/scenarios/scenario25/README.md | 2 +- 33 files changed, 48 insertions(+), 48 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 8ee249e..3c0149f 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -7,21 +7,21 @@ ## Settings -| Name | Values | Default | Description | Example | -|---|---|---|---|---| -| CoverageLogLevel | `Errors`,`Dumps`,`Messages`,`All` | | Code coverage log level | `Dumps` | -| InstrumentationLogLevel | `Errors`,`Dumps`,`Messages`,`All` | | CLR Instrumentation Engine log level. More info [here](https://github.com/microsoft/CLRInstrumentationEngine/blob/develop/docs/logging.md). | `Dumps` | -| ManagedVanguardLogLevel | `Error`,`Info`,`Verbose`,`None` | | Managed instrumentation log level. Logging of managed side of code coverage. | `Info` | -| CoverageFileLogPath | File or directory path | | File path or directory path to place where code coverage and CLR IE logs should be stored. Directory should be specified with `\` at the end. | `D:\examples\logs\coverage.log` | -| CoverageFileName | File path | | File path to output code coverage report | `D:\examples\report.coverage` | -| Format | `coverage`, `cobertura`, `xml` | `coverage` | Output report format. | `coverage` | -| VanguardInstallDir | Directory path | | Path to directory where custom `CodeCoverage.exe` and `covrun*.dll` files exists | `D:\Microsoft.CodeCoverage\CodeCoverage` | -| CLRIEX86InstallDir | Directory path | | Path to directory with custom CLR IE x86 binary | `D:\Microsoft.CodeCoverage\InstrumentationEngine\x86` | -| CLRIEX64InstallDir | Directory path | | Path to directory with custom CLR IE x64 binary | `D:\Microsoft.CodeCoverage\InstrumentationEngine\x64` | -| CLRIEARM64InstallDir | Directory path | | Path to directory with custom CLR IE ARM64 binary | `D:\Microsoft.CodeCoverage\InstrumentationEngine\arm64` | -| PerTestCodeCoverage | `True`, `False` | `False` | Indicates if coverage should be collected for each test separately | `True` | -| IncludeTestAssembly | `True`, `False` | `True` | Indicates if coverage should be collected for tests projects | `True` | -| DeterministicReport | `True`, `False` | `False` | Indicates if paths in the report should start with deterministic fragment `/_/..` instead of full paths | `True` | +| Name | Values | Default | Default [MTP.CodeCoverage](https://www.nuget.org/packages/Microsoft.Testing.Extensions.CodeCoverage) Description | Example | +|---|---|---|---|---|---| +| CoverageLogLevel | `Errors`,`Dumps`,`Messages`,`All` | | | Code coverage log level | `Dumps` | +| InstrumentationLogLevel | `Errors`,`Dumps`,`Messages`,`All` | | | CLR Instrumentation Engine log level. More info [here](https://github.com/microsoft/CLRInstrumentationEngine/blob/develop/docs/logging.md). | | `Dumps` | +| ManagedVanguardLogLevel | `Error`,`Info`,`Verbose`,`None` | | | Managed instrumentation log level. Logging of managed side of code coverage. | `Info` | +| CoverageFileLogPath | File or directory path | | | File path or directory path to place where code coverage and CLR IE logs should be stored. Directory should be specified with `\` at the end. | `D:\examples\logs\coverage.log` | +| CoverageFileName | File path | | | File path to output code coverage report | `D:\examples\report.coverage` | +| Format | `coverage`, `cobertura`, `xml` | `coverage` | `coverage` | Output report format. | `coverage` | +| VanguardInstallDir | Directory path | | | Path to directory where custom `CodeCoverage.exe` and `covrun*.dll` files exists | `D:\Microsoft.CodeCoverage\CodeCoverage` | +| CLRIEX86InstallDir | Directory path | | | Path to directory with custom CLR IE x86 binary | `D:\Microsoft.CodeCoverage\InstrumentationEngine\x86` | +| CLRIEX64InstallDir | Directory path | | | Path to directory with custom CLR IE x64 binary | `D:\Microsoft.CodeCoverage\InstrumentationEngine\x64` | +| CLRIEARM64InstallDir | Directory path | | | Path to directory with custom CLR IE ARM64 binary | `D:\Microsoft.CodeCoverage\InstrumentationEngine\arm64` | +| PerTestCodeCoverage | `True`, `False` | `False` | `False` | Indicates if coverage should be collected for each test separately | `True` | +| IncludeTestAssembly | `True`, `False` | `True` | `False` | Indicates if coverage should be collected for tests projects | `True` | +| DeterministicReport | `True`, `False` | `False` | `False` | Indicates if paths in the report should start with deterministic fragment `/_/..` instead of full paths | `True` | ## Settings under CodeCoverage tag diff --git a/samples/Algorithms/scenarios/scenario01/README.md b/samples/Algorithms/scenarios/scenario01/README.md index 1a3511d..746513d 100644 --- a/samples/Algorithms/scenarios/scenario01/README.md +++ b/samples/Algorithms/scenarios/scenario01/README.md @@ -40,7 +40,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml diff --git a/samples/Algorithms/scenarios/scenario02/README.md b/samples/Algorithms/scenarios/scenario02/README.md index c7b0e20..e30a1e6 100644 --- a/samples/Algorithms/scenarios/scenario02/README.md +++ b/samples/Algorithms/scenarios/scenario02/README.md @@ -53,7 +53,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml diff --git a/samples/Algorithms/scenarios/scenario03/README.md b/samples/Algorithms/scenarios/scenario03/README.md index 2f15ede..00d2160 100644 --- a/samples/Algorithms/scenarios/scenario03/README.md +++ b/samples/Algorithms/scenarios/scenario03/README.md @@ -41,7 +41,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml diff --git a/samples/Algorithms/scenarios/scenario04/README.md b/samples/Algorithms/scenarios/scenario04/README.md index fde6567..6d42045 100644 --- a/samples/Algorithms/scenarios/scenario04/README.md +++ b/samples/Algorithms/scenarios/scenario04/README.md @@ -44,7 +44,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml diff --git a/samples/Algorithms/scenarios/scenario05/README.md b/samples/Algorithms/scenarios/scenario05/README.md index c38e000..8acd06a 100644 --- a/samples/Algorithms/scenarios/scenario05/README.md +++ b/samples/Algorithms/scenarios/scenario05/README.md @@ -42,7 +42,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml diff --git a/samples/Algorithms/scenarios/scenario06/README.md b/samples/Algorithms/scenarios/scenario06/README.md index a371978..11a01d0 100644 --- a/samples/Algorithms/scenarios/scenario06/README.md +++ b/samples/Algorithms/scenarios/scenario06/README.md @@ -39,7 +39,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml diff --git a/samples/Algorithms/scenarios/scenario07/README.md b/samples/Algorithms/scenarios/scenario07/README.md index 7836675..25287b3 100644 --- a/samples/Algorithms/scenarios/scenario07/README.md +++ b/samples/Algorithms/scenarios/scenario07/README.md @@ -40,7 +40,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml diff --git a/samples/Calculator/scenarios/scenario01/README.md b/samples/Calculator/scenarios/scenario01/README.md index 5a6dbd8..b06ae0e 100644 --- a/samples/Calculator/scenarios/scenario01/README.md +++ b/samples/Calculator/scenarios/scenario01/README.md @@ -42,7 +42,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ./**/TestResults/**/*.coverage diff --git a/samples/Calculator/scenarios/scenario02/README.md b/samples/Calculator/scenarios/scenario02/README.md index c032bb4..7c1d068 100644 --- a/samples/Calculator/scenarios/scenario02/README.md +++ b/samples/Calculator/scenarios/scenario02/README.md @@ -36,7 +36,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ./**/TestResults/**/*.cobertura.xml diff --git a/samples/Calculator/scenarios/scenario03/README.md b/samples/Calculator/scenarios/scenario03/README.md index 96a2429..3c91c65 100644 --- a/samples/Calculator/scenarios/scenario03/README.md +++ b/samples/Calculator/scenarios/scenario03/README.md @@ -38,7 +38,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ./**/TestResults/**/*.cobertura.xml diff --git a/samples/Calculator/scenarios/scenario04/README.md b/samples/Calculator/scenarios/scenario04/README.md index f14a41d..29834b8 100644 --- a/samples/Calculator/scenarios/scenario04/README.md +++ b/samples/Calculator/scenarios/scenario04/README.md @@ -36,7 +36,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Upload raw coverage report artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: RawCoverageReport path: ./**/TestResults/**/*.xml diff --git a/samples/Calculator/scenarios/scenario05/README.md b/samples/Calculator/scenarios/scenario05/README.md index 58d4ed9..bcb9f6c 100644 --- a/samples/Calculator/scenarios/scenario05/README.md +++ b/samples/Calculator/scenarios/scenario05/README.md @@ -77,7 +77,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ./**/TestResults/**/*.cobertura.xml diff --git a/samples/Calculator/scenarios/scenario06/README.md b/samples/Calculator/scenarios/scenario06/README.md index ac31b02..ad5aa74 100644 --- a/samples/Calculator/scenarios/scenario06/README.md +++ b/samples/Calculator/scenarios/scenario06/README.md @@ -73,7 +73,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ./**/TestResults/**/*.coverage diff --git a/samples/Calculator/scenarios/scenario07/README.md b/samples/Calculator/scenarios/scenario07/README.md index 3bab0d9..245e557 100644 --- a/samples/Calculator/scenarios/scenario07/README.md +++ b/samples/Calculator/scenarios/scenario07/README.md @@ -65,7 +65,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ./**/TestResults/**/*.coverage diff --git a/samples/Calculator/scenarios/scenario08/README.md b/samples/Calculator/scenarios/scenario08/README.md index 7e8a7d4..082593e 100644 --- a/samples/Calculator/scenarios/scenario08/README.md +++ b/samples/Calculator/scenarios/scenario08/README.md @@ -40,7 +40,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' diff --git a/samples/Calculator/scenarios/scenario09/README.md b/samples/Calculator/scenarios/scenario09/README.md index 2bef57c..665407f 100644 --- a/samples/Calculator/scenarios/scenario09/README.md +++ b/samples/Calculator/scenarios/scenario09/README.md @@ -63,7 +63,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' diff --git a/samples/Calculator/scenarios/scenario10/README.md b/samples/Calculator/scenarios/scenario10/README.md index b8fc6c6..8ddb447 100644 --- a/samples/Calculator/scenarios/scenario10/README.md +++ b/samples/Calculator/scenarios/scenario10/README.md @@ -55,7 +55,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' diff --git a/samples/Calculator/scenarios/scenario11/README.md b/samples/Calculator/scenarios/scenario11/README.md index 6cec977..06b1092 100644 --- a/samples/Calculator/scenarios/scenario11/README.md +++ b/samples/Calculator/scenarios/scenario11/README.md @@ -70,7 +70,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ./**/TestResults/**/*.coverage diff --git a/samples/Calculator/scenarios/scenario12/README.md b/samples/Calculator/scenarios/scenario12/README.md index 56c4ff6..88e5f4c 100644 --- a/samples/Calculator/scenarios/scenario12/README.md +++ b/samples/Calculator/scenarios/scenario12/README.md @@ -70,7 +70,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ./**/TestResults/**/*.coverage diff --git a/samples/Calculator/scenarios/scenario13/README.md b/samples/Calculator/scenarios/scenario13/README.md index 546a640..18968dc 100644 --- a/samples/Calculator/scenarios/scenario13/README.md +++ b/samples/Calculator/scenarios/scenario13/README.md @@ -42,7 +42,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ./**/TestResults/**/*.coverage diff --git a/samples/Calculator/scenarios/scenario14/README.md b/samples/Calculator/scenarios/scenario14/README.md index 448c3cc..9664987 100644 --- a/samples/Calculator/scenarios/scenario14/README.md +++ b/samples/Calculator/scenarios/scenario14/README.md @@ -56,7 +56,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' diff --git a/samples/Calculator/scenarios/scenario15/README.md b/samples/Calculator/scenarios/scenario15/README.md index db9b0c7..9f16b15 100644 --- a/samples/Calculator/scenarios/scenario15/README.md +++ b/samples/Calculator/scenarios/scenario15/README.md @@ -56,7 +56,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' diff --git a/samples/Calculator/scenarios/scenario16/README.md b/samples/Calculator/scenarios/scenario16/README.md index 2bc63ba..48de2f6 100644 --- a/samples/Calculator/scenarios/scenario16/README.md +++ b/samples/Calculator/scenarios/scenario16/README.md @@ -81,7 +81,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/coverage' diff --git a/samples/Calculator/scenarios/scenario17/README.md b/samples/Calculator/scenarios/scenario17/README.md index b1f9951..759d26e 100644 --- a/samples/Calculator/scenarios/scenario17/README.md +++ b/samples/Calculator/scenarios/scenario17/README.md @@ -77,7 +77,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/coverage' diff --git a/samples/Calculator/scenarios/scenario18/README.md b/samples/Calculator/scenarios/scenario18/README.md index 792db06..c733d45 100644 --- a/samples/Calculator/scenarios/scenario18/README.md +++ b/samples/Calculator/scenarios/scenario18/README.md @@ -56,7 +56,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' diff --git a/samples/Calculator/scenarios/scenario19/README.md b/samples/Calculator/scenarios/scenario19/README.md index e0e1c68..c96fe70 100644 --- a/samples/Calculator/scenarios/scenario19/README.md +++ b/samples/Calculator/scenarios/scenario19/README.md @@ -87,7 +87,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' diff --git a/samples/Calculator/scenarios/scenario20/README.md b/samples/Calculator/scenarios/scenario20/README.md index 4d8f54c..8aa69a1 100644 --- a/samples/Calculator/scenarios/scenario20/README.md +++ b/samples/Calculator/scenarios/scenario20/README.md @@ -88,12 +88,12 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' - name: Archive code coverage logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-logs path: '${{ github.workspace }}/logs/*' diff --git a/samples/Calculator/scenarios/scenario21/README.md b/samples/Calculator/scenarios/scenario21/README.md index b1f50f3..2bb96fb 100644 --- a/samples/Calculator/scenarios/scenario21/README.md +++ b/samples/Calculator/scenarios/scenario21/README.md @@ -40,7 +40,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' diff --git a/samples/Calculator/scenarios/scenario22/README.md b/samples/Calculator/scenarios/scenario22/README.md index e6cefee..d0d169f 100644 --- a/samples/Calculator/scenarios/scenario22/README.md +++ b/samples/Calculator/scenarios/scenario22/README.md @@ -78,7 +78,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ./**/TestResults/**/*.coverage diff --git a/samples/Calculator/scenarios/scenario23/README.md b/samples/Calculator/scenarios/scenario23/README.md index 95ac045..c022103 100644 --- a/samples/Calculator/scenarios/scenario23/README.md +++ b/samples/Calculator/scenarios/scenario23/README.md @@ -78,7 +78,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: ./**/TestResults/**/*.coverage diff --git a/samples/Calculator/scenarios/scenario24/README.md b/samples/Calculator/scenarios/scenario24/README.md index 1e9f1ab..fe31f5b 100644 --- a/samples/Calculator/scenarios/scenario24/README.md +++ b/samples/Calculator/scenarios/scenario24/README.md @@ -39,7 +39,7 @@ Executing tests is automatically creating `cobertura` report. Then `reportgenera - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/samples/Calculator/TestResults/**/*.cobertura.xml' diff --git a/samples/Calculator/scenarios/scenario25/README.md b/samples/Calculator/scenarios/scenario25/README.md index 8797fe1..4e8e5c9 100644 --- a/samples/Calculator/scenarios/scenario25/README.md +++ b/samples/Calculator/scenarios/scenario25/README.md @@ -42,7 +42,7 @@ Executing tests is automatically creating `cobertura` report. Then `reportgenera - name: Upload coverage into summary run: cat $GITHUB_WORKSPACE/coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: code-coverage-report path: '${{ github.workspace }}/samples/Calculator/TestResults/**/*.cobertura.xml' From 03cb35663694092ef926df6c0f2b30711c40cdfc Mon Sep 17 00:00:00 2001 From: faisal Date: Thu, 13 Feb 2025 09:57:13 +0100 Subject: [PATCH 08/11] fix, --- samples/Algorithms/scenarios/scenario01/README.md | 1 + samples/Algorithms/scenarios/scenario02/README.md | 1 + samples/Algorithms/scenarios/scenario03/README.md | 1 + samples/Algorithms/scenarios/scenario04/README.md | 1 + samples/Algorithms/scenarios/scenario05/README.md | 1 + samples/Algorithms/scenarios/scenario06/README.md | 2 +- samples/Algorithms/scenarios/scenario07/README.md | 1 + samples/Calculator/scenarios/scenario01/README.md | 1 + samples/Calculator/scenarios/scenario02/README.md | 1 + samples/Calculator/scenarios/scenario03/README.md | 1 + samples/Calculator/scenarios/scenario04/README.md | 1 + samples/Calculator/scenarios/scenario05/README.md | 1 + samples/Calculator/scenarios/scenario06/README.md | 1 + samples/Calculator/scenarios/scenario07/README.md | 1 + samples/Calculator/scenarios/scenario08/README.md | 1 + samples/Calculator/scenarios/scenario09/README.md | 1 + samples/Calculator/scenarios/scenario10/README.md | 1 + samples/Calculator/scenarios/scenario11/README.md | 1 + samples/Calculator/scenarios/scenario12/README.md | 1 + samples/Calculator/scenarios/scenario13/README.md | 1 + samples/Calculator/scenarios/scenario14/README.md | 1 + samples/Calculator/scenarios/scenario15/README.md | 1 + samples/Calculator/scenarios/scenario16/README.md | 1 + samples/Calculator/scenarios/scenario17/README.md | 1 + samples/Calculator/scenarios/scenario18/README.md | 1 + samples/Calculator/scenarios/scenario19/README.md | 1 + samples/Calculator/scenarios/scenario20/README.md | 2 ++ samples/Calculator/scenarios/scenario21/README.md | 1 + samples/Calculator/scenarios/scenario22/README.md | 1 + samples/Calculator/scenarios/scenario23/README.md | 1 + samples/Calculator/scenarios/scenario24/README.md | 1 + samples/Calculator/scenarios/scenario25/README.md | 1 + 32 files changed, 33 insertions(+), 1 deletion(-) diff --git a/samples/Algorithms/scenarios/scenario01/README.md b/samples/Algorithms/scenarios/scenario01/README.md index 746513d..9666055 100644 --- a/samples/Algorithms/scenarios/scenario01/README.md +++ b/samples/Algorithms/scenarios/scenario01/README.md @@ -44,6 +44,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml + overwrite: true ``` [Full source example](../../../../.github/workflows/Algorithms_Scenario01.yml) diff --git a/samples/Algorithms/scenarios/scenario02/README.md b/samples/Algorithms/scenarios/scenario02/README.md index e30a1e6..e778f8e 100644 --- a/samples/Algorithms/scenarios/scenario02/README.md +++ b/samples/Algorithms/scenarios/scenario02/README.md @@ -57,6 +57,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml + overwrite: true ``` [Full source example](../../../../.github/workflows/Algorithms_Scenario02.yml) diff --git a/samples/Algorithms/scenarios/scenario03/README.md b/samples/Algorithms/scenarios/scenario03/README.md index 00d2160..9128205 100644 --- a/samples/Algorithms/scenarios/scenario03/README.md +++ b/samples/Algorithms/scenarios/scenario03/README.md @@ -45,6 +45,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml + overwrite: true ``` [Full source example](../../../../.github/workflows/Algorithms_Scenario03.yml) diff --git a/samples/Algorithms/scenarios/scenario04/README.md b/samples/Algorithms/scenarios/scenario04/README.md index 6d42045..6d47a22 100644 --- a/samples/Algorithms/scenarios/scenario04/README.md +++ b/samples/Algorithms/scenarios/scenario04/README.md @@ -48,6 +48,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml + overwrite: true ``` [Full source example](../../../../.github/workflows/Algorithms_Scenario04.yml) diff --git a/samples/Algorithms/scenarios/scenario05/README.md b/samples/Algorithms/scenarios/scenario05/README.md index 8acd06a..a41e595 100644 --- a/samples/Algorithms/scenarios/scenario05/README.md +++ b/samples/Algorithms/scenarios/scenario05/README.md @@ -46,6 +46,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml + overwrite: true ``` [Full source example](../../../../.github/workflows/Algorithms_Scenario05.yml) diff --git a/samples/Algorithms/scenarios/scenario06/README.md b/samples/Algorithms/scenarios/scenario06/README.md index 11a01d0..a79afc0 100644 --- a/samples/Algorithms/scenarios/scenario06/README.md +++ b/samples/Algorithms/scenarios/scenario06/README.md @@ -43,7 +43,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml - + overwrite: true ``` [Full source example](../../../../.github/workflows/Algorithms_Scenario06.yml) diff --git a/samples/Algorithms/scenarios/scenario07/README.md b/samples/Algorithms/scenarios/scenario07/README.md index 25287b3..94d277a 100644 --- a/samples/Algorithms/scenarios/scenario07/README.md +++ b/samples/Algorithms/scenarios/scenario07/README.md @@ -44,6 +44,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ${{ github.workspace }}/report.cobertura.xml + overwrite: true ``` [Full source example](../../../../.github/workflows/Algorithms_Scenario07.yml) diff --git a/samples/Calculator/scenarios/scenario01/README.md b/samples/Calculator/scenarios/scenario01/README.md index b06ae0e..3b0bdc2 100644 --- a/samples/Calculator/scenarios/scenario01/README.md +++ b/samples/Calculator/scenarios/scenario01/README.md @@ -46,6 +46,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur with: name: code-coverage-report path: ./**/TestResults/**/*.coverage + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario01.yml) diff --git a/samples/Calculator/scenarios/scenario02/README.md b/samples/Calculator/scenarios/scenario02/README.md index 7c1d068..04c7d90 100644 --- a/samples/Calculator/scenarios/scenario02/README.md +++ b/samples/Calculator/scenarios/scenario02/README.md @@ -40,6 +40,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ./**/TestResults/**/*.cobertura.xml + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario02.yml) diff --git a/samples/Calculator/scenarios/scenario03/README.md b/samples/Calculator/scenarios/scenario03/README.md index 3c91c65..715c397 100644 --- a/samples/Calculator/scenarios/scenario03/README.md +++ b/samples/Calculator/scenarios/scenario03/README.md @@ -42,6 +42,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ./**/TestResults/**/*.cobertura.xml + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario03.yml) diff --git a/samples/Calculator/scenarios/scenario04/README.md b/samples/Calculator/scenarios/scenario04/README.md index 29834b8..f51c122 100644 --- a/samples/Calculator/scenarios/scenario04/README.md +++ b/samples/Calculator/scenarios/scenario04/README.md @@ -40,6 +40,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: RawCoverageReport path: ./**/TestResults/**/*.xml + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario04.yml) diff --git a/samples/Calculator/scenarios/scenario05/README.md b/samples/Calculator/scenarios/scenario05/README.md index bcb9f6c..06cdaea 100644 --- a/samples/Calculator/scenarios/scenario05/README.md +++ b/samples/Calculator/scenarios/scenario05/README.md @@ -81,6 +81,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ./**/TestResults/**/*.cobertura.xml + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario05.yml) diff --git a/samples/Calculator/scenarios/scenario06/README.md b/samples/Calculator/scenarios/scenario06/README.md index ad5aa74..62ee9b5 100644 --- a/samples/Calculator/scenarios/scenario06/README.md +++ b/samples/Calculator/scenarios/scenario06/README.md @@ -77,6 +77,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ./**/TestResults/**/*.coverage + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario06.yml) diff --git a/samples/Calculator/scenarios/scenario07/README.md b/samples/Calculator/scenarios/scenario07/README.md index 245e557..84fdd69 100644 --- a/samples/Calculator/scenarios/scenario07/README.md +++ b/samples/Calculator/scenarios/scenario07/README.md @@ -69,6 +69,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ./**/TestResults/**/*.coverage + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario07.yml) diff --git a/samples/Calculator/scenarios/scenario08/README.md b/samples/Calculator/scenarios/scenario08/README.md index 082593e..129277c 100644 --- a/samples/Calculator/scenarios/scenario08/README.md +++ b/samples/Calculator/scenarios/scenario08/README.md @@ -44,6 +44,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario08.yml) diff --git a/samples/Calculator/scenarios/scenario09/README.md b/samples/Calculator/scenarios/scenario09/README.md index 665407f..bdc09f9 100644 --- a/samples/Calculator/scenarios/scenario09/README.md +++ b/samples/Calculator/scenarios/scenario09/README.md @@ -67,6 +67,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario09.yml) diff --git a/samples/Calculator/scenarios/scenario10/README.md b/samples/Calculator/scenarios/scenario10/README.md index 8ddb447..03f91a6 100644 --- a/samples/Calculator/scenarios/scenario10/README.md +++ b/samples/Calculator/scenarios/scenario10/README.md @@ -59,6 +59,7 @@ You can also use [run.ps1](run.ps1) to execute this scenario. with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario10.yml) diff --git a/samples/Calculator/scenarios/scenario11/README.md b/samples/Calculator/scenarios/scenario11/README.md index 06b1092..d6a0c65 100644 --- a/samples/Calculator/scenarios/scenario11/README.md +++ b/samples/Calculator/scenarios/scenario11/README.md @@ -74,6 +74,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ./**/TestResults/**/*.coverage + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario11.yml) diff --git a/samples/Calculator/scenarios/scenario12/README.md b/samples/Calculator/scenarios/scenario12/README.md index 88e5f4c..4da782e 100644 --- a/samples/Calculator/scenarios/scenario12/README.md +++ b/samples/Calculator/scenarios/scenario12/README.md @@ -74,6 +74,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ./**/TestResults/**/*.coverage + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario12.yml) diff --git a/samples/Calculator/scenarios/scenario13/README.md b/samples/Calculator/scenarios/scenario13/README.md index 18968dc..28c116f 100644 --- a/samples/Calculator/scenarios/scenario13/README.md +++ b/samples/Calculator/scenarios/scenario13/README.md @@ -46,6 +46,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur with: name: code-coverage-report path: ./**/TestResults/**/*.coverage + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario13.yml) diff --git a/samples/Calculator/scenarios/scenario14/README.md b/samples/Calculator/scenarios/scenario14/README.md index 9664987..c60d132 100644 --- a/samples/Calculator/scenarios/scenario14/README.md +++ b/samples/Calculator/scenarios/scenario14/README.md @@ -60,6 +60,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario14.yml) diff --git a/samples/Calculator/scenarios/scenario15/README.md b/samples/Calculator/scenarios/scenario15/README.md index 9f16b15..88a9c35 100644 --- a/samples/Calculator/scenarios/scenario15/README.md +++ b/samples/Calculator/scenarios/scenario15/README.md @@ -60,6 +60,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario15.yml) diff --git a/samples/Calculator/scenarios/scenario16/README.md b/samples/Calculator/scenarios/scenario16/README.md index 48de2f6..074e854 100644 --- a/samples/Calculator/scenarios/scenario16/README.md +++ b/samples/Calculator/scenarios/scenario16/README.md @@ -85,6 +85,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: '${{ github.workspace }}/coverage' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario16.yml) diff --git a/samples/Calculator/scenarios/scenario17/README.md b/samples/Calculator/scenarios/scenario17/README.md index 759d26e..0ad8335 100644 --- a/samples/Calculator/scenarios/scenario17/README.md +++ b/samples/Calculator/scenarios/scenario17/README.md @@ -81,6 +81,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: '${{ github.workspace }}/coverage' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario17.yml) diff --git a/samples/Calculator/scenarios/scenario18/README.md b/samples/Calculator/scenarios/scenario18/README.md index c733d45..9e29e26 100644 --- a/samples/Calculator/scenarios/scenario18/README.md +++ b/samples/Calculator/scenarios/scenario18/README.md @@ -60,6 +60,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario18.yml) diff --git a/samples/Calculator/scenarios/scenario19/README.md b/samples/Calculator/scenarios/scenario19/README.md index c96fe70..56b024f 100644 --- a/samples/Calculator/scenarios/scenario19/README.md +++ b/samples/Calculator/scenarios/scenario19/README.md @@ -91,6 +91,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario19.yml) diff --git a/samples/Calculator/scenarios/scenario20/README.md b/samples/Calculator/scenarios/scenario20/README.md index 8aa69a1..75786d1 100644 --- a/samples/Calculator/scenarios/scenario20/README.md +++ b/samples/Calculator/scenarios/scenario20/README.md @@ -92,11 +92,13 @@ To generate summary report `.coverage` report needs to be converted to `cobertur with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' + overwrite: true - name: Archive code coverage logs uses: actions/upload-artifact@v4 with: name: code-coverage-logs path: '${{ github.workspace }}/logs/*' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario20.yml) diff --git a/samples/Calculator/scenarios/scenario21/README.md b/samples/Calculator/scenarios/scenario21/README.md index 2bb96fb..00e86db 100644 --- a/samples/Calculator/scenarios/scenario21/README.md +++ b/samples/Calculator/scenarios/scenario21/README.md @@ -44,6 +44,7 @@ To generate summary report `.coverage` report needs to be converted to `cobertur with: name: code-coverage-report path: '${{ github.workspace }}/report.cobertura.xml' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario21.yml) diff --git a/samples/Calculator/scenarios/scenario22/README.md b/samples/Calculator/scenarios/scenario22/README.md index d0d169f..54417bc 100644 --- a/samples/Calculator/scenarios/scenario22/README.md +++ b/samples/Calculator/scenarios/scenario22/README.md @@ -82,6 +82,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ./**/TestResults/**/*.coverage + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario22.yml) diff --git a/samples/Calculator/scenarios/scenario23/README.md b/samples/Calculator/scenarios/scenario23/README.md index c022103..b9b42dc 100644 --- a/samples/Calculator/scenarios/scenario23/README.md +++ b/samples/Calculator/scenarios/scenario23/README.md @@ -82,6 +82,7 @@ You can also use [run.ps1](run.ps1) to collect code coverage. with: name: code-coverage-report path: ./**/TestResults/**/*.coverage + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario23.yml) diff --git a/samples/Calculator/scenarios/scenario24/README.md b/samples/Calculator/scenarios/scenario24/README.md index fe31f5b..092740f 100644 --- a/samples/Calculator/scenarios/scenario24/README.md +++ b/samples/Calculator/scenarios/scenario24/README.md @@ -43,6 +43,7 @@ Executing tests is automatically creating `cobertura` report. Then `reportgenera with: name: code-coverage-report path: '${{ github.workspace }}/samples/Calculator/TestResults/**/*.cobertura.xml' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario24.yml) diff --git a/samples/Calculator/scenarios/scenario25/README.md b/samples/Calculator/scenarios/scenario25/README.md index 4e8e5c9..cb2d501 100644 --- a/samples/Calculator/scenarios/scenario25/README.md +++ b/samples/Calculator/scenarios/scenario25/README.md @@ -46,6 +46,7 @@ Executing tests is automatically creating `cobertura` report. Then `reportgenera with: name: code-coverage-report path: '${{ github.workspace }}/samples/Calculator/TestResults/**/*.cobertura.xml' + overwrite: true ``` [Full source example](../../../../.github/workflows/Calculator_Scenario25.yml) From c64f38eb4af03bdd8e083bcaf8887938e49d7317 Mon Sep 17 00:00:00 2001 From: faisal Date: Thu, 13 Feb 2025 10:07:10 +0100 Subject: [PATCH 09/11] updating docs, --- docs/configuration.md | 62 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 3c0149f..c85abff 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -7,10 +7,10 @@ ## Settings -| Name | Values | Default | Default [MTP.CodeCoverage](https://www.nuget.org/packages/Microsoft.Testing.Extensions.CodeCoverage) Description | Example | +| Name | Values | Default | [MTP.CodeCoverage](https://www.nuget.org/packages/Microsoft.Testing.Extensions.CodeCoverage) Default | Description | Example | |---|---|---|---|---|---| -| CoverageLogLevel | `Errors`,`Dumps`,`Messages`,`All` | | | Code coverage log level | `Dumps` | -| InstrumentationLogLevel | `Errors`,`Dumps`,`Messages`,`All` | | | CLR Instrumentation Engine log level. More info [here](https://github.com/microsoft/CLRInstrumentationEngine/blob/develop/docs/logging.md). | | `Dumps` | +| CoverageLogLevel | `Errors`,`Dumps`,`Messages`,`All` | | | Code coverage log level | `Dumps` | +| InstrumentationLogLevel | `Errors`,`Dumps`,`Messages`,`All` | | | CLR Instrumentation Engine log level. More info [here](https://github.com/microsoft/CLRInstrumentationEngine/blob/develop/docs/logging.md). | `Dumps` | | ManagedVanguardLogLevel | `Error`,`Info`,`Verbose`,`None` | | | Managed instrumentation log level. Logging of managed side of code coverage. | `Info` | | CoverageFileLogPath | File or directory path | | | File path or directory path to place where code coverage and CLR IE logs should be stored. Directory should be specified with `\` at the end. | `D:\examples\logs\coverage.log` | | CoverageFileName | File path | | | File path to output code coverage report | `D:\examples\report.coverage` | @@ -25,34 +25,34 @@ ## Settings under CodeCoverage tag -| Name | Values | Default | Description | Example | -|---|---|---|---|---| -| CommunicationTimeout | Integer | 60000 | Specifies communication time out in milliseconds | `90000` | -| PipeClientsCount | Integer | 254 | Specifies number of pipe connections started by coverage server. | `2540` | -| CollectFromChildProcesses | `True`, `False` | `True` | When set to True, collects coverage information from child processes that are launched by test or production code. | `True` | -| UseVerifiableInstrumentation | `True`, `False` | `True` | Set this to True to collect coverage information for functions marked with the "SecuritySafeCritical" attribute. Instead of writing directly into a memory location from such functions, code coverage inserts a probe that redirects to another function, which in turns writes into memory. | `True` | -| AllowLowIntegrityProcesses | `True`, `False` | `False` | When set to True, collects coverage information from child processes that are launched with low-level ACLs, for example, UWP apps. | `True` | -| SymbolsRestrictOriginalPathAccess | `True`, `False` | `False` | Determines if looking for a .pdb file in the original debug directory. | `True` | -| SymbolsRestrictReferencePathAccess | `True`, `False` | `False` | Determines if looking for a .pdb file is allowed in the path where the .exe file is located. | `True` | -| SymbolsRestrictDBGAccess | `True`, `False` | `False` | Determines if looking for debug information is allowed from .dbg files. | `True` | -| SymbolsRestrictSystemRootAccess | `True`, `False` | `False` | Determines if searching for .pdb files is allowed in the system root directory. | `True` | -| EnableDynamicNativeInstrumentation | `True`, `False` | `True` | Enable dynamic native instrumentation. | `True` | -| EnableStaticNativeInstrumentation | `True`, `False` | `True` | Enable static native instrumentation. | `True` | -| EnableStaticNativeInstrumentationRestore | `True`, `False` | `True` | Enable static native instrumentation restore. If enabled all instrumented files are restored after collection. | `True` | -| EnableDynamicManagedInstrumentation | `True`, `False` | `True` | Enable dynamic managed instrumentation. | `True` | -| EnableStaticManagedInstrumentation | `True`, `False` | `False` | Enable static managed instrumentation. | `True` | -| EnableStaticManagedInstrumentationRestore | `True`, `False` | `True` | Enable static managed instrumentation restore. If enabled all instrumented files are restored after collection. | `True` | -| SymbolSearchPaths | XML | | Additional paths to search for .pdb (symbol) files. Symbols must be found for modules to be instrumented. If .pdb files are in the same folder as the .dll or .exe files, they are automatically found. Otherwise, specify them here. Note that searching for symbols increases code coverage runtime. So keep this small and local. | `C:\Users\User\Documents\Visual Studio 2012\Projects\ProjectX\bin\Debug` | -| AllowedUsers | XML | | Supported only for .NET Framework. Additional users that will be able to access internal shared memory and pipes. | `UserName1` | -| ModulePaths | XML | | Include and exclude lists for module paths.\\Empty "Include" clauses imply all; empty "Exclude" clauses imply none. Each element in the list is a regular expression (ECMAScript syntax). See /visualstudio/ide/using-regular-expressions-in-visual-studio. An item must first match at least one entry in the include list to be included. Included items must then not match any entries in the exclude list to remain included. | `.*CPPUnitTestFramework.*` | -| PublicKeyTokens | XML | | Include and exclude lists for public key tokens.\\Matches the public key token of a signed assembly. | `^B77A5C561934E089$` | -| CompanyNames | XML | | Include and exclude lists for company names.\\Matches the company name property in the assembly. | `.*microsoft.*` | -| Attributes | XML | | Include and exclude lists for attributes.\\Matches attributes on any code element. | `^System\.Diagnostics\.DebuggerHiddenAttribute$` | -| Sources | XML | | Include and exclude lists for source files.\\Matches the path of the source files in which each method is defined. | `.*\\atlmfc\\.*` | -| Functions | XML | | Include and exclude lists for functions.\\Matches fully qualified names of functions. Use `\.` to delimit namespaces in C# or Visual Basic, `::` in C++.). | `^Fabrikam\.UnitTest\..*` | -| DumpStaticNativeDisassembly | `True`, `False` | `False` | Generates the assembler dump of the native static instrumentation close to the module. | `True` | -| FileLogPath | `C:\folder\` or `C:\folder\log.txt` | | Set the path for the static native instrumentation. | `C:\folder\log.txt` | -| LogLevel | `Errors`,`Dumps`,`Messages`,`All` | | Set the log level for the static native instrumentation. | `All` | +| Name | Values | Default | [MTP.CodeCoverage](https://www.nuget.org/packages/Microsoft.Testing.Extensions.CodeCoverage) Default | Description | Example | +|---|---|---|---|---|---| +| CommunicationTimeout | Integer | 60000 | 60000 | Specifies communication time out in milliseconds | `90000` | +| PipeClientsCount | Integer | 254 | 254 | Specifies number of pipe connections started by coverage server. | `2540` | +| CollectFromChildProcesses | `True`, `False` | `True` | `True` | When set to True, collects coverage information from child processes that are launched by test or production code. | `True` | +| UseVerifiableInstrumentation | `True`, `False` | `True` | `True` | Set this to True to collect coverage information for functions marked with the "SecuritySafeCritical" attribute. Instead of writing directly into a memory location from such functions, code coverage inserts a probe that redirects to another function, which in turns writes into memory. | `True` | +| AllowLowIntegrityProcesses | `True`, `False` | `False` | `False` | When set to True, collects coverage information from child processes that are launched with low-level ACLs, for example, UWP apps. | `True` | +| SymbolsRestrictOriginalPathAccess | `True`, `False` | `False` | `False` | Determines if looking for a .pdb file in the original debug directory. | `True` | +| SymbolsRestrictReferencePathAccess | `True`, `False` | `False` | `False` | Determines if looking for a .pdb file is allowed in the path where the .exe file is located. | `True` | +| SymbolsRestrictDBGAccess | `True`, `False` | `False` | `False` | Determines if looking for debug information is allowed from .dbg files. | `True` | +| SymbolsRestrictSystemRootAccess | `True`, `False` | `False` | `False` | Determines if searching for .pdb files is allowed in the system root directory. | `True` | +| EnableDynamicNativeInstrumentation | `True`, `False` | `True` | `True` | Enable dynamic native instrumentation. | `True` | +| EnableStaticNativeInstrumentation | `True`, `False` | `True` | `True` | Enable static native instrumentation. | `True` | +| EnableStaticNativeInstrumentationRestore | `True`, `False` | `True` | `True` | Enable static native instrumentation restore. If enabled all instrumented files are restored after collection. | `True` | +| EnableDynamicManagedInstrumentation | `True`, `False` | `True` | `True` | Enable dynamic managed instrumentation. | `True` | +| EnableStaticManagedInstrumentation | `True`, `False` | `False` | `False` | Enable static managed instrumentation. | `True` | +| EnableStaticManagedInstrumentationRestore | `True`, `False` | `True` | `True` | Enable static managed instrumentation restore. If enabled all instrumented files are restored after collection. | `True` | +| SymbolSearchPaths | XML | | | Additional paths to search for .pdb (symbol) files. Symbols must be found for modules to be instrumented. If .pdb files are in the same folder as the .dll or .exe files, they are automatically found. Otherwise, specify them here. Note that searching for symbols increases code coverage runtime. So keep this small and local. | `C:\Users\User\Documents\Visual Studio 2012\Projects\ProjectX\bin\Debug` | +| AllowedUsers | XML | | | Supported only for .NET Framework. Additional users that will be able to access internal shared memory and pipes. | `UserName1` | +| ModulePaths | XML | | | Include and exclude lists for module paths.\\Empty "Include" clauses imply all; empty "Exclude" clauses imply none. Each element in the list is a regular expression (ECMAScript syntax). See /visualstudio/ide/using-regular-expressions-in-visual-studio. An item must first match at least one entry in the include list to be included. Included items must then not match any entries in the exclude list to remain included. | `.*CPPUnitTestFramework.*` | +| PublicKeyTokens | XML | | | Include and exclude lists for public key tokens.\\Matches the public key token of a signed assembly. | `^B77A5C561934E089$` | +| CompanyNames | XML | | | Include and exclude lists for company names.\\Matches the company name property in the assembly. | `.*microsoft.*` | +| Attributes | XML | | | Include and exclude lists for attributes.\\Matches attributes on any code element. | `^System\.Diagnostics\.DebuggerHiddenAttribute$` | +| Sources | XML | | | Include and exclude lists for source files.\\Matches the path of the source files in which each method is defined. | `.*\\atlmfc\\.*` | +| Functions | XML | | | Include and exclude lists for functions.\\Matches fully qualified names of functions. Use `\.` to delimit namespaces in C# or Visual Basic, `::` in C++.). | `^Fabrikam\.UnitTest\..*` | +| DumpStaticNativeDisassembly | `True`, `False` | `False` | `False` | Generates the assembler dump of the native static instrumentation close to the module. | `True` | +| FileLogPath | `C:\folder\` or `C:\folder\log.txt` | | | Set the path for the static native instrumentation. | `C:\folder\log.txt` | +| LogLevel | `Errors`,`Dumps`,`Messages`,`All` | | | Set the log level for the static native instrumentation. | `All` | ## Example From eee67ebf8d986fde3f3d1964e137adccf5cf9750 Mon Sep 17 00:00:00 2001 From: faisal Date: Thu, 13 Feb 2025 10:15:33 +0100 Subject: [PATCH 10/11] more, --- docs/configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index c85abff..f3960bb 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -30,14 +30,14 @@ | CommunicationTimeout | Integer | 60000 | 60000 | Specifies communication time out in milliseconds | `90000` | | PipeClientsCount | Integer | 254 | 254 | Specifies number of pipe connections started by coverage server. | `2540` | | CollectFromChildProcesses | `True`, `False` | `True` | `True` | When set to True, collects coverage information from child processes that are launched by test or production code. | `True` | -| UseVerifiableInstrumentation | `True`, `False` | `True` | `True` | Set this to True to collect coverage information for functions marked with the "SecuritySafeCritical" attribute. Instead of writing directly into a memory location from such functions, code coverage inserts a probe that redirects to another function, which in turns writes into memory. | `True` | +| UseVerifiableInstrumentation | `True`, `False` | `True` | `False` | Set this to True to collect coverage information for functions marked with the "SecuritySafeCritical" attribute. Instead of writing directly into a memory location from such functions, code coverage inserts a probe that redirects to another function, which in turns writes into memory. | `True` | | AllowLowIntegrityProcesses | `True`, `False` | `False` | `False` | When set to True, collects coverage information from child processes that are launched with low-level ACLs, for example, UWP apps. | `True` | | SymbolsRestrictOriginalPathAccess | `True`, `False` | `False` | `False` | Determines if looking for a .pdb file in the original debug directory. | `True` | | SymbolsRestrictReferencePathAccess | `True`, `False` | `False` | `False` | Determines if looking for a .pdb file is allowed in the path where the .exe file is located. | `True` | | SymbolsRestrictDBGAccess | `True`, `False` | `False` | `False` | Determines if looking for debug information is allowed from .dbg files. | `True` | | SymbolsRestrictSystemRootAccess | `True`, `False` | `False` | `False` | Determines if searching for .pdb files is allowed in the system root directory. | `True` | | EnableDynamicNativeInstrumentation | `True`, `False` | `True` | `True` | Enable dynamic native instrumentation. | `True` | -| EnableStaticNativeInstrumentation | `True`, `False` | `True` | `True` | Enable static native instrumentation. | `True` | +| EnableStaticNativeInstrumentation | `True`, `False` | `True` | `False` | Enable static native instrumentation. | `True` | | EnableStaticNativeInstrumentationRestore | `True`, `False` | `True` | `True` | Enable static native instrumentation restore. If enabled all instrumented files are restored after collection. | `True` | | EnableDynamicManagedInstrumentation | `True`, `False` | `True` | `True` | Enable dynamic managed instrumentation. | `True` | | EnableStaticManagedInstrumentation | `True`, `False` | `False` | `False` | Enable static managed instrumentation. | `True` | From b1d37781f0c02e4a61e62f58e51cbf2a6cb9fc2a Mon Sep 17 00:00:00 2001 From: faisal Date: Mon, 14 Apr 2025 12:28:36 +0200 Subject: [PATCH 11/11] Adding docs for ExcludeAssembliesWithoutSources, --- docs/configuration.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index f3960bb..cccaba9 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -21,7 +21,8 @@ | CLRIEARM64InstallDir | Directory path | | | Path to directory with custom CLR IE ARM64 binary | `D:\Microsoft.CodeCoverage\InstrumentationEngine\arm64` | | PerTestCodeCoverage | `True`, `False` | `False` | `False` | Indicates if coverage should be collected for each test separately | `True` | | IncludeTestAssembly | `True`, `False` | `True` | `False` | Indicates if coverage should be collected for tests projects | `True` | -| DeterministicReport | `True`, `False` | `False` | `False` | Indicates if paths in the report should start with deterministic fragment `/_/..` instead of full paths | `True` | +| DeterministicReport | `True`, `False` | `False` | `False` | Requires `DeterministicSourcePaths` to be set to `True` during the build. When enabled, paths in the report will start with a deterministic fragment `/_/..` instead of full paths. More details can be found [here](https://github.com/dotnet/sourcelink/blob/main/docs/README.md#deterministicsourcepaths). | `True` | +| ExcludeAssembliesWithoutSources | `NotSpecified`, `MissingAny`, `MissingAll`, `None` | `NotSpecified` | `MissingAll` | Excludes assemblies from the coverage report if their source files are missing. | `True` | ## Settings under CodeCoverage tag