project-infra
project-infra copied to clipboard
Test tooling: support long term test migration of Gingko textual labels (v1) to first class labels (v2)
Support long term migration from Ginkgo v1 style labels to v2 style first class Ginkgo labels
test-label-analyzer cli
Introduces a new cli for extraction of label data from tests inside a given code base. Initial use case is of course kubevirt/kubevirt, but might be useful for other Ginkgo based projects as well.
Given for input a configuration file that defines the category meta data, i.e. a set of test categories, where each category definition contains what Ginkgo labels and textual labels inside a test definition comprise of said category, this tool then serves two main use cases:
- generate stats about what tests are in a certain category
- given certain categories generate a string that can be used directly with Ginkgo
--filter
or--skip
flags, or--label-filter
flag for Ginkgo labels
usecase: generate stats about what tests are in a certain category
First example here is a stats page of which tests are currently in quarantine and for how long.
Other examples would be:
- how many tests do we have for a certain category definition?
- what label instances do exist inside the code base and how ofter is each one used?
- ...
usecase: generate strings that can be used directly with Ginkgo old style (focus/skip) and new style filters (label-filter)
Given a certain category configuration (in yaml or whatever suits best) the tool generates the strings that are required to filter exactly for those tests the configuration describes.
Next step would be to run those tests directly.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
/remove-lifecycle rotten /lifecycle freeze
/lifecycle frozen