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

Handle empty suites #56

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Handle empty suites #56

wants to merge 5 commits into from

Conversation

Sett17
Copy link
Contributor

@Sett17 Sett17 commented Nov 10, 2023

regards #55

Provide a console warning utility for better logging granularity.
…ort generation

Skip the generation of SonarQube XML reports when the test suite contains zero tests, adhering to compliance standards that require test results to be present in the reports. This ensures no empty reports are created, which would not comply with the expected report structure.
@Sett17 Sett17 marked this pull request as ready for review November 16, 2023 15:51
Copy link
Owner

@BBE78 BBE78 left a comment

Choose a reason for hiding this comment

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

Thanks @Sett17 for these changes, some small comments...

test/specs/Reporter.spec.js Outdated Show resolved Hide resolved
test/specs/Reporter.spec.js Outdated Show resolved Hide resolved
src/ReporterUtils.js Outdated Show resolved Hide resolved
src/SonarQubeCypressReporter.js Outdated Show resolved Hide resolved
test/cypress/component/MyEmptyComponent.spec.js Outdated Show resolved Hide resolved
test/cypress/integration/Empty.spec.js Outdated Show resolved Hide resolved
test/cypress/component/MyEmptyComponent.spec.js Outdated Show resolved Hide resolved
test/cypress/integration/Empty.spec.js Outdated Show resolved Hide resolved
Refactoring to eliminate the redundant `totalTestCount` property in favor of checking the length of the `runner.suite.tests` array directly. This simplifies the logic for determining if the test suite is empty, making the codebase cleaner and easier to maintain.
Updated the console method in ReporterUtils to use `console.warn` for warning messages, ensuring the correct log level is used. Test suite descriptions were also standardized for consistency across test files, enhancing readability and maintainability of the test codebase.
Copy link

sonarcloud bot commented Nov 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

None yet

2 participants