Skip to content

Scenario: a new method is added, but there's no test for it - #1

Open
adamtornhill wants to merge 12 commits into
masterfrom
new-code-lacking-coverage
Open

adamtornhill wants to merge 12 commits into
masterfrom
new-code-lacking-coverage

Conversation

@adamtornhill

@adamtornhill adamtornhill commented Sep 30, 2025 •

Copy link
Copy Markdown
Contributor

This PR illustrates the example of new code being written without any coverage at all. (It's dead code in this case).
We expect the code coverage gate to fail, letting us know that 0 % of the new code has coverage.

@adamtornhill adamtornhill changed the title Add functionality for squaring Scenario: a new method is added, but there's no test for it Oct 2, 2025

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

❌ Code Coverage Gate Failed

Gates Failed
Overall Coverage: 70.0% (required = 80%)
New & Changed Code Coverage: 0.0% (required = 95%)

Review details by gate
Gate Pass/Fail Reason Action
Overall Coverage The overall coverage gate was checked for all code in src/main/java/ and is too small: 70.0% covered < threshold = 80% Start by adding tests to the following files: src/main/java/com/codescene/ConditionalExample.java : 9 uncovered lines,src/main/java/com/codescene/Calculator.java : 3 uncovered lines. Optionally, exclude content from the coverage gates via CodeScene's configuration.
New & Changed Code Coverage New or changed code lacks code coverage: 0.0% covered < threshold = 95% Add tests to: src/main/java/com/codescene/Calculator.java : uncovered lines = 43

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