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

Removed integration-test folders from scanning #217

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

luluiz
Copy link
Member

@luluiz luluiz commented Oct 11, 2024

User-Facing Changes
N/A

Description
Removed integration tests from Sonar scanning.

Why not include E2E and integration tests in SonarQube:
Focus on production code: SonarQube is primarily designed to check the quality of production code (not test code). It focuses on static analysis, security, and code coverage metrics in unit tests, which are more precise in testing the internal logic of the code.

Unit test coverage is more relevant: Code coverage is a key metric to ensure that the production code has been well-tested in smaller units, which is the focus of quality analysis. E2E and integration tests can involve multiple layers of the application, which dilutes the granularity of the coverage.

Unnecessary noise in metrics: Including E2E and integration tests can artificially inflate the code coverage metric, as these tests tend to cover large portions of the code but do not provide the same accuracy as unit tests. This can lead to less clear reports.

Complexity in reports: E2E and integration tests may include many irrelevant details for code quality analysis, which can complicate the interpretation of SonarQube results.

@luluiz luluiz changed the title removed integration-test folders from scanning Removed integration-test folders from scanning Oct 11, 2024
Signed-off-by: Luiz Bezerra <[email protected]>
@luluiz luluiz marked this pull request as draft October 14, 2024 08:57
@luluiz luluiz marked this pull request as ready for review October 14, 2024 12:56
Copy link

Copy link
Contributor

@ctw-joao-luis ctw-joao-luis left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@luluiz luluiz merged commit 8c0808f into main Oct 18, 2024
10 checks passed
@luluiz luluiz deleted the remove-integration-tests-from-sonar-scanning branch October 18, 2024 10:27
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.

3 participants