Discussion:
[cucumber, jruby] Same steps are being added multiple times?
(too old to reply)
John Goodsen
2009-04-09 18:19:59 UTC
Permalink
Hi all,

I'm not quite sure I understand how env.rb is loaded in the cucumber/jruby
world. I have
a directory structure like this:

stories/fulfillment_status_tracking
stories/fulfillment_status_tracking/main_success.feature
stories/fulfillment_status_tracking/test.feature
stories/regular_billme_single_title_subscription
stories/regular_billme_single_title_subscription/form_validation.feature
stories/regular_billme_single_title_subscription/main_success.feature
stories/support
stories/support/env.rb


My env.rb file simply loads my Java step class and adds it, here's what it
looks like:

----------- env.rb -----------

require 'cucumber/java'
import 'com.timeinc.ecommerce.storytests.cucumber.NavigationSteps'

register_steps(NavigationSteps)
SeleniumController.markStepsLoaded()

-----------

but when I run my tests with: jruby -S cucumber -r stories/support/env.rb

I am getting Ambiguous match of my steps - but I only have a single class of
steps, NavigationSteps.

any ideas what's going on?
--
John Goodsen RADSoft / Better Software Faster
jgoodsen-***@public.gmane.org Lean/Agile/XP/Scrum Coaching and Training
http://www.radsoft.com Ruby on Rails and Java Solutions
James Byrne
2009-04-09 18:52:31 UTC
Permalink
Post by John Goodsen
but when I run my tests with: jruby -S cucumber -r
stories/support/env.rb
I am getting Ambiguous match of my steps - but I only have a single
class of steps, NavigationSteps.
any ideas what's going on?
You have two (or more) step matchers that match a single clause in a
scenario. The error message usually tells you exactly which steps in
which files collide, for the MRI anyway
--
Posted via http://www.ruby-forum.com/.
John Goodsen
2009-04-09 20:09:47 UTC
Permalink
I understand how this happens when I *really do* have ambiguous steps, but
in my simple case, I don't. I only have a single class which contains steps
(attached below). I can run a single scenario just fin, but when I try to
run multiple scenarios in one run, I get Ambiguous step errors. It's like
the steps are getting added again before each scenario runs - I've got to be
missing something really basic here.

thanks in advance, John

PS: Here's the one, and only one, step class that I'm using (implementation
removed for shortness):

package com.timeinc.ecommerce.storytests.cucumber;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.thoughtworks.selenium.Selenium;
import com.timeinc.ecommerce.KickOffFulfillment;
import com.timeinc.ecommerce.domain.FulfillmentTransaction;
import com.timeinc.ecommerce.domain.Order;
import com.timeinc.ecommerce.domain.PersistenceService;
import com.timeinc.ecommerce.storytests.StoryTestProperties;
import com.timeinc.ecommerce.storytests.checkers.OrderChecker;
import com.timeinc.ecommerce.storytests.selenium.Page;
import com.timeinc.ecommerce.storytests.selenium.ReceiptPage;
import com.timeinc.ecommerce.storytests.selenium.SeleniumController;

import cucumber.Given;
import cucumber.Table;
import cucumber.Then;
import cucumber.When;

public class NavigationSteps {

@Given("the microsite with")
public void givenTheMicrosite(Table table) {
}

@When("I navigate to the microsite")
public void whenTheUserNavigatesToTheMicrosite() {
}

@When("I submit the form with")
}

@Then("I see a receipt page")
public void theUserIsPresentedWithAReceiptPage() {
}

@Then("a new order is created with")
public void aNewOrderIsCreatedWith(Table table) {
}

@Then("the following error messages are displayed")
public void theFollowingErrorsShouldBeDisplayed(Table table) {
Page.ensureErrorsAreDisplayed(selenium, table);
}

@When("fulfillment runs")
public void fulfillmentRuns() throws Exception {
}

@Given("an order exists in the system")
public void anOrderExistsInTheSystem() {
}

@When("the user navigates to the status tracking page for the order")
public void navigatesToStatusTrackingPage() {
}

@Then("the transaction is displayed as succeeded")
public void theTransactionIsDisplayedAsSucceeded() {
}

}
Post by James Byrne
Post by John Goodsen
but when I run my tests with: jruby -S cucumber -r
stories/support/env.rb
I am getting Ambiguous match of my steps - but I only have a single
class of steps, NavigationSteps.
any ideas what's going on?
You have two (or more) step matchers that match a single clause in a
scenario. The error message usually tells you exactly which steps in
which files collide, for the MRI anyway
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
--
John Goodsen RADSoft / Better Software Faster
jgoodsen-***@public.gmane.org Lean/Agile/XP/Scrum Coaching and Training
http://www.radsoft.com Ruby on Rails and Java Solutions
John Goodsen
2009-04-10 15:29:21 UTC
Permalink
so I'm still stumped... how do I tell keep cucumber from loading the *SAME*
steps more than once when I run multiple scenarios? I can't be the only
person to experience this... I must be doing something wrong. I'm loading
step classes in my env.rb file. When I add steps in cucumber/jruby using
the register_steps() method, my test is acting like the step classes is
getting added again for each scenario?

thanks for any help,

John
Post by John Goodsen
Hi all,
I'm not quite sure I understand how env.rb is loaded in the cucumber/jruby
world. I have
stories/fulfillment_status_tracking
stories/fulfillment_status_tracking/main_success.feature
stories/fulfillment_status_tracking/test.feature
stories/regular_billme_single_title_subscription
stories/regular_billme_single_title_subscription/form_validation.feature
stories/regular_billme_single_title_subscription/main_success.feature
stories/support
stories/support/env.rb
My env.rb file simply loads my Java step class and adds it, here's what it
----------- env.rb -----------
require 'cucumber/java'
import 'com.timeinc.ecommerce.storytests.cucumber.NavigationSteps'
register_steps(NavigationSteps)
SeleniumController.markStepsLoaded()
-----------
but when I run my tests with: jruby -S cucumber -r stories/support/env.rb
I am getting Ambiguous match of my steps - but I only have a single class
of steps, NavigationSteps.
any ideas what's going on?
--
John Goodsen RADSoft / Better Software Faster
http://www.radsoft.com Ruby on Rails and Java Solutions
--
John Goodsen RADSoft / Better Software Faster
jgoodsen-***@public.gmane.org Lean/Agile/XP/Scrum Coaching and Training
http://www.radsoft.com Ruby on Rails and Java Solutions
Mark Anderson
2009-04-10 16:11:36 UTC
Permalink
Is there a reason that you are using import instead of require? I can't
find any documentation on import to back up my memory, but I thought that
require keeps track so that it can ignore if you require the same thing
twice, but that import does not try to keep you from importing the same
thing twice. I would recommend changing import to require and see what
happens.



/\/\ark



_____

From: rspec-users-bounces-***@public.gmane.org
[mailto:rspec-users-bounces-***@public.gmane.org] On Behalf Of John Goodsen
Sent: Friday, April 10, 2009 10:29 AM
To: rspec-users-***@public.gmane.org
Subject: [rspec-users] [cucumber,jruby] Same steps are being added multiple
times?



so I'm still stumped... how do I tell keep cucumber from loading the *SAME*
steps more than once when I run multiple scenarios? I can't be the only
person to experience this... I must be doing something wrong. I'm loading
step classes in my env.rb file. When I add steps in cucumber/jruby using
the register_steps() method, my test is acting like the step classes is
getting added again for each scenario?

thanks for any help,

John



On Thu, Apr 9, 2009 at 2:19 PM, John Goodsen <jgoodsen-***@public.gmane.org> wrote:

Hi all,

I'm not quite sure I understand how env.rb is loaded in the cucumber/jruby
world. I have
a directory structure like this:

stories/fulfillment_status_tracking
stories/fulfillment_status_tracking/main_success.feature
stories/fulfillment_status_tracking/test.feature
stories/regular_billme_single_title_subscription
stories/regular_billme_single_title_subscription/form_validation.feature
stories/regular_billme_single_title_subscription/main_success.feature
stories/support
stories/support/env.rb


My env.rb file simply loads my Java step class and adds it, here's what it
looks like:

----------- env.rb -----------

require 'cucumber/java'
import 'com.timeinc.ecommerce.storytests.cucumber.NavigationSteps'

register_steps(NavigationSteps)
SeleniumController.markStepsLoaded()

-----------

but when I run my tests with: jruby -S cucumber -r stories/support/env.rb

I am getting Ambiguous match of my steps - but I only have a single class of
steps, NavigationSteps.

any ideas what's going on?
--
John Goodsen RADSoft / Better Software Faster
jgoodsen-***@public.gmane.org Lean/Agile/XP/Scrum Coaching and Training
http://www.radsoft.com Ruby on Rails and Java Solutions
--
John Goodsen RADSoft / Better Software Faster
jgoodsen-***@public.gmane.org Lean/Agile/XP/Scrum Coaching and Training
http://www.radsoft.com Ruby on Rails and Java Solutions



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3999 (20090410) __________



The message was checked by ESET NOD32 Antivirus.



http://www.eset.com
aslak hellesoy
2009-04-11 07:56:08 UTC
Permalink
Post by John Goodsen
so I'm still stumped... how do I tell keep cucumber from loading the *SAME*
steps more than once when I run multiple scenarios? I can't be the only
person to experience this... I must be doing something wrong. I'm loading
step classes in my env.rb file. When I add steps in cucumber/jruby using
the register_steps() method, my test is acting like the step classes is
getting added again for each scenario?
You may have run into a bug with cucumber_java. It hasn't undergone the same
scrutiny as cucumber yet.

Can you modify the simple example in cucumber_java so that this is
reproducible for others? Then create a ticket where you describe the exact
steps to reproduce the error.

Cheers,
Aslak
Post by John Goodsen
thanks for any help,
John
Post by John Goodsen
Hi all,
I'm not quite sure I understand how env.rb is loaded in the cucumber/jruby
world. I have
stories/fulfillment_status_tracking
stories/fulfillment_status_tracking/main_success.feature
stories/fulfillment_status_tracking/test.feature
stories/regular_billme_single_title_subscription
stories/regular_billme_single_title_subscription/form_validation.feature
stories/regular_billme_single_title_subscription/main_success.feature
stories/support
stories/support/env.rb
My env.rb file simply loads my Java step class and adds it, here's what it
----------- env.rb -----------
require 'cucumber/java'
import 'com.timeinc.ecommerce.storytests.cucumber.NavigationSteps'
register_steps(NavigationSteps)
SeleniumController.markStepsLoaded()
-----------
but when I run my tests with: jruby -S cucumber -r stories/support/env.rb
I am getting Ambiguous match of my steps - but I only have a single class
of steps, NavigationSteps.
any ideas what's going on?
--
John Goodsen RADSoft / Better Software Faster
http://www.radsoft.com Ruby on Rails and Java Solutions
--
John Goodsen RADSoft / Better Software Faster
http://www.radsoft.com Ruby on Rails and Java Solutions
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
John Goodsen
2009-04-13 22:08:20 UTC
Permalink
OK, I'll reproduce in a simple example and create a ticket...
Post by aslak hellesoy
Post by John Goodsen
so I'm still stumped... how do I tell keep cucumber from loading the
*SAME* steps more than once when I run multiple scenarios? I can't be the
only person to experience this... I must be doing something wrong. I'm
loading step classes in my env.rb file. When I add steps in cucumber/jruby
using the register_steps() method, my test is acting like the step classes
is getting added again for each scenario?
You may have run into a bug with cucumber_java. It hasn't undergone the
same scrutiny as cucumber yet.
Can you modify the simple example in cucumber_java so that this is
reproducible for others? Then create a ticket where you describe the exact
steps to reproduce the error.
Cheers,
Aslak
Post by John Goodsen
thanks for any help,
John
Post by John Goodsen
Hi all,
I'm not quite sure I understand how env.rb is loaded in the
cucumber/jruby world. I have
stories/fulfillment_status_tracking
stories/fulfillment_status_tracking/main_success.feature
stories/fulfillment_status_tracking/test.feature
stories/regular_billme_single_title_subscription
stories/regular_billme_single_title_subscription/form_validation.feature
stories/regular_billme_single_title_subscription/main_success.feature
stories/support
stories/support/env.rb
My env.rb file simply loads my Java step class and adds it, here's what
----------- env.rb -----------
require 'cucumber/java'
import 'com.timeinc.ecommerce.storytests.cucumber.NavigationSteps'
register_steps(NavigationSteps)
SeleniumController.markStepsLoaded()
-----------
but when I run my tests with: jruby -S cucumber -r
stories/support/env.rb
I am getting Ambiguous match of my steps - but I only have a single class
of steps, NavigationSteps.
any ideas what's going on?
--
John Goodsen RADSoft / Better Software Faster
Training
http://www.radsoft.com Ruby on Rails and Java Solutions
--
John Goodsen RADSoft / Better Software Faster
http://www.radsoft.com Ruby on Rails and Java Solutions
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
--
John Goodsen RADSoft / Better Software Faster
jgoodsen-***@public.gmane.org Lean/Agile/XP/Scrum Coaching and Training
http://www.radsoft.com Ruby on Rails and Java Solutions
aslak hellesoy
2009-04-13 22:56:54 UTC
Permalink
Post by John Goodsen
OK, I'll reproduce in a simple example and create a ticket...
Excellent - I'll get to it ASAP
Post by John Goodsen
Post by aslak hellesoy
Post by John Goodsen
so I'm still stumped... how do I tell keep cucumber from loading the
*SAME* steps more than once when I run multiple scenarios? I can't be the
only person to experience this... I must be doing something wrong. I'm
loading step classes in my env.rb file. When I add steps in cucumber/jruby
using the register_steps() method, my test is acting like the step classes
is getting added again for each scenario?
You may have run into a bug with cucumber_java. It hasn't undergone the
same scrutiny as cucumber yet.
Can you modify the simple example in cucumber_java so that this is
reproducible for others? Then create a ticket where you describe the exact
steps to reproduce the error.
Cheers,
Aslak
Post by John Goodsen
thanks for any help,
John
Post by John Goodsen
Hi all,
I'm not quite sure I understand how env.rb is loaded in the
cucumber/jruby world. I have
stories/fulfillment_status_tracking
stories/fulfillment_status_tracking/main_success.feature
stories/fulfillment_status_tracking/test.feature
stories/regular_billme_single_title_subscription
stories/regular_billme_single_title_subscription/form_validation.feature
stories/regular_billme_single_title_subscription/main_success.feature
stories/support
stories/support/env.rb
My env.rb file simply loads my Java step class and adds it, here's what
----------- env.rb -----------
require 'cucumber/java'
import 'com.timeinc.ecommerce.storytests.cucumber.NavigationSteps'
register_steps(NavigationSteps)
SeleniumController.markStepsLoaded()
-----------
but when I run my tests with: jruby -S cucumber -r
stories/support/env.rb
I am getting Ambiguous match of my steps - but I only have a single
class of steps, NavigationSteps.
any ideas what's going on?
--
John Goodsen RADSoft / Better Software Faster
Training
http://www.radsoft.com Ruby on Rails and Java Solutions
--
John Goodsen RADSoft / Better Software Faster
Training
http://www.radsoft.com Ruby on Rails and Java Solutions
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
--
John Goodsen RADSoft / Better Software Faster
http://www.radsoft.com Ruby on Rails and Java Solutions
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
Neema Cheriyath
2009-04-18 06:23:18 UTC
Permalink
Post by aslak hellesoy
Post by John Goodsen
OK, I'll reproduce in a simple example and create a ticket...
Excellent - I'll get to it ASAP
I am also having the same issue with cucumber-java.

please refer - http://www.ruby-forum.com/topic/184342#new

With cucumber-java , it seems that we would be able to run only one
feature file and one scenario in that file.

Is there any way by which we can execute multiple feature files that
will invoke seperate scenarios?

Thanks,
Neema
--
Posted via http://www.ruby-forum.com/.
Aslak Hellesøy
2009-04-18 07:50:46 UTC
Permalink
Post by Neema Cheriyath
Post by aslak hellesoy
Post by John Goodsen
OK, I'll reproduce in a simple example and create a ticket...
Excellent - I'll get to it ASAP
I am also having the same issue with cucumber-java.
please refer - http://www.ruby-forum.com/topic/184342#new
With cucumber-java , it seems that we would be able to run only one
feature file and one scenario in that file.
Sounds like a bug then.
Post by Neema Cheriyath
Is there any way by which we can execute multiple feature files that
will invoke seperate scenarios?
Someone fixes the bug ;-)

Aslak
Post by Neema Cheriyath
Thanks,
Neema
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
aslak hellesoy
2009-04-19 22:11:30 UTC
Permalink
Post by Neema Cheriyath
Post by aslak hellesoy
Post by John Goodsen
OK, I'll reproduce in a simple example and create a ticket...
Excellent - I'll get to it ASAP
I never got a ticket from any of you, but I have committed a fix:
http://github.com/aslakhellesoy/cucumber_java/commit/5f8f31b3d2b34050a93e27990ed25ce9274f49ac

So it will be in the next release.

Aslak
Post by Neema Cheriyath
I am also having the same issue with cucumber-java.
please refer - http://www.ruby-forum.com/topic/184342#new
With cucumber-java , it seems that we would be able to run only one
feature file and one scenario in that file.
Is there any way by which we can execute multiple feature files that
will invoke seperate scenarios?
Thanks,
Neema
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
John Goodsen
2009-04-20 19:45:53 UTC
Permalink
Aslak,

I just ran the simple examples in your latest version of cucumber_java, and
it still exposes the ambiguous steps problem that I'm seeing. Before I
could get it to run, I had to make some changes to the cucumber-maven
project:

The class CucumberMojo has Java 6'isms in it and the client I'm working
with is still on Java 5. Specifically:

1. I had to replace calls to String.isEmpty() to use the length() method
instead.
2. I had to remove the @override annotation on the execute() method (the
interface never had this method?)

Once I did that, then I cleaned my local maven repository, did a "mvn clean
package install" in the cucumber_java
root directory then went down into the examples/simple directory and did a
"mvn clean package".

Then when I went to run the simple tests in cucumber_java/examples/simple
using the command:

jruby -S cucumber features

I see the ambiguous steps definition error again, but I'm also seeing
argument type mismatch in StepDefinitionExtras...
Attached below is the dump of my test run. Hope this helps.

thanks in advance,
--
John Goodsen RADSoft / Better Software Faster
jgoodsen-***@public.gmane.org Lean/Agile/XP/Scrum Coaching and Training
http://www.radsoft.com Ruby on Rails and Java Solutions



---------------- TEST RUN RESULTS BELOW
---------------------------------------------------------------------

pcp072050pcs:simple jgoodsen8440$ jruby -S cucumber --guess features
Feature: Simple

Scenario: 3 cukes # features/demo.feature:3
Given I have 3 green cukes # public void
simple.StuffSteps.iHaveNCukes(int,java.lang.String)
java.lang.IllegalArgumentException: argument type mismatch
(Cucumber::PureJava::StepDefinitionExtras::JavaException)
cucumber/internal/StepDefinition.java:33:in `invokeOnTarget'
cucumber/internal/StepDefinition.java:28:in `invokeOnTarget'
features/demo.feature:4:in `Given I have 3 green cukes'
When I add a table # public void
simple.StuffSteps.iAddATable(cucumber.Table)
| a | b |
| 1 | 2 |
Then I should have 3 green cukes # public void
simple.StuffSteps.iShouldHaveNCukes(int,java.lang.String)

Scenario: 4 cukes # features/demo.feature:10
Given I have 4 green cukes # features/demo.feature:11
Ambiguous match of "I have 4 green cukes":

public void simple.StuffSteps.iHaveNCukes(int,java.lang.String):in `/I
have (\d+) (.*) cukes/'
public void simple.StuffSteps.iHaveNCukes(int,java.lang.String):in `/I
have (\d+) (.*) cukes/'

(Cucumber::Ambiguous)

/Users/jgoodsen8440/Applications/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/cucumber-0.2.3.1/bin/../lib/cucumber/step_mother.rb:122:in
`step_match'

.... the rest of the stack trace removed to keep the message small...
Sent from my iPhone
*Date:* April 19, 2009 6:11:30 PM EDT
*Subject:* *Re: [rspec-users] [cucumber, jruby] Same steps are being
added multiple t*
Post by Neema Cheriyath
Post by aslak hellesoy
Post by John Goodsen
OK, I'll reproduce in a simple example and create a ticket...
Excellent - I'll get to it ASAP
<http://github.com/aslakhellesoy/cucumber_java/commit/5f8f31b3d2b34050a93e27990ed25ce9274f49ac>
http://github.com/aslakhellesoy/cucumber_java/commit/5f8f31b3d2b34050a93e27990ed25ce9274f49ac
So it will be in the next release.
Aslak
Post by Neema Cheriyath
I am also having the same issue with cucumber-java.
please refer - <http://www.ruby-forum.com/topic/184342#new>
http://www.ruby-forum.com/topic/184342#new
With cucumber-java , it seems that we would be able to run only one
feature file and one scenario in that file.
Is there any way by which we can execute multiple feature files that
will invoke seperate scenarios?
Thanks,
Neema
--
Posted via <http://www.ruby-forum.com/>http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
<http://rubyforge.org/mailman/listinfo/rspec-users>
http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
--
John Goodsen RADSoft / Better Software Faster
jgoodsen-***@public.gmane.org Lean/Agile/XP/Scrum Coaching and Training
http://www.radsoft.com Ruby on Rails and Java Solutions
aslak hellesoy
2009-04-20 21:05:27 UTC
Permalink
Post by John Goodsen
Aslak,
I just ran the simple examples in your latest version of cucumber_java, and
it still exposes the ambiguous steps problem that I'm seeing. Before I
could get it to run, I had to make some changes to the cucumber-maven
The class CucumberMojo has Java 6'isms in it and the client I'm working
1. I had to replace calls to String.isEmpty() to use the length() method
instead.
interface never had this method?)
I've just fixed those
Post by John Goodsen
Once I did that, then I cleaned my local maven repository, did a "mvn clean
package install" in the cucumber_java
root directory then went down into the examples/simple directory and did a
"mvn clean package".
Then when I went to run the simple tests in cucumber_java/examples/simple
jruby -S cucumber features
You're probably still running with old gems. "mvn install" installs jars
into your maven repo, but it doesn't build or install the gems into your
jruby.
Here is how to do that:

