cucumber run individual or subset with tag filter results in a Number format exception

385 views
Skip to first unread message

Vincent Brouillet

unread,
Oct 6, 2016, 7:54:18 AM10/6/16
to Serenity BDD Users Group
I'm using Cucumber and developing a scenario. How do I run only this specific scenario?

The doc says to use tags: 

mvn clean verify -Dcucumber.options="--tags version:Sprint-1.2"

It throws an error. I'm using the example in the GIT repo, cucumber-webtests:

Running net.thucydides.showcase.cucumber.AddItemToShoppingCart

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.035 sec <<< FAILURE! - in net.thucydides.showcase.cucumber.AddItemToShoppingCart

initializationError(net.thucydides.showcase.cucumber.AddItemToShoppingCart)  Time elapsed: 0.012 sec  <<< ERROR!

java.lang.NumberFormatException: For input string: "sprint-2"

at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)


I've tried with different tags. No luck. There has to be a simple way to choose which scenario to run when developing? Although I very much like the flexibility of tags if i works.


My versions:

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<serenity.version>1.1.42</serenity.version> <!-- https://bintray.com/serenity/maven/serenity-core/ -->
<serenity.maven.version>1.1.42</serenity.maven.version>
<serenity.cucumber.version>1.1.11</serenity.cucumber.version> <!-- https://bintray.com/serenity/maven/serenity-cucumber/ -->
</properties>


(Side note: should I use Jbehave instead? My teams are Node.Js and Ruby anyway. I thought Cucumber was probably a good shot. But I've used thucydides with Jebhave in the past with great success. As long as we can use gherkin syntax, we have to lear Java, so not much preference.)

John Smart

unread,
Oct 6, 2016, 8:07:40 AM10/6/16
to Vincent Brouillet, Serenity BDD Users Group
Do you have the full stack trace?
(In answer to your second point, I generally find Cucumber more flexible than JBehave)

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-users+unsubscribe@googlegroups.com.
To post to this group, send email to thucydides-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
___________________________________________________
John Smart | Wakaleo Consulting  |  +44 7398 832273
Making smart teams collaborate better
http://johnfergusonsmart.com  |  john....@wakaleo.com
___________________________________________________

We love breaking down silos and helping smart teams collaborate better! Ask about our tailored on-site workshops in Agile Product Planning, BDD Requirements Discovery,  BDD, TDD and Clean Coding, and Advanced BDD Test Automation.
___________________________________________________

Vincent Brouillet

unread,
Oct 6, 2016, 8:11:18 AM10/6/16
to John Smart, Serenity BDD Users Group

$ mvn clean verify -Dcucumber.options="--tags release:sprint-2"

[INFO] Scanning for projects...

[INFO]                                                                         

[INFO] ------------------------------------------------------------------------

[INFO] Building Sample Serenity Cucumber project 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO] 

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cucumber-webtests ---

[INFO] Deleting /Users/vince/Documents/workspace/cucumber-webtests/target

[INFO] 

[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce) @ cucumber-webtests ---

[INFO] 

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cucumber-webtests ---

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] skip non existing resourceDirectory /Users/vince/Documents/workspace/cucumber-webtests/src/main/resources

[INFO] 

[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ cucumber-webtests ---

[INFO] No sources to compile

[INFO] 

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ cucumber-webtests ---

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] Copying 4 resources

[INFO] 

[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ cucumber-webtests ---

[INFO] Changes detected - recompiling the module!

[INFO] Compiling 19 source files to /Users/vince/Documents/workspace/cucumber-webtests/target/test-classes

[INFO] 

[INFO] --- maven-surefire-plugin:2.18:test (default-test) @ cucumber-webtests ---

[INFO] Tests are skipped.

[INFO] 

[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ cucumber-webtests ---

[WARNING] JAR will be empty - no content was marked for inclusion!

[INFO] Building jar: /Users/vince/Documents/workspace/cucumber-webtests/target/cucumber-webtests-0.0.1-SNAPSHOT.jar

[INFO] 

[INFO] --- maven-failsafe-plugin:2.18:integration-test (default) @ cucumber-webtests ---

[INFO] Failsafe report directory: /Users/vince/Documents/workspace/cucumber-webtests/target/failsafe-reports


-------------------------------------------------------

 T E S T S

-------------------------------------------------------

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

158 [main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.browser,width=1200

158 [main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - webdriver.driver=chrome

158 [main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.project.name=Locomote POC Serenity BDD

158 [main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.browser,height=1200

158 [main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.dry.run=false

158 [main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - webdriver.timeouts.implicitlywait=5000

158 [main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.take.screenshots=AFTER_EACH_STEP

158 [main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.use.unique.browser=false

Running net.thucydides.showcase.cucumber.AddItemToShoppingCart

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.035 sec <<< FAILURE! - in net.thucydides.showcase.cucumber.AddItemToShoppingCart

initializationError(net.thucydides.showcase.cucumber.AddItemToShoppingCart)  Time elapsed: 0.012 sec  <<< ERROR!

java.lang.NumberFormatException: For input string: "sprint-2"

at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

at java.lang.Integer.parseInt(Integer.java:580)

at java.lang.Integer.parseInt(Integer.java:615)

at gherkin.TagExpression.add(TagExpression.java:47)

at gherkin.TagExpression.<init>(TagExpression.java:17)

at gherkin.formatter.TagFilter.<init>(TagFilter.java:14)

at gherkin.formatter.FilterFormatter.detectFilter(FilterFormatter.java:64)

at gherkin.formatter.FilterFormatter.<init>(FilterFormatter.java:41)

at cucumber.runtime.FeatureBuilder.parse(FeatureBuilder.java:126)

at cucumber.runtime.model.CucumberFeature.loadFromFeaturePath(CucumberFeature.java:104)

at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:54)

at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:34)

at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:235)

at cucumber.api.junit.Cucumber.<init>(Cucumber.java:60)

at net.serenitybdd.cucumber.CucumberWithSerenity.<init>(CucumberWithSerenity.java:26)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)

at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)

at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)

at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)

at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)

at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)

at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)


Running net.thucydides.showcase.cucumber.DisplayProductDetails

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE! - in net.thucydides.showcase.cucumber.DisplayProductDetails

initializationError(net.thucydides.showcase.cucumber.DisplayProductDetails)  Time elapsed: 0.001 sec  <<< ERROR!

java.lang.NumberFormatException: For input string: "sprint-2"

at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

at java.lang.Integer.parseInt(Integer.java:580)

at java.lang.Integer.parseInt(Integer.java:615)

at gherkin.TagExpression.add(TagExpression.java:47)

at gherkin.TagExpression.<init>(TagExpression.java:17)

at gherkin.formatter.TagFilter.<init>(TagFilter.java:14)

at gherkin.formatter.FilterFormatter.detectFilter(FilterFormatter.java:64)

at gherkin.formatter.FilterFormatter.<init>(FilterFormatter.java:41)

at cucumber.runtime.FeatureBuilder.parse(FeatureBuilder.java:126)

at cucumber.runtime.model.CucumberFeature.loadFromFeaturePath(CucumberFeature.java:104)

at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:54)

at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:34)

at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:235)

at cucumber.api.junit.Cucumber.<init>(Cucumber.java:60)

at net.serenitybdd.cucumber.CucumberWithSerenity.<init>(CucumberWithSerenity.java:26)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)

at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)

at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)

at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)

at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)

at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)

at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)


Running net.thucydides.showcase.cucumber.junit.shopping_cart.AddStuffToTheShoppingCartTest

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec <<< FAILURE! - in net.thucydides.showcase.cucumber.junit.shopping_cart.AddStuffToTheShoppingCartTest

initializationError(net.thucydides.showcase.cucumber.junit.shopping_cart.AddStuffToTheShoppingCartTest)  Time elapsed: 0 sec  <<< ERROR!

java.lang.Exception: No runnable methods

at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:191)

at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:128)

at org.junit.runners.ParentRunner.validate(ParentRunner.java:416)

at org.junit.runners.ParentRunner.<init>(ParentRunner.java:84)

at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65)

at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:153)

at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:109)

at net.serenitybdd.junit.runners.SerenityRunner.<init>(SerenityRunner.java:93)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)

at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)

at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)

at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)

at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)

at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)

at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)


Running net.thucydides.showcase.cucumber.Petstore

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.035 sec <<< FAILURE! - in net.thucydides.showcase.cucumber.Petstore

initializationError(net.thucydides.showcase.cucumber.Petstore)  Time elapsed: 0.003 sec  <<< ERROR!

java.lang.NumberFormatException: For input string: "sprint-2"

at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

at java.lang.Integer.parseInt(Integer.java:580)

at java.lang.Integer.parseInt(Integer.java:615)

at gherkin.TagExpression.add(TagExpression.java:47)

at gherkin.TagExpression.<init>(TagExpression.java:17)

at gherkin.formatter.TagFilter.<init>(TagFilter.java:14)

at gherkin.formatter.FilterFormatter.detectFilter(FilterFormatter.java:64)

at gherkin.formatter.FilterFormatter.<init>(FilterFormatter.java:41)

at cucumber.runtime.FeatureBuilder.parse(FeatureBuilder.java:126)

at cucumber.runtime.model.CucumberFeature.loadFromFeaturePath(CucumberFeature.java:104)

at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:54)

at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:34)

at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:235)

at cucumber.api.junit.Cucumber.<init>(Cucumber.java:60)

at net.serenitybdd.cucumber.CucumberWithSerenity.<init>(CucumberWithSerenity.java:26)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)

at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)

at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)

at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)

at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)

at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)

at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)


Running net.thucydides.showcase.cucumber.SearchByKeyword

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.018 sec <<< FAILURE! - in net.thucydides.showcase.cucumber.SearchByKeyword

initializationError(net.thucydides.showcase.cucumber.SearchByKeyword)  Time elapsed: 0 sec  <<< ERROR!

java.lang.NumberFormatException: For input string: "sprint-2"

at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

at java.lang.Integer.parseInt(Integer.java:580)

at java.lang.Integer.parseInt(Integer.java:615)

at gherkin.TagExpression.add(TagExpression.java:47)

at gherkin.TagExpression.<init>(TagExpression.java:17)

at gherkin.formatter.TagFilter.<init>(TagFilter.java:14)

at gherkin.formatter.FilterFormatter.detectFilter(FilterFormatter.java:64)

at gherkin.formatter.FilterFormatter.<init>(FilterFormatter.java:41)

at cucumber.runtime.FeatureBuilder.parse(FeatureBuilder.java:126)

at cucumber.runtime.model.CucumberFeature.loadFromFeaturePath(CucumberFeature.java:104)

at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:54)

at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:34)

at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:235)

at cucumber.api.junit.Cucumber.<init>(Cucumber.java:60)

at net.serenitybdd.cucumber.CucumberWithSerenity.<init>(CucumberWithSerenity.java:26)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)

at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)

at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)

at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)

at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)

at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)

at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)

at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)



Results :



Tests in error: 

  AddItemToShoppingCart.initializationError » NumberFormat For input string: "sp...

  DisplayProductDetails.initializationError » NumberFormat For input string: "sp...

  Petstore.initializationError » NumberFormat For input string: "sprint-2"

  SearchByKeyword.initializationError » NumberFormat For input string: "sprint-2...

  AddStuffToTheShoppingCartTest.initializationError »  No runnable methods



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


[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!

[INFO] 

[INFO] --- serenity-maven-plugin:1.1.42:aggregate (serenity-reports) @ cucumber-webtests ---

[INFO] serenity.browser,width=1200

[INFO] webdriver.driver=chrome

[INFO] serenity.project.name=Locomote POC Serenity BDD

[INFO] serenity.browser,height=1200

[INFO] serenity.dry.run=false

[INFO] webdriver.timeouts.implicitlywait=5000

[INFO] serenity.take.screenshots=AFTER_EACH_STEP

[INFO] serenity.use.unique.browser=false

[INFO] current_project.base.dir: /Users/vince/Documents/workspace/cucumber-webtests

Generating HTML Story Reports from /Users/vince/Documents/workspace/cucumber-webtests/target/site/serenity

Generating HTML Story Reports to /Users/vince/Documents/workspace/cucumber-webtests/target/site/serenity

[WARNING] To generate correct requirements coverage reports you need to set the 'serenity.test.root' property to the package representing the top of your requirements hierarchy.

GENERATE CUSTOM REPORTS

[INFO] 

[INFO] --- maven-failsafe-plugin:2.18:verify (default) @ cucumber-webtests ---

[INFO] Failsafe report directory: /Users/vince/Documents/workspace/cucumber-webtests/target/failsafe-reports

[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 13.432 s

[INFO] Finished at: 2016-10-06T22:41:48+11:00

[INFO] Final Memory: 40M/381M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.18:verify (default) on project cucumber-webtests: There are test failures.

[ERROR] 

[ERROR] Please refer to /Users/vince/Documents/workspace/cucumber-webtests/target/failsafe-reports for the individual test results.

[ERROR] -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


On Thu, 6 Oct 2016 at 23:07 John Smart <john....@wakaleo.com> wrote:
Do you have the full stack trace?
(In answer to your second point, I generally find Cucumber more flexible than JBehave)
On 6 October 2016 at 12:54, Vincent Brouillet <vincent....@gmail.com> wrote:
I'm using Cucumber and developing a scenario. How do I run only this specific scenario?

The doc says to use tags: 

mvn clean verify -Dcucumber.options="--tags version:Sprint-1.2"

It throws an error. I'm using the example in the GIT repo, cucumber-webtests:

Running net.thucydides.showcase.cucumber.AddItemToShoppingCart

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.035 sec <<< FAILURE! - in net.thucydides.showcase.cucumber.AddItemToShoppingCart

initializationError(net.thucydides.showcase.cucumber.AddItemToShoppingCart)  Time elapsed: 0.012 sec  <<< ERROR!

java.lang.NumberFormatException: For input string: "sprint-2"

at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)


I've tried with different tags. No luck. There has to be a simple way to choose which scenario to run when developing? Although I very much like the flexibility of tags if i works.


My versions:

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<serenity.version>1.1.42</serenity.version> <!-- https://bintray.com/serenity/maven/serenity-core/ -->
<serenity.maven.version>1.1.42</serenity.maven.version>
<serenity.cucumber.version>1.1.11</serenity.cucumber.version> <!-- https://bintray.com/serenity/maven/serenity-cucumber/ -->
</properties>


(Side note: should I use Jbehave instead? My teams are Node.Js and Ruby anyway. I thought Cucumber was probably a good shot. But I've used thucydides with Jebhave in the past with great success. As long as we can use gherkin syntax, we have to lear Java, so not much preference.)

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages