Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestFramework: Fix coverage #8581

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

pavel-mikula-sonarsource
Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource commented Jan 23, 2024

Part of #8542

Only the last commit TestFramework: Fix coverage needs a review. The rest is here to prove that covered is not 0% anymore

@pavel-mikula-sonarsource pavel-mikula-sonarsource changed the base branch from master to feature/TestFramework January 23, 2024 08:02
@pavel-mikula-sonarsource pavel-mikula-sonarsource force-pushed the Pavel/3-Coverage branch 4 times, most recently from d104ba3 to 66123c8 Compare January 23, 2024 14:47
@@ -35,9 +35,9 @@ variables:
- name: UnitTestProjectPath
value: 'analyzers\tests\SonarAnalyzer.Test\'
- name: UnitTestResultsPath
value: '$(Agent.TempDirectory)\TestResults'
value: '$(Build.SourcesDirectory)\TestResults'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated deconfusion, to use the same directory before and after the artifact is restored

FrameworkMoniker: 'net48'
CoverageArtifactName: 'DotnetCoverageNet48'
TestResultsArtifactName: 'DotnetTestResultsNet48'
CoverageArtifactName: 'DotNetCoverageNet48'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reordered by priority

@@ -251,7 +251,7 @@ stages:

- powershell: |
cd analyzers
& dotnet test $(ProjectFilePath) -f $(FrameworkMoniker) -c $(BuildConfiguration) -l trx --results-directory $(UnitTestResultsPath) /p:AltCover=true,AltCoverForce=true,AltCoverVisibleBranches=true,AltCoverAssemblyFilter='Moq|Humanizer|AltCover|Microsoft.VisualStudio.TestPlatform.*|.*Test',AltCoverPathFilter='SonarAnalyzer\.CFG\\ShimLayer|SonarAnalyzer\.ShimLayer\.CodeGeneration',AltCoverAttributeFilter='ExcludeFromCodeCoverage',AltCoverReport=$(CoveragePath)/coverage.$(FrameworkMoniker).xml
& dotnet test $(ProjectFilePath) -f $(FrameworkMoniker) -c $(BuildConfiguration) -l trx --results-directory $(UnitTestResultsPath) /p:AltCover=true,AltCoverForce=true,AltCoverVisibleBranches=true,AltCoverAssemblyFilter="Moq|Humanizer|AltCover|Microsoft.VisualStudio.TestPlatform.*|\.Test^",AltCoverPathFilter="SonarAnalyzer\.CFG\\ShimLayer|SonarAnalyzer\.ShimLayer\.CodeGeneration",AltCoverAttributeFilter="ExcludeFromCodeCoverage",AltCoverReport="$(CoveragePath)/coverage.$(CoverageArtifactName).xml"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual fix, .*Test was matching the .TestFramework part

Copy link
Contributor

@mary-georgiou-sonarsource mary-georgiou-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT

@pavel-mikula-sonarsource pavel-mikula-sonarsource marked this pull request as ready for review January 25, 2024 11:17
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@pavel-mikula-sonarsource pavel-mikula-sonarsource merged commit 716226a into feature/TestFramework Jan 25, 2024
@pavel-mikula-sonarsource pavel-mikula-sonarsource deleted the Pavel/3-Coverage branch January 25, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants