Discussion:
[Cucumber] Cucumber tags not working as per docs.cucumber.io
'Michael Cunningham' via Cukes
2018-11-19 13:48:47 UTC
Permalink
I'm using io.cucumber/cucumber-java version 4.2.0
and io.cucumber/cucumber-junit version 4.2.0


In https://docs.cucumber.io/cucumber/api/#tags, the suggested syntax for
'ANDing' tags is : mvn test -Dcucumber.options='--tags "@smoke and @fast"'

I find this does not work, but mvn test -Dcucumber.options="--tags @smoke
--tags @fast"' does work.



What steps will reproduce the issue? Enter mvn test
-Dcucumber.options='--tags "@smoke and @fast"' as per docs.cucumber.io
webpage

1. What is the expected result? Expect that only the tests tagged by
both @smoke and @fast will be run

What happens instead? Error : Unknown lifecycle phase "@smoke and @fast'"
Sees that it is getting treated as a maven phase or goal


Also I found that 'and' and 'not' keywords are not recognised
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MP Korstanje
2018-11-21 14:36:10 UTC
Permalink
Which shell are you using? The syntax works as expected in bash.

***@logarithmicwhale:~/Projects/cucumber/cucumber-java-skeleton$
mvn test -Dcucumber.options='--tags "@smoke and @fast"'
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Cucumber-Java Skeleton 0.0.1
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
cucumber-java-skeleton ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/home/mpkorstanje/Projects/cucumber/cucumber-java-skeleton/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @
cucumber-java-skeleton ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources)
@ cucumber-java-skeleton ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @
cucumber-java-skeleton ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @
cucumber-java-skeleton ---
[INFO] Surefire report directory:
/home/mpkorstanje/Projects/cucumber/cucumber-java-skeleton/target/surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running io.cucumber.skeleton.RunCucumberTest
Feature: Belly

@fast @smoke
Scenario: a few cukes # io/cucumber/skeleton/belly.feature:4
Given I have 42 cukes in my belly #
Stepdefs.I_have_cukes_in_my_belly(int)

1 Scenarios (1 passed)
1 Steps (1 passed)
0m0.064s

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.203 sec

Results :

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

[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.276 s
[INFO] Finished at: 2018-11-21T15:34:57+01:00
[INFO] Final Memory: 11M/212M
[INFO]
------------------------------------------------------------------------
Post by 'Michael Cunningham' via Cukes
I'm using io.cucumber/cucumber-java version 4.2.0
and io.cucumber/cucumber-junit version 4.2.0
In https://docs.cucumber.io/cucumber/api/#tags, the suggested syntax for
What steps will reproduce the issue? Enter mvn test
webpage
1. What is the expected result? Expect that only the tests tagged by
Sees that it is getting treated as a maven phase or goal
Also I found that 'and' and 'not' keywords are not recognised
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Michael Cunningham' via Cukes
2018-11-23 08:59:44 UTC
Permalink
I'm using Windows command shell
Post by 'Michael Cunningham' via Cukes
I'm using io.cucumber/cucumber-java version 4.2.0
and io.cucumber/cucumber-junit version 4.2.0
In https://docs.cucumber.io/cucumber/api/#tags, the suggested syntax for
What steps will reproduce the issue? Enter mvn test
webpage
1. What is the expected result? Expect that only the tests tagged by
Sees that it is getting treated as a maven phase or goal
Also I found that 'and' and 'not' keywords are not recognised
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...