Coverage check

Issue #184 wontfix
Yosi Karl created an issue

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)

  1. Sven Döring

    What? I have not unterstand what you are trying to accomplish. Or how a JSON file can have coverage.

  2. Yosi Karl 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..

  3. James Navin

    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).

  4. Log in to comment