Hi,
I have the following defaults specified in my 'RunCucumberForAppianTest.java' file:
@CucumberOptions( glue = { "com.appiancorp.ps.cucumber"}, plugin = {"pretty", "html:target/report"}, features = "src/test/resources", tags = "@Setup or @Smoke or @Teardown")
Running a simple 'mvn clean test' at the command line launches the tagged tests correctly.
When I run the same set of tests via the command line I encounter an error:
mvn clean test -Dcucumber.options="-t @Setup or @Smoke or @Teardown"------------------------------------------------------- T E S T S-------------------------------------------------------Running TestRunner.RunCucumberForAppianTestTests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.411 sec <<< FAILURE!initializationError(TestRunner.RunCucumberForAppianTest) Time elapsed: 0.004 sec <<< ERROR!java.lang.IllegalArgumentException: Not a file or directory: C:\CucumberForAppian\Smoke
or:
mvn clean test -Dcucumber.options="-t @Setup or (@Smoke and not @WIP) or @Teardown"------------------------------------------------------- T E S T S-------------------------------------------------------Running TestRunner.RunCucumberForAppianTestTests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.403 sec <<< FAILURE!initializationError(TestRunner.RunCucumberForAppianTest) Time elapsed: 0.004 sec <<< ERROR!java.lang.IllegalArgumentException: Not a file or directory: C:\CucumberForAppian\WIP)
mvn clean test -Dcucumber.options="-t @Setup" works.
In summary, I can set complex tag declarations via @CucumberOptions, but these are intended as defaults and not to be edited for every test run. At the command line the the error seems to occur for any set of tags more complex than '@X'
Can anyone else confirm this issue? I'm using the latest download version (19.4)
Thanks!
Discussion posts and replies are publicly visible
So in the end I found the solution to this, and it was straightforward - I tried many versions of escape characters and eventually found success when enclosing the tag declarations in single quotes within the double quoted -t section:
mvn clean test -Dcucumber.options="-t '@Setup or (@Smoke and not @WIP) or @Teardown'"
This is being run via the command line on windows