Support more parameter annotations and types for testing @Controller
#2462
Labels
comp-codegen
Issue is related to code generator
comp-instrumented-process
Issue is related to Instrumented process
comp-spring
Issue is related to Spring projects support
ctg-enhancement
New feature, improvement or change request
Description
#2447 only adds support for parameters annotated with
@RequestBody
and@PathVariable
annotations.Here are some more annotations that can be supported in a similar manner (sorted roughly in popularity decreasing order):
@RequestParam
@Valid
(depends on Create a good EntityValueProvider for Spring fuzzing #2340)@RequestHeader
@ModelAttribute
(see also@ControllerAdvice
)@CookieValue
@RequestAttribute
@RequestPart
@SessionAttribute
@MatrixVariable
Here are some more types that are treated specially by Spring (sorted roughly in popularity decreasing order):
HttpServletRequest
BindingResult
Model
andModelMap
Map<String, String>
(with@RequestParam
or@PathVariable
annotations)Optional<T>
Authentication
HttpHeaders
(with@RequestHeader
annotation)HttpSession
RedirectAttributes
Locale
The text was updated successfully, but these errors were encountered: