-
-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
outline: is there a way to resolve the node text returned from func? #1521
Comments
Thanks for the kind words! Since I see two options:
I do think #1 is worth a bit of investment. It could pay dividends for much of the k8s community as it will let you analyze slice and dice test runs much more effectively programmatically. |
Hey, thanks for the fast reply! We actually are using the ginkgo outline for some of our tooling already, i.e. to map the outline to git blame lines and generate a report over selected tests 1 and (a WIP though) to determine the names of tests that were changed during the course of a PR 2 - although this is only part of a bigger effort in re-running optimization. I have the latter largely working and maybe the partial test name problem is even not a real one, so it might work well enough already. Thank you! |
One note though: calling the ginkgo outline programmatically was giving us a hard time, since the command func was not exported - or am I just holding it wrong ? |
Hey, first of all thank you for your awesome work - the KubeVirt community is using onsi/ginkgo a lot!
As background of my question: I am working on tooling to re-run selected tests that have been changed to detect flakes.
In the KubeVirt e2e test codebase we are aiming to avoid repetition of labels and test name prefixes using wrapper functions
SIGDescribe
that callDescribe
to inject additionaltext
andargs
in the call.Since that obviously breaks the ginkgo outline mechanism (those nodes are missing as the identNames don't match any case of the internal switch 1).
I refactored the
ginkgo.Describe
call by replacing it with a wrapper that returns the extended text and args instead 2 . This restores the originalDescribe
call and therefore the node reappears in the outline.That said, our ideal goal would be to have the full ginkgo node text in the outline to avoid partial test names, which currently is not supported as the ginkgo outline construction can't resolve the func to a literal 3 .
Is there a way to achieve this somehow that I have overlooked? Would I need to go the route of resolving the text myself by following the AST? Or do you have another idea that I should look into?
The text was updated successfully, but these errors were encountered: