I met a strange behaviour when created a standard Maven project in Eclipse and jdk1.7. The strange is that whet running a simpoe feature from the cukes examples:
Feature: Hello World
Scenario: Say hello
Given I have a hello app with "Howdy"
When I ask it to say hi
Then it should answer with "Howdy World"
and running 'mvn clean test' in the terminal, I got:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running RunCukesTest
You can implement missing steps with the snippets below:
@Given("^I have a hello app with \"([^\"]*)\"$")
public void I_have_a_hello_app_with(String arg1) throws Throwable {
// Express the Regexp above with the code you wish you had
throw new PendingException();
}
@When("^I ask it to say hi$")
public void I_ask_it_to_say_hi() throws Throwable {
// Express the Regexp above with the code you wish you had
throw new PendingException();
}
Feature: Hello World
Scenario: Say hello # com/hello/hello.feature:3
Given I have a hello app with "Howdy"
When I ask it to say hi When I ask it to say hi@SLTests run: 3, Failures: 0, Errors: 2, Skipped: 1, Time elapsed: 0.701 sec <<< FAILURE!
Results :
Tests in error:
Feature: Hello World: Index: 0, Size: 0
RunCukesTest: Index: 0, Size: 0
Tests run: 3, Failures: 0, Errors: 2, Skipped: 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.555s
[INFO] Finished at: Tue May 21 10:52:00 CEST 2013
[INFO] Final Memory: 12M/146M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test (default-test) on project jemmyfx: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/serge-mac/Development/eclipse_workspace/jemmyfx/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExceptionAs you see, Then step has not been parsed, is it normal ?
Here is my configuration details:
OS X 10.8.3
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: /usr/share/maven
Java version: 1.7.0_21, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.8.3", arch: "x86_64", family: "mac"
Any idea ? Thank you.