viclovsky / swagger-coverage

Tool which generates full picture of coverage of API tests based on OAS (Swagger) v2 and v3
Apache License 2.0
197 stars 38 forks source link

What does it mean by Undeclared Status? Also, what does it by path <<id>> is not empty? #117

Closed Abdullah21818 closed 1 year ago

Abdullah21818 commented 1 year ago

My company is using this to keep track of our API coverage, for many endpoints, I'm noticing missing coverage on only declared status and the description given is undeclared status. Does anyone know exactly what does it mean by undeclared status? Does it mean we're missing API automation tests for those undeclared statuses or does it mean the endpoint is returning 403 (as seen in the example below) somewhere in the automation project which is not an expected behaviour defined by the developers when they made the endpoint? image By path id not empty does it mean I need to create a test case that covers the scenario where the id is empty, or does it mean I already have a test case that checks whether id is empty and I should get rid of it?

TemaMak commented 1 year ago

When section "only declared status" is failed it means endpoint retrun status which is not described in api schema.

Rule "path var is not empty" checking passing any values to this path variable. For correct validaton by this rule you must describe path variable as variable, not just concatenate it to url.

TemaMak commented 1 year ago

@Abdullah21818 you can find more information about path variable in this issue: https://github.com/viclovsky/swagger-coverage/issues/67

Abdullah21818 commented 1 year ago

Thanks!