serving icon indicating copy to clipboard operation
serving copied to clipboard

Measure conformance test API coverage

Open bobcatfish opened this issue 8 years ago • 8 comments

/area API /area test-and-release /kind dev

Expected Behavior

The purpose of the conformance tests is to ensure that the API is functioning as described in the spec however we currently do not have a way of determining how much of the API is covered.

Actual Behavior

It should be possible, ideally as part of the coverage measurement done on each PR (or at least reported the same way) to determine how much of the API is covered by the conformance tests.

Additional Info

If we can make use of apisnoop (for measuring k8s API coverage) that would be awesome!

bobcatfish avatar May 31 '18 18:05 bobcatfish

looks like apisnoop is doing something different. It looks at the audit logs of the apiserver and checks which K8s api you are using.

Looks like we need something different here -> we need to verify that the conformance tests test all the apis from the spec

srinivashegde86 avatar Jul 11 '18 22:07 srinivashegde86

Looks like we need something different here -> we need to verify that the conformance tests test all the apis from the spec

If it were possible to adapt apisnoop to be able to check which knative apis you're using, that would be cool :D probably it would need to support plugins or something similar - or we could use it as a basis to create something similar 🤔

bobcatfish avatar Jul 11 '18 22:07 bobcatfish

I am still not sure I understand the expected behavior.

Do we need to verify how much functionality the conformance tests cover or we need to check if the individual API's are covered? For eg. For functionality, we will verify the complete workflow like auto rollout While for individual API's, we can just check if we called CreateRoute

srinivashegde86 avatar Jul 16 '18 22:07 srinivashegde86

We need to test which fields are being tested in the conformance tests, than what API's we are invoking or the particular workflows we are testing.

Particularly:

  1. What the cardinality across all tests for a given field is.
  2. If a field is an enum, which enums end up being present in the test
  3. This should apply to both spec and status;

srinivashegde86 avatar Jul 17 '18 00:07 srinivashegde86

@dushyanthsc Are we able to close this now that #3433 landed?

dgerd avatar Mar 19 '19 21:03 dgerd

@dgerd Yes, we can close this issue.

The API Coverage results are now surfaced here: https://prow.knative.dev/?job=ci-knative-serving-webhook-apicoverage

dushyanthsc avatar Mar 19 '19 21:03 dushyanthsc

/close

dgerd avatar Mar 19 '19 21:03 dgerd

@dgerd: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

knative-prow-robot avatar Mar 19 '19 21:03 knative-prow-robot