Git Product home page Git Product logo

cuke4duke's People

Contributors

antifun avatar aslakhellesoy avatar bmabey avatar ckoenig avatar darrinholst avatar dhomann avatar henningjensen avatar hugojosefson avatar jesperronn avatar mjul avatar oc avatar olabini avatar ovstetun avatar rapaul avatar richardlawrence avatar senny avatar stuarthalloway avatar switzerland avatar teigen avatar torbjornvatn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cuke4duke's Issues

Step definition snippets for Java look crazy

Take this feature:

# language:no
Egenskap: Mye fin æøå
  Scenario: Sjekke at argumenter blir pene
    Når vi kjører "større" biler blir det "jævlig" mye eksos

Prints out this crazy snippet:

   @Når("^vi kjører \"([^\"]*)\" biler blir det \"([^\"]*)\" mye eksos$")
   @Pending
   public void #Language:noEgenskap:MyeFinæøåScenario:SjekkeAtArgumenterBlirPeneNårViKjørerStørreBilerBlirDetJævligMy
  (String arg1, String arg2) {
   }

Not good

undefined method `jlength' (NoMethodError) for ambiguous matches with --guess

I'm getting the following stack trace when a step has ambiguous matches and I've told cucumber to --guess.

 [java]     And the RRLP message should have a Reference Number component                                                  # spc$_run_closure3@4a4854f6
 [java] undefined method `jlength' for "/RRLP/n":String (NoMethodError)
 [java] /home/jacob/cucumber/bin/../lib/cucumber/language_support/step_definition_methods.rb:42:in `text_length'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/step_match.rb:32:in `text_length'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/step_mother.rb:170:in `best_matches'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/step_mother.rb:170:in `map'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/step_mother.rb:170:in `best_matches'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/step_mother.rb:159:in `step_match'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/step_invocation.rb:61:in `find_step_match!'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/step_invocation.rb:38:in `invoke'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/step_invocation.rb:29:in `accept'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/visitor.rb:76:in `visit_step'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/formatter/pretty.rb:145:in `visit_step'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/step_collection.rb:15:in `accept'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/step_collection.rb:14:in `each'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/step_collection.rb:14:in `accept'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/visitor.rb:72:in `visit_steps'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/scenario.rb:33:in `accept'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/step_mother.rb:199:in `before_and_after'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/scenario.rb:32:in `accept'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/visitor.rb:42:in `visit_feature_element'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/formatter/pretty.rb:82:in `visit_feature_element'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/feature.rb:25:in `accept'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/feature.rb:24:in `each'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/feature.rb:24:in `accept'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/visitor.rb:20:in `visit_feature'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/formatter/pretty.rb:44:in `visit_feature'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/features.rb:29:in `accept'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/features.rb:17:in `each'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/features.rb:17:in `each'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/features.rb:28:in `accept'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/ast/visitor.rb:16:in `visit_features'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/formatter/pretty.rb:28:in `visit_features'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/broadcaster.rb:9:in `method_missing'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/broadcaster.rb:8:in `map'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/broadcaster.rb:8:in `method_missing'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/cli/main.rb:64:in `execute!'
 [java] /home/jacob/cucumber/bin/../lib/cucumber/cli/main.rb:29:in `execute'
 [java] /home/jacob/cucumber/bin/cucumber:9

BUILD FAILED
/home/jacob/stuff/cucumber/cuke4duke/groovy/build.xml:16: Java returned: 1

Total time: 9 seconds

jacob@t500-7200:~/stuff/cucumber/cuke4duke/groovy$ cat /home/jacob/cucumber/lib/cucumber/language_support/step_definition_methods.rb
require 'cucumber/core_ext/string'

module Cucumber
module LanguageSupport

module StepDefinitionMethods
  def step_match(name_to_match, name_to_report)
    if(match = regexp.match(name_to_match))
      StepMatch.new(self, name_to_match, name_to_report, match.captures)
    else
      nil
    end
  end

  # Formats the matched arguments of the associated Step. This method
  # is usually called from visitors, which render output.
  #
  # The +format+ can either be a String or a Proc.
  #
  # If it is a String it should be a format string according to
  # <tt>Kernel#sprinf</tt>, for example:
  #
  #   '<span class="param">%s</span></tt>'
  #
  # If it is a Proc, it should take one argument and return the formatted
  # argument, for example:
  #
  #   lambda { |param| "[#{param}]" }
  #
  def format_args(step_name, format)
    step_name.gzub(regexp, format)
  end

  def same_regexp?(regexp)
    self.regexp == regexp
  end

  def backtrace_line
    "#{file_colon_line}:in `#{regexp.inspect}'"
  end

  def text_length
    regexp.inspect.jlength
  end
