How to pass multiple parameter to Cucumber Runner

2020-08-03 09:00发布

I am executing my test cases from Jenkins and passing multiple cucumber tags from Jenkins to execute my scenario -

Runner File -

plugin = { "pretty", "html:target/test-report" },
features    = { "src/main/resources/abc/features" },
tags        = {"@Demo","@Alpha"}
)

Jenkins Parameter-

test -Dcucumber.options="src/main/resources/myuhc2/features/ --tags @Demo, --tags @Alpha"

but this is not working and I am getting error -

Tests in error:

Not a file or directory - /home/jenkins/workspace/XYZ2.0/consumer_proj/Alpha

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

1条回答
何必那么认真
2楼-- · 2020-08-03 09:48

Delete the comma following @Demo. If you want to AND the tags use:

--tags @Demo --tags @Alpha

To OR the tags use (no space after comma):

--tags @Demo,@Alpha
查看更多
登录 后发表回答