cd cucumber-java
jruby -S rake gem
jruby -S gem install pkg/cucumber-java

Now try this from the simple example dir:

mvn cucumber:features

I have also just released cucumber-java 0.0.2 on rubyforge (gem) and pushed
the pure jar to the maven repo:
http://cukes.info/maven/cucumber/cucumber-java/0.0.2/cucumber-java-0.0.2.jar

Hope this gets you a little further. Thanks for helping out with the java
support!

Aslak
Post by John Goodsen
I see the ambiguous steps definition error again, but I'm also seeing
argument type mismatch in StepDefinitionExtras...
Attached below is the dump of my test run. Hope this helps.
thanks in advance,
--
John Goodsen RADSoft / Better Software Faster
http://www.radsoft.com Ruby on Rails and Java Solutions
---------------- TEST RUN RESULTS BELOW
---------------------------------------------------------------------
pcp072050pcs:simple jgoodsen8440$ jruby -S cucumber --guess features
Feature: Simple
Scenario: 3 cukes # features/demo.feature:3
Given I have 3 green cukes # public void
simple.StuffSteps.iHaveNCukes(int,java.lang.String)
java.lang.IllegalArgumentException: argument type mismatch
(Cucumber::PureJava::StepDefinitionExtras::JavaException)
cucumber/internal/StepDefinition.java:33:in `invokeOnTarget'
cucumber/internal/StepDefinition.java:28:in `invokeOnTarget'
features/demo.feature:4:in `Given I have 3 green cukes'
When I add a table # public void
simple.StuffSteps.iAddATable(cucumber.Table)
| a | b |
| 1 | 2 |
Then I should have 3 green cukes # public void
simple.StuffSteps.iShouldHaveNCukes(int,java.lang.String)
Scenario: 4 cukes # features/demo.feature:10
Given I have 4 green cukes # features/demo.feature:11
public void simple.StuffSteps.iHaveNCukes(int,java.lang.String):in
`/I have (\d+) (.*) cukes/'
public void simple.StuffSteps.iHaveNCukes(int,java.lang.String):in
`/I have (\d+) (.*) cukes/'
(Cucumber::Ambiguous)
/Users/jgoodsen8440/Applications/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/cucumber-0.2.3.1/bin/../lib/cucumber/step_mother.rb:122:in
`step_match'
.... the rest of the stack trace removed to keep the message small...
Sent from my iPhone
*Date:* April 19, 2009 6:11:30 PM EDT
*Subject:* *Re: [rspec-users] [cucumber, jruby] Same steps are being
added multiple t*
Post by Neema Cheriyath
Post by aslak hellesoy
Post by John Goodsen
OK, I'll reproduce in a simple example and create a ticket...
Excellent - I'll get to it ASAP
<http://github.com/aslakhellesoy/cucumber_java/commit/5f8f31b3d2b34050a93e27990ed25ce9274f49ac>
http://github.com/aslakhellesoy/cucumber_java/commit/5f8f31b3d2b34050a93e27990ed25ce9274f49ac
So it will be in the next release.
Aslak
Post by Neema Cheriyath
I am also having the same issue with cucumber-java.
please refer - <http://www.ruby-forum.com/topic/184342#new>
http://www.ruby-forum.com/topic/184342#new
With cucumber-java , it seems that we would be able to run only one
feature file and one scenario in that file.
Is there any way by which we can execute multiple feature files that
will invoke seperate scenarios?
Thanks,
Neema
--
Posted via <http://www.ruby-forum.com/>http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
<http://rubyforge.org/mailman/listinfo/rspec-users>
http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
--
John Goodsen RADSoft / Better Software Faster
http://www.radsoft.com Ruby on Rails and Java Solutions
_______________________________________________
rspec-users mailing list
http://rubyforge.org/mailman/listinfo/rspec-users
Continue reading on narkive:
Loading...