end

end 
end

Multiline String cannot convert to cuke4duke.Table

Our feature has a line that reads,

Then I should see
    """
    Some Words!
    Some more words.
    A lot of wordy word word word word word word word word word word word word word word word word word word word wordy words
    """

Which generates:

Then /^I should see this$/ do |string|
    pending # express the regexp above with the code you wish you had
end
@Then("^I should see this$")
@Pending
public void iShouldSeeThisWithString(cuke4duke.Table string) {
}

But when I try to run the cuke I'm getting the following error:

Sorry, cuke4duke doesn't know how to convert a org.jruby.gen.InterfaceImpl716911626@bf711e (class org.jruby.gen.InterfaceImpl716911626) to type interface cuke4duke.Table (NativeException)
  features/initialization/10048.feature:42:in `Then I should see'

Any idea what's going on here?

Shorter method names in step comments

Java method signatures can be really long. We can use something similar to date formats. Example:

-Dcuke4duke.signaturePattern=%c.%m(%a)

  • %qc: qualified class
  • %c: unqualified class
  • %m: method name
  • %qa: qualified arguments
  • %a: unqualified arguments
  • %qt: qualified throws clause
  • %t: unqualified throws clause

example doesn't work

.../cuke4duke (master) > mvn install
....
.../cuke4duke (master) > cd examples/spring
..les/spring (master) > mvn integration-test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Cuke4Duke Spring Example
[INFO]    task-segment: [integration-test]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: /work/research/cuke4duke/examples/spring/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

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

[INFO] [jar:jar {execution: default-jar}]
[INFO] [cuke4duke:features {execution: run-features}]
[INFO] Error opening script file: /work/maven/repository/.gem/bin/cucumber (No such file or directory)
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Java returned: 1
[INFO] ------------------------------------------------------------------------
[INFO] Trace
Java returned: 1
    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:87)
    at cuke4duke.mojo.CucumberMojo.execute(CucumberMojo.java:80)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Tue Sep 15 07:31:02 IDT 2009
[INFO] Final Memory: 14M/119M
[INFO] ------------------------------------------------------------------------

Problems adding custom formatters to features/support

I'm trying to add a custom formatter to my cuke4duke project following the instructions found here: http://wiki.github.com/aslakhellesoy/cucumber/custom-formatters

I'm adding a --format WikiFormatter argument and it when run it returns:
[WARNING] no such file to load -- wiki_formatter
[WARNING] Error creating formatter: WikiFormatter (LoadError)
[WARNING] file:/home/torbjorn/.m2/repository/org/jruby/jruby-complete/1.3.1/jruby-complete-1.3.1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require' [WARNING] file:/home/torbjorn/.m2/repository/org/jruby/jruby-complete/1.3.1/jruby-complete-1.3.1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire'
[WARNING] /home/torbjorn/.m2/repository/.gem/gems/polyglot-0.2.9/lib/polyglot.rb:70:in require' [WARNING] /home/torbjorn/.m2/repository/.gem/gems/cucumber-0.3.101/bin/../lib/cucumber/constantize.rb:14:inconstantize'
[WARNING] /home/torbjorn/.m2/repository/.gem/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/configuration.rb:94:in formatter_class' [WARNING] /home/torbjorn/.m2/repository/.gem/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/configuration.rb:77:inbuild_formatter_broadcaster'
[WARNING] /home/torbjorn/.m2/repository/.gem/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/configuration.rb:63:in map' [WARNING] /home/torbjorn/.m2/repository/.gem/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/configuration.rb:63:inbuild_formatter_broadcaster'
[WARNING] /home/torbjorn/.m2/repository/.gem/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/main.rb:51:in execute!' [WARNING] /home/torbjorn/.m2/repository/.gem/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/main.rb:23:inexecute'
[WARNING] /home/torbjorn/.m2/repository/.gem/gems/cucumber-0.3.101/bin/cucumber:9
[WARNING] /home/torbjorn/.m2/repository/.gem/gems/cucumber-0.3.101/bin/cucumber:19:in `load'
[WARNING] /home/torbjorn/.m2/repository/.gem/bin/cucumber:19

Seems like the files in features/support is not load into the classpath somehow.

-Dcucumber.installGems=true doesn't seem to install the gems properly

I'm using cuke4duke with a setup similar to the Spring example. When trying to execute a specification, I get the following error:

+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'cuke4duke'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - XXXXXXXXXXX:jar:1.0
[INFO]    task-segment: [cuke4duke:features]
[INFO] ------------------------------------------------------------------------
[INFO] [cuke4duke:features]
[INFO] Error opening script file: C:/Entwicklung/Repositories/Maven2/.gem/bin/cucumber (Das System kann den angegebenen Pfad nicht finden)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Cucumber failed: Java returned: 1
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Cucumber failed: Java returned: 1
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:580)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:513)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:483)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoFailureException: Cucumber failed: Java returned: 1
    at cuke4duke.mojo.CucumberMojo.execute(CucumberMojo.java:69)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
    ... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Fri Aug 14 00:19:32 CEST 2009
[INFO] Final Memory: 4M/9M
[INFO] ------------------------------------------------------------------------`

As you can see, I have configured a custom Maven repository location. I am using JRuby 1.3.0 under Windows Vista (if it makes a difference).

Neither the .gem directory nor any subdirectories get created. Precreating .gem inside the Maven repository doesn't help.

Make ScalaStepDefinition extend from AbstractStepDefinition

My cuke4duke master branch (used along with the cucumber master branch) has added support for a better usage formatter. This formatter reports all step definitions, and what steps that use them.

It also reports step definitions that aren't used.

Reporting what's not used relies on code in AbstractStepDefinition. ScalaStepDefinition should inherit from this in order to work with the support formatter. The following commit illustrates what needs to be done: 92fb52a

(Still too much of a Scala n00b to do it myself).

Guice fails when trying to instantiate anonymous and non-static inner classes in step classes

When a step class contains anonymous or inner classes, these classes get compiled to their proper .class files, e.g. BackendSteps$1.class
The Guice factory tries to instantiate those classes which is not possible.
I fixed this by wrapping the instantiation code in a try ... catch block, so that the Guice factory continues instead of cancelling.
The code is in my repository at http://github.com/nightscape/cuke4duke

Best regards
Martin

Add cucumberOpts to Maven mojo


/**
 * @parameter expression="${cucumber.cucumberOpts}"
 */
private String[] cucumberOpts;

....



if(cucumberOpts != null) {
            for (String opt : cucumberOpts) {
                allArgs.add(opt);
            }
        }

....


<configuration>
  <jrubyHome>...</jrubyHome>
  <cucumberOpts>
    <cucumberOpt>--language</cucumberOpt>
    <cucumberOpt>no</cucumberOpt>
    </cucumberOpts>
</configuration>

Implement hooks in cucumber_java

For Java developers, it would be much easier if cucumber_java provides hooks functionality , so that we can use hooks feature in java applications

Thanks,
Neema.

can't use multiline strings

I tried using a multiline string and got the follwing...

java.lang.IllegalArgumentException: Sorry, cuke4duke doesn't know how to convert a line 1
[INFO] line 2 (class org.jruby.RubyObject) to type class java.lang.String (NativeException)
[INFO] cuke4duke/internal/StringConverter.java:43:in `convertObject'

I have a fix at http://github.com/darrinholst/cuke4duke/commit/1004d466c34b02d6d2b5f0036478736a7907bb0d which does a String.valueOf instead of just casting to a String. Not sure if this is the right way, but it worked for me.

Use nailgun for faster startup

Currently uses ...ant.taskdefs.Java to lauch jruby-jvm. Should be refactored into something more flexible in order to i.e. run with nailgun, etc.

Suggestions for better lightweight class/jvm launchers?

Generate i18n Java annotations

This should be done with a splash of Rake and ERb. Oc already has some code for this to generate Scala tratis on his branch.

Run with JUnit

Kaare Nilsen suggested at the ROOTS conference that it should be possible to run scenarios as if they were JUnit tests. That would leverage existing tools like IDEs and build systems.

The idea:

@RunWith(CucumberJunit4Runner.class);
@Feature("features/jalla.feature") // optional - use convention if absent
public class JunitSpike {
  @Test
  public void mapsToScenario{};
}

These JUnit files could be generated

Groovy Example Fails

Just a straight "ant" fails with the following message:

Smokejumper-MBP:groovy robert$ ant
Buildfile: build.xml

compile-main:
[mkdir] Created dir: /Users/robert/dev/workspace/cuke4duke/examples/groovy/target/classes
[javac] Compiling 1 source file to /Users/robert/dev/workspace/cuke4duke/examples/groovy/target/classes

cucumber:
[mkdir] Created dir: /Users/robert/dev/workspace/cuke4duke/examples/groovy/target/junit-report
[java] Exception in thread "main" java.lang.NoClassDefFoundError: org/jruby/Main

BUILD FAILED
/Users/robert/dev/workspace/cuke4duke/examples/groovy/build.xml:22: Java returned: 1

Total time: 2 seconds

Didn't see any dependencies resolved, so I ran "ant install-deps". Got lots of noise, which ended with this:

[ivy:retrieve] .. (0kB)
[ivy:retrieve] [SUCCESSFUL ] com.thoughtworks.xstream#xstream;1.3.1!xstream.jar (1225ms)
[ivy:retrieve] :: resolution report :: resolve 3694ms :: artifacts dl 31719ms
[ivy:retrieve] :: evicted modules:
[ivy:retrieve] junit#junit;3.8.2 by [junit#junit;4.7] in [default]
[ivy:retrieve] junit#junit;3.8.1 by [junit#junit;4.7] in [default]
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 19 | 5 | 0 | 2 || 20 | 9 |
---------------------------------------------------------------------
[ivy:retrieve]
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve] module not found: cuke4duke#cuke4duke;0.1.8-SNAPSHOT
[ivy:retrieve] ==== cukes: tried
[ivy:retrieve] -- artifact cuke4duke#cuke4duke;0.1.8-SNAPSHOT!cuke4duke.jar:
[ivy:retrieve] http://cukes.info/maven/cuke4duke/cuke4duke/0.1.8-SNAPSHOT/cuke4duke-0.1.8-SNAPSHOT.jar
[ivy:retrieve] ==== codehaus: tried
[ivy:retrieve] -- artifact cuke4duke#cuke4duke;0.1.8-SNAPSHOT!cuke4duke.jar:
[ivy:retrieve] http://repository.codehaus.org/cuke4duke/cuke4duke/0.1.8-SNAPSHOT/cuke4duke-0.1.8-SNAPSHOT.jar
[ivy:retrieve] ==== ibiblio: tried
[ivy:retrieve] -- artifact cuke4duke#cuke4duke;0.1.8-SNAPSHOT!cuke4duke.jar:
[ivy:retrieve] http://repo1.maven.org/maven2/cuke4duke/cuke4duke/0.1.8-SNAPSHOT/cuke4duke-0.1.8-SNAPSHOT.jar
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: UNRESOLVED DEPENDENCIES ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: cuke4duke#cuke4duke;0.1.8-SNAPSHOT: not found
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :::: ERRORS
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve] unknown resolver default-mvn-repo
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

DRYer pom.xml files

The parent POM, cuke4duke POM and various example POMs have a fair bit of duplication. We should try to reduce some of this duplication - especially:

  • versions
  • scope

At the same time, we should be explicit about versions, but in as few places as possible. Not sure how to do this (don't understand maven well enough).

Automatically register step definitions annotated with @cuke4duke.Steps

The spring example has a steps.xml file that tells Spring to load all classes annotated with @cuke4duke.Steps. However, this only loads the classes, they aren't registered with the StepMother. This is required in order for step defs in those classes to be discovered automatically.

This should also work outside a Spring environment (e.g. when running with PicoContainer).

We need a way to automatically discover all classes annotated with @cuke4duke.Steps, and then invoke StepMother.registerClass for each of those. This is because @given etc are only discovered for classes that have previously been registerClass'ed. A quick google scan indicates that this is possible, but not trivial (it involves scanning the classpath and whatnot). Any better suggestions?

The test for this is to remove the register_class(Java::simple.WorldSteps) line in the Spring example's env.rb file.

diffHashes method in Table not working properly

UPDATED

I tried to use the diffHashes method of the Table class like this: http://gist.github.com/184345

When I run the steps I get this error:

 [INFO]     When I add a table               
 [INFO]       | a | b | b2 | a1 |
 [INFO]       | 1 | 2 |    |    |
 [INFO]       Tables were not identical (RuntimeError)
 [INFO]       features/demo.feature:13:in `When I add a table'

The last two columns are gray (surplus)

Pass proxy settings to gem for bootstrapping

Maven proxy setting are not passed to gem when bootstrapping using

mvn -Dcucumber.installGems=true cuke4duke:cucumber

I tried to set the environment variable http_proxy but this has no effect, at least on windows.

Table Diff doesn't work in black and white

When not using the colorer, maybe a diff should look like:

Then I should see only the following quote in the list     # public void com.gaic.quoter.steps.QuoteListSteps.iShouldSeeOnlyTheFollowingQuoteInQuoteList(cuke4duke.Table)
  | Quote Name | Date | Acres | Practice | Price Election | Coverage Level | Premium / Coverage |
  | QuoteName1 | 2010 | 1.00  | 002      |                |                |                    |

  But Was:
  | Quote Name | Date | Acres | Practice | Price Election | Coverage Level | Premium / Coverage |

Cucumber in Java doesn't actually exit correctly if daemon threads are running

The use of Kernel.exit in the cucumber executable script line 10 only seems to exit the jruby thread. In normal ruby this works because it stops the ruby vm. However in java, if there are server threads hanging around (say we started up jetty), then the cuke run will never end.

The ugly solution is to change the Kernel.exit to be java.lang.System.exit(failure ? 1 : 0)
Of course this doesn't work on normal ruby. I'd suggest that we defer to a library to shut down the system. And any individual language can implement it's hook as it sees fit.

For java this would be to override it with java.lang.System.exit which shuts down the whole JVM instead of just the ruby vm inside of the jvm.

If you agree to this approach, I will submit a patch.

cucumber_java muliple subclasses from a parent that has a @Before("") failing in spring / pico container

In my step definitions I need a WebClient for html unit , so I wondering what the best way to do this is,

I'm running the features inside of a spring container and I have a super abstract class that has a @before with a method

code at http://pastie.org/669991

then i get the following error message

http://pastie.org/669993

Am i doing something wrong in my design or is there something I am missing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.