Here is an example:
https://github.com/cucumber/cucumber-jvm/commit/01932dcfdf5decd1374f7a08dcec40a98fc493cb
It looks like you're doing everything right.
Aslak
> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
>
Are you saying that `println("HELLO")` at the top of your step
definition prints nothing??
Aslak
> On 11 Abr, 10:10, rsilva4 <rubensilv...@gmail.com> wrote:
>> I can't find anything about this in the Groovy examples. Here what I
>> have tried:
>>
>> Given(~'^the following external datasources:$') { eds ->
>>
>> def listEds = eds.asList(ExternalDataSource)
>> listEds.each {
>> print it
>> ExternalDataSource.create(it);
>> }
>> assert ExternalDataSource.all().size() == listEds.size()
>>
>> }
>>
>> That outputs:
>>
>> | Running 1 cucumber test...
>> org.codehaus.groovy.runtime.InvokerInvocationException:
>> groovy.lang.MissingMethodException: No signature of method:
>> net.inductiva.collector.ExternalDataSource.create() is applicable for
>> argument types: (net.inductiva.collector.ExternalDataSource) values:
>> [net.inductiva.collector.ExternalDataSource : null]
>> Possible solutions: create(), merge(), read(java.io.Serializable),
>> count(), delete(), ident()
>>
>> 'print it' prints nothing, and trying to debug (using eclipse STS)
>> does not stop at the breakpoints.
>
How do you know the step definition gets executed?
Is the output inside Eclipse's "console" window?
Can you see it if you run it all from outside eclipse (Maven, Ant,
whatever you're using)?
Aslak
In IntelliJ, clicking on various nodes in the JUnit "tree" will
show/hide output so that only what was printed during a certain test
(scenario) is shown.
I'm not sure if Eclipse behaves the same, but it might. Try selecting
the root element.
Aslak
They are if you kick it off with JUnit:
https://github.com/cucumber/cucumber-jvm/blob/master/groovy/src/test/java/cucumber/runtime/groovy/RunCukesTest.java
I assume you're using the CLI runner then.
Maybe you have run into the same issue as this?
https://groups.google.com/d/msg/cukes/HJ1Ik910jPc/e5ANfEx4Pv0J
Aslak