Skip to content

Enable Random order in cucumber engine #2849

Open
@Blackwolf291

Description

@Blackwolf291

🤔 What's the problem you're trying to solve?

I'm a team lead on a team currently implementing cucumber, and one of our usecases is being able to run individual features and scenarios. This is well supported, but to ensure this will work for any items, the features should be ran in a random (probably seeded) order, to highlight scenario dependencies. This is available in most versions of cucumber across languages, as well as in the cucumber core for java, but there is no way to access it in cucumber engine.

✨ What's your proposed solution?

Based on the existing property names and namespace for cucumber engine, and this feature in other environments that have it, introduce property cucumber.execution.order into cucumber engine. Cucumber engine already forwards all properties starting with "cucumber." from all sources so getting it should be smooth. From there its value should be mapped onto the correct PickleOrder value. Default should preserve existing behavior (lexical). Other options are random, random(seeded) and reverse lexical. I need random at least, but random(seeded) would be better.

⛏ Have you considered any alternatives or workarounds?

It's not usually recommended to hack into 3rd party libraries from your testcode, which leaves only hightened manual vigilance as an option.

📚 Any additional context?

Would be happy to try implementing it myself if your team will have the PR.


This text was originally generated from a template, then edited by hand. You can modify the template here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions