Jeff Nyman | 22 Sep 14:39 2014
Picon

[Cucumber] [Ruby] Cucumber 2.0 - Design Understanding

I know -- or think I know -- that part of the goal of Cucumber 2.0 is to make the internals a little easier to comprehend. I'm finding that I'm not comprehending, though. I haven't found much discussion of this so I'm curious about a few things. Specifically this relates to Cucumber-Core, which seems to be the "inner hexagon", I guess.

There's a Writer module.
* What is it actually writing?
* Does this mean writing to output?

There's a Document class.
* What does a "document" correspond to?
* Is that a feature file?

There's a Compiler class.
* But what actually needs to be compiled?
* Compiled into what?

There's lots of classes now, like Action, Case, various Filters and Mappers, and so on and I find I'm struggling to understand how everything hangs together. While I guess I see the "flaws" that some have pointed out regarding how closely the AST and the output reporting were coupled in Cucumber 1.x, I'm having a hard time -- in my admitted ignorance -- in seeing how the new design is "better" or what it actually provides that the previous incarnation of Cucumber did not.

Maybe all this should be obvious to me and I don't mind doing code archaeology but it might help someone other than me if there is discussion around how Cucumber is being redesigned.

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
陶杨 | 22 Sep 09:20 2014
Picon

[Cucumber] Re: How to run Examples using Cucumber with Testng


Here is the offical example with testng
https://github.com/cucumber/cucumber-jvm/tree/master/examples/java-calculator-testng

On Thursday, September 4, 2014 5:12:15 PM UTC+8, ultima... <at> gmail.com wrote:
Hi All,

Can someone explain how can we run Examples using Cucumber with Testng as my test stops after executing the first inputs out of the four given examples.

Thanks
Gaurav

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Mark Sayewich | 22 Sep 01:53 2014
Picon

[Cucumber] [GOSU][Windows][1.1.8] Help with Cucumber-JVM and GOSU

Hi

I am getting strange error that I have not been able to solve ( I am using the 1.1.8 build)

 

'AddingStepdefs.gsp:13' with pattern [^the calculator is run$] is declared with 1 parameters. However, the gherkin step has 0 arguments [].

 

Here is what I have done

== == == == == == == == == == == == == == == == == == == == == == == ==  

 

I have set up Cucumber-JVM to run with GOSU

 

I have created a simple feature and run the CLI command, and then past the suggested GOSU code into a new file AddingStepsdefs.gsp.

 

I run the command again and I get the following error

 

