Richard Lawrence | 1 Sep 2011 02:26
Gravatar

Re: [Cucumber:8918] Scenarios for foreign languages

Google's translate API can detect the language of a text. Perhaps you
could use this in your step definition. See the "Detect source
language" section here:
http://code.google.com/apis/language/translate/v2/getting_started.html.

Richard

On Wed, Aug 31, 2011 at 3:52 PM, Andy Waite <andywaite@...> wrote:
> I trying to implement tests for behaviour which goes something like
> this:
>
>  Scenario: Viewing the home page in Spanish
>
>    Given that my browser's language is set to Spanish
>    When I view the home page
>    Then all the content should be in Spanish
>
> But I'm at a loss about how best to implement the 'Then' step
> definition. Checking for particular strings in Spanish (or any other
> language) would likely make the tests very fragile.
>
> Andy
>
> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cukes@...
> To unsubscribe from this group, send email to cukes+unsubscribe <at> googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
>
>
(Continue reading)

Eumir Gaspar | 1 Sep 2011 06:30
Picon
Gravatar

Re: [Cucumber:8919] Which versions of Ruby should Cucumber support?



On Thu, Sep 1, 2011 at 4:38 AM, David Kowis <dkowis <at> gmail.com> wrote:
On Wed, Aug 31, 2011 at 10:49 AM, Mike Sassak <msassak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hello Cucumber Ruby Users,
>
> A question about the state of adoption of Ruby 1.9.x: what would you
> say if Cucumber dropped support for Ruby versions < 1.8.7? What about
> dropping support for 1.8.x entirely? How many test suites would burst
> into flames if that happened? Rails doesn't support 1.8.6 anymore, but
> I don't think many of the big Ruby projects are dropping 1.8.7 just
> yet, but one day it will happen. Please note that if anything happens
> to Cucumber in this regard, it will happen slowly and deliberately.
> You won't wake up one morning to find that all your 1.8.x suites broke
> with a bump of the tiny version number.
>
> What are your thoughts about this?

By dropping support, what do you mean? Like just ignore new bugs that are discovered? Or will this be more of a we all have to switch to 1.9 because cucumber will no longer run in 1.8? If it is the former, then I think that is a good thing, much like Rails did with 1.8.6. With the latter, it will be more troublesome with legacy apps that rely on this. 

I know that upgrading is, of course, for the better, but what about companies that don't have the budget for that? You can't just say "Sorry, but we have to charge you more since we'll have to migrate our test suite to 1.9...unless you don't want tests" or something to clients, right? 

In any case, I think that you just mean not thinking about 1.8 when creating new features and ignoring any new bugs so I guess that's all right. Just my two cents :)

--
Eumir Gaspar
Ruby on Rails Developer/Rails UI Specialist

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to cukes+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
Andrew Premdas | 1 Sep 2011 08:10
Picon
Gravatar

Re: [Cucumber:8920] Which versions of Ruby should Cucumber support?

On 31 August 2011 16:49, Mike Sassak <msassak@...> wrote:
> Hello Cucumber Ruby Users,
>
> A question about the state of adoption of Ruby 1.9.x: what would you
> say if Cucumber dropped support for Ruby versions < 1.8.7? What about
> dropping support for 1.8.x entirely? How many test suites would burst
> into flames if that happened? Rails doesn't support 1.8.6 anymore, but
> I don't think many of the big Ruby projects are dropping 1.8.7 just
> yet, but one day it will happen. Please note that if anything happens
> to Cucumber in this regard, it will happen slowly and deliberately.
> You won't wake up one morning to find that all your 1.8.x suites broke
> with a bump of the tiny version number.
>
> What are your thoughts about this?
> Mike
>
> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cukes@...
> To unsubscribe from this group, send email to cukes+unsubscribe@...
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
>
>
I think a widely used testing tool like Cucumber should be expected to
work on all currently supported versions of Ruby, and I would define
"supported versions" to mean every ruby that is supported by ruby.lang
and currently to mean between now and x years ago. So cucumber drops
support later than ruby.lang. In other words it should ideally be very
conservative about dropping language support.

Assuming that this would kill development then we need a good way to
gently drop versions and leave people with a good outlet if they have
to continue using a really old cucumber. With something as serious is
dropping support for a major ruby version would forking the project
and releasing a legacy gem be a viable solution

e.g. release cucumber1.8.7 gem or a cucumber1.8.x gem

I have no idea if this is practical or sensible, but is does seem to
me that Cucumber will be very useful for working with legacy ruby and
rails projects for many years to come, and that just specifying an
older version of the gem to use is not enough for something so major
as say dropping 1.8.x support.

All best

Andrew

-- 
------------------------
Andrew Premdas
blog.andrew.premdas.org

--

-- 
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes@...
To unsubscribe from this group, send email to cukes+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

Mike Sassak | 1 Sep 2011 08:27
Picon
Gravatar

Re: [Cucumber:8921] Which versions of Ruby should Cucumber support?

On Wed, Aug 31, 2011 at 11:30 PM, Eumir Gaspar
<imacaterpillar@...> wrote:
>
>
> On Thu, Sep 1, 2011 at 4:38 AM, David Kowis <dkowis@...> wrote:
>>
>> On Wed, Aug 31, 2011 at 10:49 AM, Mike Sassak <msassak@...> wrote:
>> > Hello Cucumber Ruby Users,
>> >
>> > A question about the state of adoption of Ruby 1.9.x: what would you
>> > say if Cucumber dropped support for Ruby versions < 1.8.7? What about
>> > dropping support for 1.8.x entirely? How many test suites would burst
>> > into flames if that happened? Rails doesn't support 1.8.6 anymore, but
>> > I don't think many of the big Ruby projects are dropping 1.8.7 just
>> > yet, but one day it will happen. Please note that if anything happens
>> > to Cucumber in this regard, it will happen slowly and deliberately.
>> > You won't wake up one morning to find that all your 1.8.x suites broke
>> > with a bump of the tiny version number.
>> >
>> > What are your thoughts about this?
>
> By dropping support, what do you mean? Like just ignore new bugs that are
> discovered? Or will this be more of a we all have to switch to 1.9 because
> cucumber will no longer run in 1.8? If it is the former, then I think that
> is a good thing, much like Rails did with 1.8.6. With the latter, it will be
> more troublesome with legacy apps that rely on this.
> I know that upgrading is, of course, for the better, but what about
> companies that don't have the budget for that? You can't just say "Sorry,
> but we have to charge you more since we'll have to migrate our test suite to
> 1.9...unless you don't want tests" or something to clients, right?
> In any case, I think that you just mean not thinking about 1.8 when creating
> new features and ignoring any new bugs so I guess that's all right. Just my
> two cents :)

Hi Eumir,

To clarify: there is no possibility I can see of Cucumber dropping
support for 1.8.x in the 1.x series. The code has already been
written, after all, and it would be silly to remove it. Neither do I
think anyone would just start ignoring patches for 1.x, or fail to fix
serious problems or regressions in its behavior. That doesn't serve
anyone well. For new major versions with new code and features,
however, the situation is potentially different.

Mike

> --
> Eumir Gaspar
> Ruby on Rails Developer/Rails UI Specialist
> github: http://github.com/corroded
> tech blog: http://aelogica.com/author/eumir/
> odesk: http://www.odesk.com/users/~~8951a3b425021bda
> stackoverflow: http://stackoverflow.com/users/334545/corroded
> working with
> rails: http://www.workingwithrails.com/person/19554-eumir-gaspar
> linked in: http://ph.linkedin.com/pub/eumir-gaspar/7/969/98a
>
> --
> You received this message because you are subscribed to the Google Groups
> "Cukes" group.
> To post to this group, send email to cukes@...
> To unsubscribe from this group, send email to
> cukes+unsubscribe@...
> For more options, visit this group at
> http://groups.google.com/group/cukes?hl=en.
>

--

-- 
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes@...
To unsubscribe from this group, send email to cukes+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

kadoudal | 1 Sep 2011 09:56
Picon

[Cucumber:8922] running specific wip scenario

I would like to run only one  javascript scenario as wip, what
cucumber command should I use ?

I tried  cucumber:wip    , placing both tags    <at> wip,  <at> javascript
before the scenario , doesn't seems to work ..

Feature: feature-A
  In order to ...
  A user should be able to ....

     <at> javascript,  <at> wip
    Scenario: 1- User ......
      Given I am authenticated ...
      When ....
      Then ....

     <at> javascript
    Scenario: 2- User ......
      Given I am authenticated ...
      When ....
      Then ....

     <at> javascript
    Scenario: 3-User ......
      Given I am authenticated ...
      When ....
      Then ....

--

-- 
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes@...
To unsubscribe from this group, send email to cukes+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

Tobias Hahn | 1 Sep 2011 10:11
Picon

Re: [Cucumber:8923] [wire] Issue with scenario outline with background but without examples

Hey Matt,

they do indeed occur under similar circumstances (background but no scenario), but I believe they are different:

-- The one I just reported by mail is about cucumber sending begin_scenario (for the background), but no matching end_scenario. This leads to inconsistent state in the wireserver, but does not affect cucumber as the test runner. 

-- Issue 112 is about an uncaught exception in cucumber (not in the wire server) which immediately terminates cucumber. 

Does this clarify things for you?

Best, Tobias

Am 31.08.2011 um 23:38 schrieb Matt Wynne <matt-khLDQHZco60qcZcGjlUOXw@public.gmane.org>:

Hi Tobias,

On 31 Aug 2011, at 15:07, Tobias Hahn wrote:

Hi all,

I am running into an issue when using cucumber over the wire protocol
using the cukebins driver. The problem occurs when I run a scenario
outline with a (possibly empty) background but without examples:

Feature:

 Background:

 Scenario Outline:
   Given an undefined step

In this case, cucumber sends a begin_scenario command over the wire,
but never a matching end_scenario. On the other side, begin_scenario
is used to setup a scenario context and execute any before hooks. But
since there is no corresponding end_scenario, this shared state
"spills over" into the next feature that is executed.

I am not quite sure how to write a failing scenario for this bug,
though. What do you think?

Thanks for looking into this.

Best,
Tobias

Is this the same issue?


cheers,
Matt

--
Freelance programmer & coach

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to cukes+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
Matt Wynne | 1 Sep 2011 13:33
Gravatar

Re: [Cucumber:8924] [wire] Issue with scenario outline with background but without examples


On 1 Sep 2011, at 09:11, Tobias Hahn wrote:

Hey Matt,

they do indeed occur under similar circumstances (background but no scenario), but I believe they are different:

-- The one I just reported by mail is about cucumber sending begin_scenario (for the background), but no matching end_scenario. This leads to inconsistent state in the wireserver, but does not affect cucumber as the test runner. 

-- Issue 112 is about an uncaught exception in cucumber (not in the wire server) which immediately terminates cucumber. 

Does this clarify things for you?

Yes. Can you please create a separate issue for this (but put a comment in #112 pointing to the new issue) and post a link to the issue in this thread?

Best, Tobias

Am 31.08.2011 um 23:38 schrieb Matt Wynne <matt <at> mattwynne.net>:

Hi Tobias,

On 31 Aug 2011, at 15:07, Tobias Hahn wrote:

Hi all,

I am running into an issue when using cucumber over the wire protocol
using the cukebins driver. The problem occurs when I run a scenario
outline with a (possibly empty) background but without examples:

Feature:

 Background:

 Scenario Outline:
   Given an undefined step

In this case, cucumber sends a begin_scenario command over the wire,
but never a matching end_scenario. On the other side, begin_scenario
is used to setup a scenario context and execute any before hooks. But
since there is no corresponding end_scenario, this shared state
"spills over" into the next feature that is executed.

I am not quite sure how to write a failing scenario for this bug,
though. What do you think?

Thanks for looking into this.

Best,
Tobias

Is this the same issue?


cheers,
Matt

--
Freelance programmer & coach


--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

cheers,
Matt

--
Freelance programmer & coach

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to cukes+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
Robert | 1 Sep 2011 14:14
Picon

Re: [Cucumber:8926] Cucumber-JVM: Tags and the commandline



On Wednesday, August 31, 2011 6:48:06 AM UTC-7, Aslak Hellesøy wrote:


On Wed, Aug 31, 2011 at 2:44 PM, Robert <rest...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:


On Wednesday, August 31, 2011 4:55:04 AM UTC-7, Aslak Hellesøy wrote:


On Wed, Aug 31, 2011 at 12:46 PM, Robert <res... <at> gmail.com> wrote:
At this stage in the development of cucumber-jvm, does it support passing tags in from the commandline?  I'm looking for something equivalent to the existing Cuke4Duke functionality whereby you can supply -DcukeArgs="--tags <at> foo" from the commandline


However, the CLI is still a little clunky. Try out the JRuby example to see some of its warts:

Aslak


Hi Aslak,

Thanks for the pointers!!  I've read the contents contained in each link and successfully used the information in the README.md file to run the JRuby example contained in the cucumber-jvm source.

So, I went ahead and took a stab at trying to run my project, which has been created using Eclipse.  However, when I attempt to run my feature file via the CLI, it simply echoes back the feature file contents and some suggestions for step definitions.  The odd thing is that I've implemented the step definitions, so I would expect the tests to run.  I'm pretty sure that I'm doing something wrong.  Here is the CLI command I'm using

java -classpath src/test/resources:/home/restagner/.m2/repository/info/cukes/cucumber-picocontainer/1.0.0-SNAPSHOT/cucumber-picocontainer-1.0.0-SNAPSHOT-full.jar cucumber.cli.Main --glue cucumber/runtime hello.feature


--glue should point to the package where your own stepdefs are defined.


I've had some luck using the CLI.  After adding the proper package to the --glue paramater, I am no longer receiving any sort of error.  

$ java -classpath src/test/java:src/test/resources:/home/restagner/.m2/repository/info/cukes/cucumber-picocontainer/1.0.0-SNAPSHOT/cucumber-picocontainer-1.0.0-SNAPSHOT-full.jar cucumber.cli.Main --glue org/stag/hello hello.feature --tags <at> foo

Yet, for some odd reason, the feature file is not being run -- I guess I'm just not handling something right.  It still echoes back the contents as if the scenario has not been implemented.  

I've noticed that tags are also supported within the <at> Feature annotation that is included within the JUnit test.  I'll probably stick with using that until the CLI is finalized.

Feature: My hello feature

  <at> foo
  Scenario: Saying hello                    # hello.feature:4
    Given a precondition
    When an action takes place
    Then the expected behavior is displayed

You can implement missing steps with the snippets below:

<at> Given("^a precondition$")
public void a_precondition() {
    // Express the Regexp above with the code you wish you had
}

<at> Then("^the expected behavior is displayed$")
public void the_expected_behavior_is_displayed() {
    // Express the Regexp above with the code you wish you had
}

<at> When("^an action takes place$")
public void an_action_takes_place() {
    // Express the Regexp above with the code you wish you had
}


 
 
I am executing this from within my project's directory.  And, the output returned is

Feature: My hello feature

  Scenario: Saying hello                    # hello.feature:3
    Given a precondition
    When an action takes place
    Then the expected behavior is displayed

  <at> foo
  Scenario: A tagged scenario                        # hello.feature:9
    Given a tag
    When an action takes place for a tagged scenario
    Then the result is shown

You can implement missing steps with the snippets below:

<at> Given("^a precondition$")
public void a_precondition() {
    // Express the Regexp above with the code you wish you had
}

<at> Given("^a tag$")
public void a_tag() {
    // Express the Regexp above with the code you wish you had
}

<at> Then("^the expected behavior is displayed$")
public void the_expected_behavior_is_displayed() {
    // Express the Regexp above with the code you wish you had
}

<at> Then("^the result is shown$")
public void the_result_is_shown() {
    // Express the Regexp above with the code you wish you had
}

<at> When("^an action takes place$")
public void an_action_takes_place() {
    // Express the Regexp above with the code you wish you had
}

<at> When("^an action takes place for a tagged scenario$")
public void an_action_takes_place_for_a_tagged_scenario() {
    // Express the Regexp above with the code you wish you had
}
 

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cukes/-/fwTnsaONf28J.
To post to this group, send email to cu...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to cukes...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.

For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cukes/-/xiTXxNSxJPQJ.

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 http://groups.google.com/group/cukes?hl=en.

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cukes/-/nuNSOpWRwVgJ.
To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to cukes+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
jbandi | 1 Sep 2011 14:32
Picon
Gravatar

[Cucumber:8926] Cucumber-JVM: Dependency injection in step implementations

With cuce4duke it was possible to define step-definition-classes that
had constructors with arguments.
The runtime then injected the necessary arguments into the step
definition.

Example:
https://github.com/cucumber/cuke4duke/blob/master/examples/java-ejb3/src/test/java/org/books/test/acceptance/SearchSteps.java

Is this still a desired feature in cucumber-JVM?

I would like to work on that feature. What would be the approach?
1. Create & grab a ticket
2. Send a pull request

As far as I have seen, for step definitions in java this would be
implemented starting from the JavaBackend:
https://github.com/cucumber/cucumber-jvm/blob/master/java/src/main/java/cucumber/runtime/java/JavaBackend.java

But that would mean that this feature has to be implemented explicitly
for each language... which is probably unavoidable ... or am I missing
something?

--

-- 
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes@...
To unsubscribe from this group, send email to cukes+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

jbandi | 1 Sep 2011 14:37
Picon
Gravatar

[Cucumber:8927] Cucumber-JVM: How-To work on new features?

I am currently diving into the cucumber-JVM implementation.

I just wanted to ask how to get the most pleasant development
experience.

My approach so far was:

1. Make a change in cucumber-jvm (core or language backend ...)
2. run mvn clean install
3. run an example that is using cucumber-jvm (i.e. the java-calulator
or java-webbit-websockets-selenium ...)

I wanted to know if there is a way to remove step 2 from the feedback
cycle?

How do you guys work on new features?

--

-- 
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cukes@...
To unsubscribe from this group, send email to cukes+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.


Gmane