ponto, execute o comando "mvn test". Apos sua execucao, e caso as bibliotecas ja estejam no repositorio local padrao (~/.m2/repository), uma saida semelhante a esta devera ser gerada:[INFO] Scanning for projects...[INFO] [INFO] ------------------------------------------------------------------------[INFO] Building cucumber-jvm/HelloWorld 1.0[INFO] ------------------------------------------------------------------------[INFO] [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ cucumber-jvm-helloworld ---[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent![INFO] skip non existing resourceDirectory /private/tmp/cucumber-jvm-helloworld/src/main/resources[INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ cucumber-jvm-helloworld ---[INFO] No sources to compile[INFO] [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ cucumber-jvm-helloworld ---[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent![INFO] Copying 1 resource[INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ cucumber-jvm-helloworld ---[INFO] Compiling 1 source file to /private/tmp/cucumber-jvm-helloworld/target/test-classes[INFO] [INFO] --- maven-surefire-plugin:2.12.2:test (default-test) @ cucumber-jvm-helloworld ---[INFO] Surefire report directory: /private/tmp/cucumber-jvm-helloworld/target/surefire-reports------------------------------------------------------- T E S T S-------------------------------------------------------Running com.ladoservidor.cucumber.helloworld.RunCukesTestYou 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();}@Then("^it should answer with \"([^\"]*)\"$")public void it_should_answer_with(String arg1) throws Throwable { // Express the Regexp above with the code you wish you had throw new PendingException();}Feature: Hello World Scenario: Say hello # com/ladoservidor/cucumber/helloworld/helloworld.feature:3 Given I have a hello app with "Hello" When I ask it to say hi Then it should answer with "Hello World"Tests run: 5, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 0.719 secResults :Tests run: 5, Failures: 0, Errors: 0, Skipped: 4[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 3.270s[INFO] Finished at: Sun Apr 07 20:58:33 BRT 2013[INFO] Final Memory: 11M/143M[INFO] ------------------------------------------------------------------------Veja que o Cucumber interpretou o conteudo do arquivo de funcionalidade existente (.feature) e sugeriu como deveriamos iniciar a implementacao dos passos definidos no cenario descrito (ele sugere isso criando metodos anotados com @Given, @When e @Then). Observe, tambem, a estrutura do diretorio target criada apos a execucao do "mvn test". Perceba que um relatorio com a execucao de um cenario foi gerado no diretorio configurado (cucumber-html-report).target cucumber-html-report formatter.js index.html jquery-1.8.2.min.js report.js style.css cucumber-json-report.json generated-test-sources test-annotations surefire-reports TEST-com.ladoservidor.cucumber.helloworld.RunCukesTest.xml test-classes com ladoservidor cucumber helloworld RunCukesTest.class helloworld.feature9 directories, 9 filesNossa proxima tarefa sera, entao, criar um codigo com a definicao dos passos que deveremos implementar para um dado cenario. Seguiremos a sugestao do Cucumber para o nome dos metodos e para o conteudo das anotacoes. Mas, faremos nossa implementacao inicial dos metodos conforme o codigo a seguir (mais uma vez, copie e cole os comandos abaixo em teu shell):cat > $d/HelloStepdefs.java <<'EOF'package com.ladoservidor.cucumber.helloworld;import cucumber.api.java.en.Given;import cucumber.api.java.en.Then;import cucumber.api.java.en.When;import static org.junit.Assert.assertEquals;public class HelloStepdefs { private Hello hello; private String hi; @Given("^I have a hello app with \"([^\"]*)\"$") public void I_have_a_hello_app_with(String greeting) { hello = new Hello(greeting); } @When("^I ask it to say hi$") public void I_ask_it_to_say_hi() { hi = hello.sayHi(); } @Then("^it should answer with \"([^\"]*)\"$") public void it_should_answer_with(String expectedHi) { assertEquals(expectedHi, hi); }}EOFA classe criada (com.ladoservidor.cucumber.helloworld.HelloStepdefs) faz a implementacao dos passos definidos no cenario especificado (Say hello). Observe que, na implementacao do metodo anotado com