== == == == == == == == == == == == == == == == == == == == == == == ==  

   [java] java.io.IOException: gw.lang.parser.exceptions.ParseResultsException: AddingStepdefs.gsp

     [java] Errors:

     [java] The type "block():void" cannot be converted to "block(java.lang.String):void" [line:-300 col:43] in

     [java] line 1: 

     [java] Expected Type: block(java.lang.String):void

     [java] Line Number: 13  Column: 43

     [java]   at gw.internal.gosu.compiler.GosuClassLoader.getBytes(GosuClassLoader.java:63)

     [java]   at gw.internal.gosu.compiler.protocols.gosuclass.GosuClassesUrlConnection$LazyByteArrayInputStream.init(GosuClassesUrlConnection.java:151)

     [java]   at gw.internal.gosu.compiler.protocols.gosuclass.GosuClassesUrlConnection$LazyByteArrayInputStream.read(GosuClassesUrlConnection.java:178)

     [java]   at sun.misc.Resource.getBytes(Resource.java:124)

     [java]   at java.net.URLClassLoader.defineClass(URLClassLoader.java:450)

     [java]   at java.net.URLClassLoader.access$100(URLClassLoader.java:73)

     [java]   at java.net.URLClassLoader$1.run(URLClassLoader.java:367)

     [java]   at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

     [java]   at java.security.AccessController.doPrivileged(Native Method)

     [java]   at java.net.URLClassLoader.findClass(URLClassLoader.java:360)

     [java]   at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

     [java]   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

     [java]   at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

     [java]   at gw.internal.gosu.compiler.GosuClassLoader.findOrDefineClass(GosuClassLoader.java:184)

     [java]   at gw.internal.gosu.compiler.GosuClassLoader.defineClass(GosuClassLoader.java:163)

     [java]   at gw.internal.gosu.parser.GosuClass.getBackingClass(GosuClass.java:2045)

     [java]   at gw.internal.gosu.parser.GosuProgram_Proxy.getBackingClass(gw.internal.gosu.parser.GosuProgram_Proxy:2)

     [java]   at gw.lang.parser.coercers.MetaTypeToClassCoercer.coerceValue(MetaTypeToClassCoercer.java:21)

     [java]   at gw.internal.gosu.ir.transform.expression.TypeAsTransformer.coerceValue(TypeAsTransformer.java:300)

     [java]   at program.TestProgram.evaluate(TestProgram.gsp:1)

     [java]   at gw.lang.Gosu$ExecuteMode.runWithFile(Gosu.java:768)

     [java]   at gw.lang.Gosu$ExecuteMode.run(Gosu.java:723)

     [java]   at gw.lang.Gosu.start(Gosu.java:123)

     [java]   at cucumber.runtime.gosu.GosuBackend.loadGlue(GosuBackend.java:41)

     [java]   at cucumber.runtime.Runtime.<init>(Runtime.java:89)

     [java]   at cucumber.runtime.Runtime.<init>(Runtime.java:67)

     [java]   at cucumber.runtime.Runtime.<init>(Runtime.java:63)

     [java]   at cucumber.api.cli.Main.run(Main.java:35)

     [java]   at cucumber.api.cli.Main.main(Main.java:18)

     [java]   at cucumber.evaluate(cucumber.gsp:36)

     [java]   at gw.lang.Gosu$ExecuteMode.runWithFile(Gosu.java:768)

     [java]   at gw.lang.Gosu$ExecuteMode.run(Gosu.java:723)

     [java]   at gw.lang.Gosu.start(Gosu.java:123)

     [java]   at gw.lang.launch.impl.GosuLauncher.run(GosuLauncher.java:143)

     [java]   at gw.lang.launch.impl.GosuLauncher.main(GosuLauncher.java:63)

     [java] Caused by: gw.lang.parser.exceptions.ParseResultsException: AddingStepdefs.gsp

     [java] Errors:

     [java]   ... 15 more

     [java] _[33mU_[0m_[33mU_[0m_[33mU_[0m

     [java] 1 Scenarios (_[33m1 undefined_[0m)

     [java] 3 Steps (_[33m3 undefined_[0m)

     [java] 0m0.000s

     [java] You can implement missing steps with the snippets below:

     [java] Dsl.Given('^the input "(.*?)"$', \ arg1 : String  -> {

     [java]     // Write code here that turns the phrase above into concrete actions

     [java]     throw new PendingException()

     [java] })

     [java] Dsl.When('^the calculator is run$', \ -> {

     [java]     // Write code here that turns the phrase above into concrete actions

     [java]     throw new PendingException()

     [java] })

     [java] Dsl.Then('^the output should be "(.*?)"$', \ arg1 : String  -> {

     [java]     // Write code here that turns the phrase above into concrete actions

     [java]     throw new PendingException()

     [java] })

== == == == == == == == == == == == == == == == == == == == == == == ==  

 

Looking at the error and the file I see that the issue is the line

[java] Dsl.When('^the calculator is run$', \ -> {

 

According to the eror we need to  pass a string to the function

Dsl.When('^the calculator is run$', \ arg1 : String  -> {

 

When I make this change and run it again I get a new error

 

== == == == == == == == == == == == == == == == == == == == == == == ==  

    [java] gosu-launch: Using CLASSPATH environment variable: ".;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip"

     [java] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

     [java] SLF4J: Defaulting to no-operation (NOP) logger implementation

     [java] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

     [java] start ========================>

     [java] fff

     [java] _[32m._[0m_[31mF_[0m_[36m-_[0m

     [java] 1 Scenarios (_[31m1 failed_[0m)

     [java] 3 Steps (_[31m1 failed_[0m, _[36m1 skipped_[0m, _[32m1 passed_[0m)

     [java] 0m0.982s

     [java] cucumber.runtime.CucumberException: Arity mismatch: Step Definition 'AddingStepdefs.gsp:13' with pattern [^the calculator is run$] is declared with 1 parameters. However, the gherkin step has 0 arguments [].

     [java] Step: When the calculator is run

     [java]   at cucumber.runtime.StepDefinitionMatch.arityMismatch(StepDefinitionMatch.java:100)

     [java]   at cucumber.runtime.StepDefinitionMatch.transformedArgs(StepDefinitionMatch.java:60)

     [java]   at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)

     [java]   at cucumber.runtime.Runtime.runStep(Runtime.java:298)

     [java]   at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)

     [java]   at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)

     [java]   at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:48)

     [java]   at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:154)

     [java]   at cucumber.runtime.Runtime.run(Runtime.java:120)

     [java]   at cucumber.runtime.Runtime.run(Runtime.java:108)

     [java]   at cucumber.api.cli.Main.run(Main.java:36)

     [java]   at cucumber.api.cli.Main.main(Main.java:18)

     [java]   at cucumber.evaluate(cucumber.gsp:36)

     [java]   at gw.lang.Gosu$ExecuteMode.runWithFile(Gosu.java:768)

     [java]   at gw.lang.Gosu$ExecuteMode.run(Gosu.java:723)

     [java]   at gw.lang.Gosu.start(Gosu.java:123)

     [java]   at gw.lang.launch.impl.GosuLauncher.run(GosuLauncher.java:143)

     [java]   at gw.lang.launch.impl.GosuLauncher.main(GosuLauncher.java:63)

 

BUILD FAILED

 

== == == == == == == == == == == == == == == == == == == == == == == ==  

 

It looks like the GOSU definition clashes with the runtime environment.

 


Please Help 


<Mark Sayewich />

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Attachment (AddingStepdefs.gsp): application/octet-stream, 737 bytes
Attachment (adding.feature): application/octet-stream, 128 bytes
Mark Sayewich | 22 Sep 00:33 2014
Picon

[Cucumber] GOSU: The type "block():void" cannot be converted to "block(java.lang.String):void" [line:-300 col:4


Hi all I need some help.

I have been playing with the port of Cucumber-JVM to GOSU, but I am having a problem

set-up all of may paths and run the cucumber command from the CLI and I get the following error.


 [java] java.io.IOException: gw.lang.parser.exceptions.ParseResultsException: AddingStepdefs.gsp
     [java] Errors: 
     [java] The type "block():void" cannot be converted to "block(java.lang.String):void" [line:-300 col:43] in
     [java] line 1:  
     [java] Expected Type: block(java.lang.String):void
     [java] Line Number: 13  Column: 43
     [java] at gw.internal.gosu.compiler.GosuClassLoader.getBytes(GosuClassLoader.java:63)
     [java] at gw.internal.gosu.compiler.protocols.gosuclass.GosuClassesUrlConnection$LazyByteArrayInputStream.init(GosuClassesUrlConnection.java:151)
     [java] at gw.internal.gosu.compiler.protocols.gosuclass.GosuClassesUrlConnection$LazyByteArrayInputStream.read(GosuClassesUrlConnection.java:178)
     [java] at sun.misc.Resource.getBytes(Resource.java:124)
.
.
.
and the "suggested" code is then printed out

     [java] [33mU [0m [33mU [0m [33mU [0m
     [java] 1 Scenarios ( [33m1 undefined [0m)
     [java] 3 Steps ( [33m3 undefined [0m)
     [java] 0m0.000s
     [java] You can implement missing steps with the snippets below:
     [java] Dsl.Given('^the input "(.*?)"$', \ arg1 : String  -> {
     [java]     // Write code here that turns the phrase above into concrete actions
     [java]     throw new PendingException()
     [java] })
     [java] Dsl.When('^the calculator is run$', \ -> {
     [java]     // Write code here that turns the phrase above into concrete actions
     [java]     throw new PendingException()
     [java] })
     [java] Dsl.Then('^the output should be "(.*?)"$', \ arg1 : String  -> {
     [java]     // Write code here that turns the phrase above into concrete actions
     [java]     throw new PendingException()
     [java] })


................ when looking at the AddingStepdefs.gsp file at line Number 13, column 43 as printed above it is the Highlighted method above
(     [java] Dsl.When('^the calculator is run$', \ -> {  )
by modifying this to a block with a string 

(     [java] Dsl.When('^the calculator is run$', \ arg1 : String  -> {  )

that error goes away, but a new one occurs


  [java] [32m. [0m [31mF [0m [36m- [0m
     [java] 1 Scenarios ( [31m1 failed [0m)
     [java] 3 Steps ( [31m1 failed [0m, [36m1 skipped [0m, [32m1 passed [0m)
     [java] 0m0.696s
     [java] cucumber.runtime.CucumberException: Arity mismatch: Step Definition 'AddingStepdefs.gsp:13' with pattern [^the calculator is run$] is declared with 1 parameters. However, the gherkin step has 0 arguments []. 
     [java] Step: When the calculator is run
     [java] at cucumber.runtime.StepDefinitionMatch.arityMismatch(StepDefinitionMatch.java:100)
     [java] at cucumber.runtime.StepDefinitionMatch.transformedArgs(StepDefinitionMatch.java:60)
     [java] at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
     [java] at cucumber.runtime.Runtime.runStep(Runtime.java:298)
     [java] at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
     [java] at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
     [java] at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:48)
     [java] at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:154)
     [java] at cucumber.runtime.Runtime.run(Runtime.java:120)
     [java] at cucumber.runtime.Runtime.run(Runtime.java:108)
     [java] at cucumber.api.cli.Main.run(Main.java:36)
     [java] at cucumber.api.cli.Main.main(Main.java:18)
     [java] at cucumber.evaluate(cucumber.gsp:36)
     [java] at gw.lang.Gosu$ExecuteMode.runWithFile(Gosu.java:768)
     [java] at gw.lang.Gosu$ExecuteMode.run(Gosu.java:723)
     [java] at gw.lang.Gosu.start(Gosu.java:123)
     [java] at gw.lang.launch.impl.GosuLauncher.run(GosuLauncher.java:143)
     [java] at gw.lang.launch.impl.GosuLauncher.main(GosuLauncher.java:63)

I think that the file cucumber.api.gosu.en.Dsl in your cucumber-go-1.1.8-sources.jar file is wrong 

I think that the Dsl class is forcing the required string argument in, but the framework does not want it

Please help.

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Mark Sayewich | 22 Sep 00:54 2014
Picon

[Cucumber] [GOSU] Help with Cucumber-JVM and GOSU

Hi Aslak,

 

I am getting strange error that I have not been able to solve ( I am using the 1.1.8 build)

 

'AddingStepdefs.gsp:13' with pattern [^the calculator is run$] is declared with 1 parameters. However, the gherkin step has 0 arguments [].

 

Here is what I have done

== == == == == == == == == == == == == == == == == == == == == == == ==  

 

I have set up Cucumber-JVM to run with GOSU

 

I have created a simple feature and run the CLI command, and then past the suggested GOSU code into a new file AddingStepsdefs.gsp.

 

I run the command again and I get the following error

 

== == == == == == == == == == == == == == == == == == == == == == == ==  

   [java] java.io.IOException: gw.lang.parser.exceptions.ParseResultsException: AddingStepdefs.gsp

     [java] Errors:

     [java] The type "block():void" cannot be converted to "block(java.lang.String):void" [line:-300 col:43] in

     [java] line 1: 

     [java] Expected Type: block(java.lang.String):void

     [java] Line Number: 13  Column: 43

     [java]   at gw.internal.gosu.compiler.GosuClassLoader.getBytes(GosuClassLoader.java:63)

     [java]   at gw.internal.gosu.compiler.protocols.gosuclass.GosuClassesUrlConnection$LazyByteArrayInputStream.init(GosuClassesUrlConnection.java:151)

     [java]   at gw.internal.gosu.compiler.protocols.gosuclass.GosuClassesUrlConnection$LazyByteArrayInputStream.read(GosuClassesUrlConnection.java:178)

     [java]   at sun.misc.Resource.getBytes(Resource.java:124)

     [java]   at java.net.URLClassLoader.defineClass(URLClassLoader.java:450)

     [java]   at java.net.URLClassLoader.access$100(URLClassLoader.java:73)

     [java]   at java.net.URLClassLoader$1.run(URLClassLoader.java:367)

     [java]   at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

     [java]   at java.security.AccessController.doPrivileged(Native Method)

     [java]   at java.net.URLClassLoader.findClass(URLClassLoader.java:360)

     [java]   at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

     [java]   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

     [java]   at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

     [java]   at gw.internal.gosu.compiler.GosuClassLoader.findOrDefineClass(GosuClassLoader.java:184)

     [java]   at gw.internal.gosu.compiler.GosuClassLoader.defineClass(GosuClassLoader.java:163)

     [java]   at gw.internal.gosu.parser.GosuClass.getBackingClass(GosuClass.java:2045)

     [java]   at gw.internal.gosu.parser.GosuProgram_Proxy.getBackingClass(gw.internal.gosu.parser.GosuProgram_Proxy:2)

     [java]   at gw.lang.parser.coercers.MetaTypeToClassCoercer.coerceValue(MetaTypeToClassCoercer.java:21)

     [java]   at gw.internal.gosu.ir.transform.expression.TypeAsTransformer.coerceValue(TypeAsTransformer.java:300)

     [java]   at program.TestProgram.evaluate(TestProgram.gsp:1)

     [java]   at gw.lang.Gosu$ExecuteMode.runWithFile(Gosu.java:768)

     [java]   at gw.lang.Gosu$ExecuteMode.run(Gosu.java:723)

     [java]   at gw.lang.Gosu.start(Gosu.java:123)

     [java]   at cucumber.runtime.gosu.GosuBackend.loadGlue(GosuBackend.java:41)

     [java]   at cucumber.runtime.Runtime.<init>(Runtime.java:89)

     [java]   at cucumber.runtime.Runtime.<init>(Runtime.java:67)

     [java]   at cucumber.runtime.Runtime.<init>(Runtime.java:63)

     [java]   at cucumber.api.cli.Main.run(Main.java:35)

     [java]   at cucumber.api.cli.Main.main(Main.java:18)

     [java]   at cucumber.evaluate(cucumber.gsp:36)

     [java]   at gw.lang.Gosu$ExecuteMode.runWithFile(Gosu.java:768)

     [java]   at gw.lang.Gosu$ExecuteMode.run(Gosu.java:723)

     [java]   at gw.lang.Gosu.start(Gosu.java:123)

     [java]   at gw.lang.launch.impl.GosuLauncher.run(GosuLauncher.java:143)

     [java]   at gw.lang.launch.impl.GosuLauncher.main(GosuLauncher.java:63)

     [java] Caused by: gw.lang.parser.exceptions.ParseResultsException: AddingStepdefs.gsp

     [java] Errors:

     [java]   ... 15 more

     [java] _[33mU_[0m_[33mU_[0m_[33mU_[0m

     [java] 1 Scenarios (_[33m1 undefined_[0m)

     [java] 3 Steps (_[33m3 undefined_[0m)

     [java] 0m0.000s

     [java] You can implement missing steps with the snippets below:

     [java] Dsl.Given('^the input "(.*?)"$', \ arg1 : String  -> {

     [java]     // Write code here that turns the phrase above into concrete actions

     [java]     throw new PendingException()

     [java] })

     [java] Dsl.When('^the calculator is run$', \ -> {

     [java]     // Write code here that turns the phrase above into concrete actions

     [java]     throw new PendingException()

     [java] })

     [java] Dsl.Then('^the output should be "(.*?)"$', \ arg1 : String  -> {

     [java]     // Write code here that turns the phrase above into concrete actions

     [java]     throw new PendingException()

     [java] })

== == == == == == == == == == == == == == == == == == == == == == == ==  

 

Looking at the error and the file I see that the issue is the line

[java] Dsl.When('^the calculator is run$', \ -> {

 

According to the eror we need to  pass a string to the function

Dsl.When('^the calculator is run$', \ arg1 : String  -> {

 

When I make this change and run it again I get a new error

 

== == == == == == == == == == == == == == == == == == == == == == == ==  

    [java] gosu-launch: Using CLASSPATH environment variable: ".;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip"

     [java] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

     [java] SLF4J: Defaulting to no-operation (NOP) logger implementation

     [java] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

     [java] start ========================>

     [java] fff

     [java] _[32m._[0m_[31mF_[0m_[36m-_[0m

     [java] 1 Scenarios (_[31m1 failed_[0m)

     [java] 3 Steps (_[31m1 failed_[0m, _[36m1 skipped_[0m, _[32m1 passed_[0m)

     [java] 0m0.982s

     [java] cucumber.runtime.CucumberException: Arity mismatch: Step Definition 'AddingStepdefs.gsp:13' with pattern [^the calculator is run$] is declared with 1 parameters. However, the gherkin step has 0 arguments [].

     [java] Step: When the calculator is run

     [java]   at cucumber.runtime.StepDefinitionMatch.arityMismatch(StepDefinitionMatch.java:100)

     [java]   at cucumber.runtime.StepDefinitionMatch.transformedArgs(StepDefinitionMatch.java:60)

     [java]   at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)

     [java]   at cucumber.runtime.Runtime.runStep(Runtime.java:298)

     [java]   at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)

     [java]   at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)

     [java]   at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:48)

     [java]   at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:154)

     [java]   at cucumber.runtime.Runtime.run(Runtime.java:120)

     [java]   at cucumber.runtime.Runtime.run(Runtime.java:108)

     [java]   at cucumber.api.cli.Main.run(Main.java:36)

     [java]   at cucumber.api.cli.Main.main(Main.java:18)

     [java]   at cucumber.evaluate(cucumber.gsp:36)

     [java]   at gw.lang.Gosu$ExecuteMode.runWithFile(Gosu.java:768)

     [java]   at gw.lang.Gosu$ExecuteMode.run(Gosu.java:723)

     [java]   at gw.lang.Gosu.start(Gosu.java:123)

     [java]   at gw.lang.launch.impl.GosuLauncher.run(GosuLauncher.java:143)

     [java]   at gw.lang.launch.impl.GosuLauncher.main(GosuLauncher.java:63)

 

BUILD FAILED

 

== == == == == == == == == == == == == == == == == == == == == == == ==  

 

It looks like the GOSU definition clashes with the runtime environment.

 

Below is my feature file

 

== == == == == == == == == == == == == == == == == == == == == == == ==  

Feature: Adding

 

       Scenario: Add two numbers

              Given the input "2+2"

              When the calculator is run

              Then the output should be "4"

 

Please help

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Zain Jamshaid | 20 Sep 18:28 2014
Picon

[Cucumber] java.lang.NoSuchMethodError: org.junit.runner.Description.createSuiteDescription(Ljava/lang/String..

I am getting the following Error:

java.lang.NoSuchMethodError: org.junit.runner.Description.createSuiteDescription(Ljava/lang/String;Ljava/io/Serializable;[Ljava/lang/annotation/Annotation;)Lorg/junit/runner/Description;
    at cucumber.runtime.junit.FeatureRunner.getDescription(FeatureRunner.java:43)
    at cucumber.api.junit.Cucumber.describeChild(Cucumber.java:84)
    at cucumber.api.junit.Cucumber.describeChild(Cucumber.java:40)
    at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:290)
    at org.junit.runner.Runner.testCount(Runner.java:38)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.countTestCases(JUnit4TestClassReference.java:30)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.countTests(RemoteTestRunner.java:487)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:455)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Here is my POM.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
<modelVersion>4.0.0</modelVersion>

 
<groupId>com.trial</groupId>
 
<artifactId>GreenApple</artifactId>
 
<version>0.0.1-SNAPSHOT</version>
 
<packaging>jar</packaging>

 
<name>GreenApple</name>
 
<url>http://maven.apache.org</url>

 
<properties>
   
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
</properties>

 
<dependencies>
<dependency>
           
<groupId>junit</groupId>
           
<artifactId>junit</artifactId>
           
<version>4.11</version>
           
<scope>test</scope>
       
</dependency>
       
<dependency>
           
<groupId>info.cukes</groupId>
           
<artifactId>cucumber-junit</artifactId>
           
<version>1.1.8</version>
       
</dependency>
       
<dependency>
           
<groupId>org.seleniumhq.selenium</groupId>
           
<artifactId>selenium-chrome-driver</artifactId>
           
<version>2.42.2</version>
       
</dependency>
       
<dependency>
           
<groupId>info.cukes</groupId>
           
<artifactId>cucumber-java</artifactId>
           
<version>1.1.8</version>
       
</dependency>  
       
<dependency>
   
<groupId>org.seleniumhq.selenium</groupId>
   
<artifactId>selenium-java</artifactId>
   
<version>2.42.2</version>
</dependency>
           
 
 
</dependencies>
 
 
</project>



--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
CUCUMBER123 | 19 Sep 17:29 2014
Picon

[Cucumber] missing step definitions please implement the steps how to debug this error

Hi,
       i have created one sample project with play framwork(sbt,scala DSL,JUNIT Runner,feature file ) it is working fine with annotation step definitions and scala step definitions.  but i am working for a company on play framework project which is using scala,sbt i created another project structure with same structure of my sample project  but its working fine with annotation step definitions only and it saying please implement the missing steps if i run with scala step definitions even with same structure and  dependencies of my sample project.so may i know how to debug this one 
           Thanks in advance

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Bob Marius | 17 Sep 15:06 2014
Picon

[Cucumber] You're not allowed to extend classes that define Step Definitions or hooks

Hi there,

I have a tutorial project which is using Appium for automating some tests for and Android application.
The project is located at this link: https://github.com/appium/tutorial/tree/master/projects/java_android
As you can notice in the AppiumTest.java class( https://github.com/appium/tutorial/blob/master/projects/java_android/src/test/java/appium/tutorial/android/util/AppiumTest.java), there are hooks defined there and that class is extended wherever we want to use them.

When including cucumber-jvm in the project, I had run into cucumber.runtime.CucumberException: You're not allowed to extend classes that define Step Definitions or hooks. issue.

My question is if someone had this situation already where you want to share some setup with the other test classes without  implementing the <at> Before / <at> After annotations in every test class. Or what workaround will be more appropriate in order to address this exception?

Thank you!

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
IMDAD KP | 17 Sep 08:03 2014
Picon

[Cucumber] Cucumber Reports Plugin in Bamboo

Hi.,

I would like to know exactly where the reports will be, If anyone can please send me with screen shot or step by step.


Thanks,
Imdad KP

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Jeremy Goodwin | 17 Sep 00:51 2014
Picon

Re: [Cucumber] Re: [Cucumber:11178] [JVM] Aliases?



On Tuesday, 16 September 2014 17:06:56 UTC+1, Halfordian Golfer wrote:


On Tue, Sep 16, 2014 at 9:18 AM, Jeremy Goodwin <jeremyl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:


On Tuesday, 16 September 2014 16:06:16 UTC+1, Halfordian Golfer wrote:


On Tue, Sep 16, 2014 at 8:34 AM, aslak hellesoy <aslak.h...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:


On Tue, Sep 16, 2014 at 2:42 PM, Jeremy Goodwin <jeremyl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I know it's quite an old post, but this is something that's been bugging me as it means more boilerplate code from a binding perspective.

There is (I believe) a valid usage of an Alias functionality - as BDD steps are meant to be easily understandable within the chosen language the feature file is written in, certainly in English the following two examples are conceptually the same from the bound code perspective:

Given I am a manager
And I have 2 people assigned to me
When I look at my manager responsibilities page
Then I should see 2 employees linked to me

And

Given I am amanager
And I have 1 person assigned to me
When I look at my manager responsibilities page
Then I should see 1 employee linked to me

As I'm writing my steps in the English paradigm, I would expect to use well formed English, rather than 'fit' "And I have 2 person assigned to me" or "Then I should see 1 employees linked to me" - which is where I would find the Alias functionality useful.


I suppose for Java we could allow more than one annotation on a stepdef method.

Anyone up for a pull request?

[Tim] Isn't the requestor just looking for the last step definition to include "employees?" as an optional match of the "s" to enhance readability? Thanks, Tim. 

You could write regex to do that, but you're going to rely on good knowledge of regex and lead to some rather messy matching statements.
 
[Tim] It's also fair to say that we're breaking our domain language and using "people/persons" interchangeably with "employee/employees" which is probably the greater of the sins.  
My apologies for not better constructing a simple scenario to demonstrate the challenge. Whilst this may be your domain language, remember one of your key purposes is to enable non development people to buy in to the behavioural rules AND and the same time you want the people writing the backing code to use good development practises - of which boilerplate code and writing things multiple times violates dry and simple. The test product should be at least as good quality as the application under test, so wherever possible better code practises should be adopted - an 'alias' or other suitable solution - such as

<at> Givens(
   givens
= {
       
<at> Given="^I have (\d) people assigned to me$",
       
<at> Given="^I have (\d) person assigned to me$"
   
}
)

which removes the (I'm afraid nonsensical bad programming)
<at> Given("^I have (\d) people assigned to me$")
public void I_have_people_assigned_to_me() throws Throwable {
   
...
}

<at> Given("^I have (\d) person assigned to me$")
public void I_have_person_assigned_to_me() throws Throwable {
   I
_have_people_assigned_to_me();
}




 
Aslak
 
The alternative is as we're currently doing, where we're writing both step definitions and calling the first from the second. From a good software development perspective though, that's pointless bolierplate.


On Saturday, 28 April 2012 12:51:05 UTC+1, Aslak Hellesøy wrote:


Hi,

There are any way to define alias to stepdefs? Maybe something like that: https://gist.github.com/2509895


What's wrong with this:

<at> Given("foo")
public void foo() {
}

<at> Given("bar")
public void bar() { foo(); }

Besides, why would you want to muddle your domain language by allowing 2 ways to say the same thing?

Aslak

Also, the step defined in line 13 isn't exactly a alias, but a way to use regex to let the step a little more flexible, but that ignored parameter is really annoying. There are any way to do something like that without the need to define other stepdef with just some little modification?

Thanks.

Danilo

-- There are two rules:
 
1) Please prefix the subject with [Ruby], [JVM] or [JS]. This allows people to filter messages.
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. To unsubscribe from this group, send email to cukes+un... <at> googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en

--
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+un... <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+un... <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+un... <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Andrew Premdas | 16 Sep 17:59 2014
Picon

[Cucumber] Re: [Ruby] <at> javascript hook



On 4 September 2014 10:53, Andrew Premdas <apremdas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I have some hooks I'm trying to get to work on a Rails app. Say I have the following Scenario

Scenario: I login

If I run the scenario as

<at> javascript <at> webkit
Scenario: I login

I get the behaviour I want. That is a <at> javascript run with webkit as the driver

However if I run the scenario as

<at> webkit
Scenario: I login

It won't login. It seems the <at> javascript tag is doing something I can't replicate

My code for my driver hooks is

JSDrivers = %w(poltergeist webkit selenium chrome)

JSDrivers.each do |driver|
  Before " <at> #{driver}" do
    Capybara.current_driver = driver.to_sym

    # Various combinations of things tried here e.g.
    Cucumber::Rails::Database.before_js if Cucumber::Rails::Database.autorun_database_cleaner
  end
end

What I'd like to do is write this block in such a way that

<at> webkit
Scenario: I login

is identical to

<at> javascript <at> webkit
Scenario: I login

Any help much appreciated

All best

Andrew


Bump
--
------------------------
Andrew Premdas



--
------------------------
Andrew Premdas

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Gmane