Hi Roberto,
Thanks for your time. I am still facing same issue :( I guess some version
or configuration my machine is causing the problem.
Here are the steps i followed:
Downloaded the code.
Built stepdefs-0.0.1-SNAPSHOT.jar
Did a mvn install
Ran it
Please find the output of each command pasted below. Please correct me if i
am doing anything wrong.
******************************************************************************************************************************************************************************
*mvn install:install-file
-Dfile=/Users/Van/Downloads/sample/stepdefs-0.0.1-SNAPSHOT.jar
-DgroupId=org.agileware.cucumber -DartifactId=stepdefs
-Dversion=0.0.1-SNAPSHOT -Dpackaging=jar*
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @
standalone-pom ---
[INFO] Installing /Users/Van/Downloads/sample/stepdefs-0.0.1-SNAPSHOT.jar
to
/Users/Van/.m2/repository/org/agileware/cucumber/stepdefs/0.0.1-SNAPSHOT/stepdefs-0.0.1-SNAPSHOT.jar
[INFO] Installing
/var/folders/4d/hys7608d4b1_3p0zd9n0_pm8jp3v4w/T/mvninstall5662068565063637057.pom
to
/Users/Van/.m2/repository/org/agileware/cucumber/stepdefs/0.0.1-SNAPSHOT/stepdefs-0.0.1-SNAPSHOT.pom
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 0.386 s
[INFO] Finished at: 2015-10-10T18:04:44-07:00
[INFO] Final Memory: 7M/245M
[INFO]
------------------------------------------------------------------------
******************************************************************************************************************************************************************************
*mvn test -Dcucumber.options="--tags @xyz --glue org.agileware.stepdefs"
-Dtest=JUnitWrapper*
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building project 0.0.1-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
project ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ project ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources)
@ project ---
[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:3.1:testCompile (default-testCompile) @
project ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ project ---
[INFO] Surefire report directory:
/Users/Van/Downloads/sample/project/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.agileware.JUnitWrapper
1 Scenarios (1 undefined)
3 Steps (3 undefined)
0m0.000s
You can implement missing steps with the snippets below:
@Given("^something$")
public void something() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
@When("^an event occurs$")
public void an_event_occurs() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
@Then("^something else happens$")
public void something_else_happens() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
Tests run: 5, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 0.332 sec
Results :
Tests run: 5, Failures: 0, Errors: 0, Skipped: 4
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.492 s
[INFO] Finished at: 2015-10-10T20:02:07-07:00
[INFO] Final Memory: 9M/245M
[INFO]
------------------------------------------------------------------------
******************************************************************************************************************************************************************************
*mvn --version*
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1;
2014-12-14T09:29:23-08:00)
Maven home: /Users/Van/Documents/apache-maven-3.2.5
Java version: 1.7.0_71, vendor: Oracle Corporation
Java home:
/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"
******************************************************************************************************************************************************************************
Thanks,
Pavan
Post by Roberto Lo GiaccoPost by VanHi Roberto,
Every thing is same like mine. Not sure what is wrong here. Just for
re-confirmation, your JUnitWraper and Feature files are in one project and
Stepdefs are in a different jar correct?
Yes Pavan, if you download the file you will find the whole directory
structure and the poms as well. I build and install the stepdefs using one
POM and use the stepdefs in the other project. Obviously the stepdefs
project is a dependency of the features project.
The file I've attached is not a ZIP, but a 7Z, you can use 7Zip to open
it. I double checked and it can be downloaded and opened, the size is
correct as it contains a few text files only.
Post by VanPost by Roberto Lo GiaccoPost by VanHey Roberto,
I am sorry ... just saw your message. Still no luck :(
I am not able to download your attachment ... it shows just 1KB. Is it
possible to share the code in *JUnitWrapper?*
It shows 1kB because it is very small...
Anyway, this is my *very complex* JUnitWrapper
package org.agileware;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features="src/test/resources")
public class JUnitWrapper {
}
this is my feature file
Feature: feature description
@xyz
Scenario: test
Given something
When an event occurs
Then something else happens
and this is my StepDef
package org.agileware.stepdefs;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class StepDef {
@Given("something$")
public void given() {
System.out.println("Given");
}
@When("an event occurs")
public void when() {
System.out.println("When");
}
@Then("something else happens")
public void then() {
System.out.println("Then");
}
}
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to a topic in the
Google Groups "Cukes" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/cukes/Rd83aDHSgMA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.