Coverage check
Hello, Is their a way check coverage of the openapi json file after applying the unit tests? If not - I think it will be useful..
Comments (5)
-
-
reporter I'll elaborate.
I'm using swagger-request-validator-mockmvc.
I run all the unit tests of the controller/mockMvc with.andExpect(openApi().isValid(SWAGGER_JSON_FILE))
added to all tests.
How can I make sure that all the API calls + all possible response codes has been checked? Perhaps there is an API call in the swagger document which is not available anymore.. -
At the moment it would be difficult with the
swagger-request-validator
. It works on a per-request basis (e.g. validates a single request against a single response) and doesn't track any sort of state about which requests have been validated and which response codes seen etc.I think coverage is a related concern, but not one that is core to the SRV (e.g. I think you could quite easily write a tool to provide coverage that uses the SRV, or is a peer of SRV).
-
reporter Thanks!
-
- changed status to wontfix
- Log in to comment
What? I have not unterstand what you are trying to accomplish. Or how a JSON file can have coverage.