java - cucumber tags dynamically set when triggering jenkins job -
how can set cucumber --tags while triggering jenkins job using jenkins api, i.e. "server_url + cfh_job + build_with_params + "/test_env=" + env_url + "/browser_type=" + browser"
in runnertest looks this:
@runwith(cucumber.class) @cucumberoptions( plugin = {"pretty", "html:target/html/", "json:target/cucumber.json"}, features = "src/test/resource", tags = {"@application"} )
i dynamically change tag parameter , control test suite run.
thanks ronen
i have similar use case in project. java project uses maven, can call "invoke top-level maven targets" pre steps. in case, have pass additional string paramater in jenkins job : server_url + cfh_job + "buildwithparameters?test_env=" + env_url + "&browser_type=" + browser + "&tags=" + tags
where tags : tags= "@application,~@ignore"
then, in jenkins job, in invoke top-level maven targets, goals, can pass : -dcucumber.options="--tags "$tags
this option overwrite tags defined in runner.
Comments
Post a Comment