-
Notifications
You must be signed in to change notification settings - Fork 10
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
feature request and quick fix: provide an extension point for customizing the file name #133
Comments
Would a PR be accepted that reads it from |
Pull requests are always welcome, but we haven't been supporting GebConfig in ContainerGebSpec because there are several options that wouldn't apply and could lead to confusion since we must configure certain options to work with a container. If test naming is your concern: would giving you away to override the name also suffice? We currently implement the name using ContainerGebTestDescription. If we allowed you to specify your own class would that work for you? |
As for the file name being too long, we do allow for you to place the files in other areas and we can look at other ways to shorten the name. |
Thanks as always for your elaborate comments <3
Yes for this I would've probably implemented it like this even though I haven't programmed in Java/Groovy for long time so if you think this paradigm is good too then all the better, yes :). |
Spock seems to make use of java services to find class implementations, I suspect we should do a similar approach. Define a text file in resources and if that exists, instantiate that class version instead of the built in one. @matrei @sbglasius would you be ok with this approach? |
Yes, that's also the solution I had in mind! |
@JonasPammer would you like to submit a PR for this solution? If not, I can get around to it next week. |
I will give it a try :) thanks for helpful insight on spock, gives me good base to start search |
You're welcome! Look up |
Originally posted by @matrei in #128
Creating this issue to provide other people searching for it with a solution until I or more knowledgeful people come up with a paradigm of how it should be implemented since GebConfig.groovy is no longer used and the @ContainerGebConfig.groovy does not seem right
src/integration-test/resources/SpockConfig.groovy
withresults in e.g. :
Screen recordings for test DemoSpec_upload_files_to_existing_object_0 will be stored at: build/gebContainer/recordings/20250207_123726/FAILED-DemoSpec_upload_files_to_existing_object_0-20250207-123845.mp4
, which is 115 characters, resulting in absolute path length of 189 in my local folder structureinstead of:
Screen recordings for test DemoCRUDSpec_upload_files_to_existing_object_upload_files_to_existing_object_appendShippingNote_false_appendInvoice_false_shippingNoteExtract_Lieferschein_invoiceExtract_Rechnungsnr_shippingDisplay_LS67949_invoiceDisplay_RG67229_0_ will be stored at: build/gebContainer/recordings/20250207_124010/FAILED-DemoCRUDSpec_upload_files_to_existing_object_upload_files_to_existing_object_appendShippingNote_false_appendInvoice_false_shippingNoteExtract_Lieferschein_invoiceExtract_Rechnungsnr_shippingDisplay_LS67949_invoiceDisplay_RG67229_0_-20250207-124121.mp4
Stacktrace for SEO:
The text was updated successfully, but these errors were encountered: