intellij idea - Pass tags via build.gradle instead thro RunCukesSpec -
when pass tags in following manner works perfectly.
package features import org.junit.runner.runwith import cucumber.junit.cucumber import geb.junit4.gebreportingtest @runwith(cucumber.class) @cucumber.options(format = ["pretty", "html:build/cucumber", "json-pretty:build/cucumber-report.json"]) ,tags = ["@login_neg"]) class runcukesspec extends gebreportingtest {}
but goal config same thing via build.gradle
& if succeeds pass through command line. tried below initial step , hope running gradle test
in command line expected results.
test { testlogging.showstandardstreams = true args = ['--tags', '@login_neg', '--format', 'html:build/cucumber', '--format', 'json-pretty:build/cucumber-report.json', '--format', 'pretty'] }
in case tags running though.
tried well. no luck gradle test -dcucumber.options="--tags @login_neg"
versions:
------------------------------------------------------------ gradle 1.9 ------------------------------------------------------------ build time: 2013-11-19 08:20:02 utc build number: none revision: 7970ec3503b4f5767ee1c1c69f8b4186c4763e3d groovy: 1.8.6 ant: apache ant(tm) version 1.9.2 compiled on july 8 2013 ivy: 2.2.0 jvm: 1.7.0_45 (oracle corporation 24.45-b08) os: windows 7 6.1 amd64
you can pass options system properties updating build.gradle
file with:
test { systemproperty "cucumber.options", system.properties.getproperty("cucumber.options") }
this configuration pass cucumber.options
system property gradle jvm jvm running tests.
you can run gradle test -dcucumber.options="--help"
see available options system property (replace --help
options).
Comments
Post a Comment