cucumber-jvm
cucumber-jvm copied to clipboard
Hardcoded scenario (pickle) order
🤔 What's the problem you've observed?
The library has only 3 hardcoded orderings "lexical", "reverse" and "random" (with possible seed parameter). The library is not suited for extending this.
✨ Do you have a proposal for making it better?
Probably the simplest way to do it with the least amount of code affected by this, is to try to interpret this string as a fully qualified class name and try to create instance of the class in PickleOrderParser.parse.
Of course it would be better to allow customizable factory, but I don't know, how much would that affect the whole ecosystem.
📚 Any additional context?
I would like to give specific tags order preference over others and then give lexical ordering within the same tag. The relevant project is here: https://github.com/iv4xr-project/iv4xr-se-plugin/
Happy to create PR if this makes sense to you.