Skip to content

Allow comma separated glue path in configuration #554

Description

@UnleashSpirit

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

Hello it's me again :D, thanks for the fast reinclude "pretty format" !

I have another request, my cucumber's tests are separated in packages like :
foo.bar.common
foo.bar.a
foo.bar.b

And my runner classes uses the glue path like

@Suite
@IncludeEngines("cucumber")
@SelectClasspathResource("cucumber/a")
@ConfigurationParameter(key = Constants.GLUE_PROPERTY_NAME,
        value = "foo.bar.common,"
                + "foo.bar.a")
public class RunCucumberATest {
}

(same for foo.bar.b version)

If I run it with maven no problem, it works.
If I run it with right click > Run As > jUnit on the runner class no problem.
If I use the "Run" button on feature file (or with right click) I have an error saying I have two classes with @CucumberContextConfiguration which is true, one for A and one for B.
I try to configure glue path in "Run configuration" but it seems that comma separated glue path are not supported ?

Exception in thread "main" java.lang.IllegalArgumentException: The glue path contained invalid identifiers foo/bar/common,foor/bar/a
	at io.cucumber.core.feature.GluePath.parseAssumeClasspathScheme(GluePath.java:87)
	at io.cucumber.core.feature.GluePath.parse(GluePath.java:65)
	at io.cucumber.core.options.CommandlineOptionsParser.parse(CommandlineOptionsParser.java:117)
	at io.cucumber.core.options.CommandlineOptionsParser.parse(CommandlineOptionsParser.java:85)
	at io.cucumber.core.cli.Main.run(Main.java:70)
	at io.cucumber.core.cli.Main.main(Main.java:30)

✨ What's your proposed solution?

Allow comma separated list like @ConfigurationParameter(key = Constants.GLUE_PROPERTY_NAME, value = "") does.

⛏ Have you considered any alternatives or workarounds?

My actual workaround, using right click on the runner class with tags

📚 Any additional context?

Image

Plugin version: 3.0.0.202509271233

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions