[Cucumber] Run Feature File with Tags

hello,
I need to set cucumber rerun option, and I also need to use variable tags at the same time.

Somebody knows a way to do it ?

how to set this plugin option within CucumberKW.runFeatureFileWithTags() ?
I have no variable to pass this plugin option ?

, plugin=[“pretty”, “html:ReportsCucumber”,“json:ReportsCucumber/cucumber.json”, “rerun:ReportsCucumber/rerun_cucumber.txt”]

my code for the moment :
CucumberKW.runFeatureFileWithTags('Include/features/', 'not @skip and not @0_AvoidOnVersion'+ GlobalVariable.version + ' and (' +GlobalVariable.cucumberTagsSentence+ ')')

If I try to use the other way :

CucumberKW.runWithCucumberRunner(CucumberLauncher.class)

and class CucumberLauncher.groovy :

@RunWith(Cucumber.class)
@CucumberOptions( features=“Include/features/”
, glue=“”
, tags = ‘not @X_StaticTest and not @skip and not @0_AvoidOnVersion’+ GlobalVariable.version
, plugin=[“pretty”, “html:ReportsCucumber”,“json:ReportsCucumber/cucumber.json”, “rerun:ReportsCucumber/rerun_cucumber.txt”])
//@CucumberOptions(features=“Include/features/Test_Seb.feature”,glue=“”, plugin=[“pretty”, “html:ReportsCucumber”,“json:ReportsCucumber/cucumber.json”, “rerun:ReportsCucumber/rerun_cucumber.txt”])

public class CucumberLauncher {
}

I get an error :

Multiple markers at this line

  • Groovy:Expected ‘(not @X_StaticTest and not @skip and not @0_AvoidOnVersion + internal.GlobalVariable.version)’ to be an inline constant of type java.lang.String in @cucumber.api.
    CucumberOptions

@Brandon-Hinds Thanks for your excellent post above.

It looks like the second “Not Working” scenario (keyword created using Katalon Studio’s manual steps screen) does not work in version 8.2.5 either. However, the behavior is somewhat different: the test step now passes but none of the tests in the tagged scenario are executed.
The issue is resolved (tests in the tagged scenario(s) are executed) if the tag is specified as a String (as in your ‘Working’ scenario.
All of the above is with a single tag (haven’t tested with multiple tags).

I have logged the above issue with details in the Bug Reports section of this Forum ([Cucumber] When tags parameter is specified from the Insert List popup in the UI, Run Feature File with Tags completes as Passed but 0 test scenarios and 0 tests are executed ).