build icon indicating copy to clipboard operation
build copied to clipboard

[FEATURE] Use Ginkgo Labels to Isolate Features in e2e Tests

Open adambkaplan opened this issue 1 year ago • 6 comments

Is there an existing feature request for this?

  • [X] I have searched the existing feature requests

Is your feature request related to a problem or use-case? Please describe.

The current e2e test suite for shipwright/build contains tests for multiple features, however it can only be run as an "all or nothing" approach. We should be able to annotate/label tests to identify the associated feature and run subsets of e2e tests.

Use case: Downstream distributions may not support all the features in the "upstream". The build repo also tests the samples, which are not guaranteed to work on all Kubernetes distributions (OpenShift in particular has skews around security that can make these tests require additional setup).

Describe the solution that you would like.

Ginkgo v2 has "primary" support for labels in spec descriptors [1]. These can be used to narrow tests. We can use labels like [FEATURE: xxx] to narrow features, and others like [CORE] to identify specs that test the most core/stable features.

[1] https://onsi.github.io/ginkgo/#spec-labels

Describe alternatives you have considered.

We could leave descriptions in place and add description-based filtering [1].

[1] https://onsi.github.io/ginkgo/#description-based-filtering

Anything else?

The ginkgo docs recommend using the ginkgo cli to run tests and pass in the right flags to do this kind of filtering.

We might be able to keep the existing go test -based approach by passing in flags via -ginkgo.nnn [1]

[1] https://github.com/onsi/ginkgo/issues/381

adambkaplan avatar Dec 18 '23 16:12 adambkaplan

From Refinement, @adambkaplan to move this to a Community session, for a group discussion.

qu1queee avatar Jan 11 '24 15:01 qu1queee

From Refinement, this might be a good-second-issue!

qu1queee avatar May 16 '24 14:05 qu1queee

/assign @ayushsatyam146

ayushsatyam146 avatar Jul 12 '24 05:07 ayushsatyam146

Moving this to the "Backlog" since this issue has been carried across multiple release milestones. This issue should be moved to an appropriate release milestone once demonstrated progress has been made (ex: an opened pull request).

adambkaplan avatar Mar 06 '25 15:03 adambkaplan

@ayushsatyam146 can we pick this item? I have people looking for new items.

qu1queee avatar Apr 09 '25 09:04 qu1queee

Sure @qu1queee please go ahead

ayushsatyam146 avatar Apr 09 '25 12:04 ayushsatyam146