Skip to content

Improve fuzzer with better annotation processing and related issues #2311

Open
@EgorkaKulikov

Description

@EgorkaKulikov

Description

Consider we need to fuzz the instance of the following class representing entity https://github.com/spring-projects/spring-petclinic/blob/main/src/main/java/org/springframework/samples/petclinic/owner/Owner.java

We need to save it to database in our tests later, so we would like to obtain at least one instance that follows all restrictions from annotations. It seems to be impossible with the current implementation of our fuzzer.

The restrictions have the following form:

@NotEmpty
@Digits(fraction = 0, integer = 10)
private String telephone;

Expected behaviour

  1. We need to be able to process an instance that satisfies all annotated restrictions

  2. We suggest to construct an entity that satisfies restrictions on the construction phase and start mutating it only after that.


  1. It is also suggested to allow to create a fuzzed instance without any mutations - it may be useful to increase the coverage.

Metadata

Metadata

Assignees

Labels

comp-fuzzingIssue is related to the fuzzingcomp-springIssue is related to Spring projects supportctg-enhancementNew feature, improvement or change request

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions