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

Out of the box coverage is 36.4% with spring-test #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SirAnimesh
Copy link
Collaborator

@SirAnimesh SirAnimesh commented Mar 6, 2025

Using spring-test to mock HttpServletRequest and HttpServletResponse interfaces, improves the mocks used and quality of tests. This PR compares out of the box tests with no mocks (#4).

Also see coverage improvements gained by using Mockito mocks instead of spring-test mocks in #5.

Test creation summary for module: com.diffblue.pov:java-ee-servlet
------------------------------------------------------------------
Total:                                              82 methods
46 tests created for:                               62 methods
19 partial tests created for:                       19 methods
                                                              
No tests created for:                               20 methods
    16 R011: Sandboxing policy violation                     
     3 R002: Missing observers                               
     1 R081: Exception in arrange section                    
                                                              
Diffblue tests cover 216 of 593 lines to cover (36.4%)
Manual tests cover 0 of 593 lines to cover (0.0%)

Baeldung • How to Mock HttpServletRequest

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.

1 participant