-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
comp-fuzzingIssue is related to the fuzzingIssue is related to the fuzzingcomp-springIssue is related to Spring projects supportIssue is related to Spring projects supportctg-bugIssue is a bugIssue is a bug
Milestone
Description
Description
Spring unit tests generated with symbolic engine avoid branches whis thisInstance == null if being null is actually impossible.
For example, because variable with @InjectMocks annotation is never null.
Fuzzer currently does not support this restrictions, so we generate tests like this:
///region FUZZER: ERROR SUITE for method useAbs(int)
@Test
@DisplayName("useAbs: x = -3 (mutated from -1) -> throw NullPointerException")
public void testUseAbsThrowsNPE() {
/* This test fails because method [org.springframework.samples.math.MathUser.useAbs] produces [java.lang.NullPointerException]
org.springframework.samples.math.MathUser.useAbs(MathUser.java:10) */
mathUser.useAbs(-3);
}
///endregionThis test passes and writes that should fail :)
Metadata
Metadata
Assignees
Labels
comp-fuzzingIssue is related to the fuzzingIssue is related to the fuzzingcomp-springIssue is related to Spring projects supportIssue is related to Spring projects supportctg-bugIssue is a bugIssue is a bug
Type
Projects
Status
Done