protean
protean copied to clipboard
Support struct vars in integ test generation
we have struct vars to support matrix parameters, json query-parameters, with format:
";groupFilter" {
:type :MatrixParams
:doc "matrix parameters to filter groups. Valid parameters are: groupId (multiple), city (multiple)"
:struct {
"groupId" ["${groupId}" :optional :multiple]
"city" ["${city}" :optional :multiple]
}
}
"paginationFilter" {
:type :Json
:doc "json parameter for pagination. Has optional keys: page, pageSize"
:struct {
"page" ["${page}" :optional]
"pageSize" ["${pageSize}" :optional]
}
}
currently, in integ test generation, the whole variable will or will not be generated, depending on whether the top level (groupFilter or paginationFilter) is required or optional.
For finer testing, we should respect the optionality of each of the composing keys. E.g. when providing a struct, if we don't provide a required key, do we get a 400?