Discussion:
Running Cucumber project created with JAVA using ECLIPSE
(too old to reply)
Kashif BHATTI
2015-10-15 20:23:42 UTC
Permalink
Hello,

I have created an initial Cucumber Maven Project in ECLIPSE and the
eventual task that I have been asked to do is to be able to run it using
Maven from the command line. I have installed Maven..I also have my POM
file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
using the @Test annotation so not sure what annotation in Cucumber will be
used to run the POM file)

Can someone please tell me (would be greatly appreciated if someone just
could paste exactly what I need to put into the POM file that is missing).
Here is the POM file I used with my Cucumber MAVEN Project

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>


<groupId>com.cucumber</groupId>

<artifactId>cucumberProject</artifactId>

<version>0.0.1-SNAPSHOT</version>

<packaging>jar</packaging>


<name>cucumberProject</name>

<url>http://maven.apache.org</url>


<properties>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

</properties>


<dependencies>

<dependency>

<groupId>junit</groupId>

<artifactId>junit</artifactId>

<version>4.12</version>

</dependency>

<dependency>

<groupId>info.cukes</groupId>

<artifactId>cucumber-core</artifactId>

<version>1.2.4</version>

</dependency>

<dependency>

<groupId>info.cukes</groupId>

<artifactId>cucumber-java</artifactId>

<version>1.2.4</version>

</dependency>

<dependency>

<groupId>info.cukes</groupId>

<artifactId>cucumber-junit</artifactId>

<version>1.2.4</version>

</dependency>

<dependency>

<groupId>info.cukes</groupId>

<artifactId>cucumber-html</artifactId>

<version>0.2.3</version>

</dependency>

<dependency>

<groupId>info.cukes</groupId>

<artifactId>cucumber-jvm-deps</artifactId>

<version>1.0.5</version>

</dependency>

<dependency>

<groupId>net.masterthought</groupId>

<artifactId>cucumber-reporting</artifactId>

<version>0.4.0</version>

</dependency>

<dependency>

<groupId>info.cukes</groupId>

<artifactId>cucumber-testng</artifactId>

<version>1.2.4</version>

</dependency>

<dependency>

<groupId>info.cukes</groupId>

<artifactId>gherkin</artifactId>

<version>2.12.2</version>

</dependency>

<dependency>

<groupId>org.hamcrest</groupId>

<artifactId>hamcrest-all</artifactId>

<version>1.3</version>

</dependency>

<dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-java</artifactId>

<version>2.47.1</version>

</dependency>

<dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-server</artifactId>

<version>2.47.1</version>

</dependency>

<dependency>

<groupId>io.appium</groupId>

<artifactId>java-client</artifactId>

<version>3.2.0</version>

</dependency>

<dependency>

<groupId>org.testng</groupId>

<artifactId>testng</artifactId>

<version>6.9.6</version>

</dependency>

<dependency>

<groupId>org.apache.maven.surefire</groupId>

<artifactId>surefire-api</artifactId>

<version>2.18.1</version>

</dependency>

</dependencies>



</project>



Thanks
Fred Bricon
2015-10-15 20:35:14 UTC
Permalink
This is not really an m2e question, you should rather ask the Maven Users
list.

Anyways, first hit on google for "Cucumber Maven Project" :
http://blog.czeczotka.com/2014/07/22/cucumber-jvm-with-maven-in-minutes/
Post by Kashif BHATTI
Hello,
I have created an initial Cucumber Maven Project in ECLIPSE and the
eventual task that I have been asked to do is to be able to run it using
Maven from the command line. I have installed Maven..I also have my POM
file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
used to run the POM file)
Can someone please tell me (would be greatly appreciated if someone just
could paste exactly what I need to put into the POM file that is missing).
Here is the POM file I used with my Cucumber MAVEN Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cucumber</groupId>
<artifactId>cucumberProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumberProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</project>
Thanks
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
Kashif BHATTI
2015-10-16 19:00:44 UTC
Permalink
I thought this is the Maven Users list. I did take a look at what you sent.
However, when I right-click on the POM.xml it Builds successfully but does
not execute the Step Definition class. Here is what my Runner Class looks
like:

@RunWith(Cucumber.class)

@CucumberOptions(

features = "src/cucumber/",

glue={"src/cucumber/features"},

dryRun = true,

monochrome = true

)


public class CucumberRunner {


}



Here is the POM.xml

<build>

<plugins>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<version>3.3</version>

<configuration>

<encoding>UTF-8</encoding>

<source>1.8</source>

<target>1.8</target>

<compilerArgument>-Werror</compilerArgument>

</configuration>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-surefire-plugin</artifactId>

<version>2.18.1</version>

<dependencies>

<dependency>

<groupId>org.apache.maven.surefire</groupId>

<artifactId>surefire-junit47</artifactId>

<version>2.18.1</version>

</dependency>

</dependencies>

</plugin>

</plugins>

</build>


Please advise. Thanks
Post by Fred Bricon
This is not really an m2e question, you should rather ask the Maven Users
list.
http://blog.czeczotka.com/2014/07/22/cucumber-jvm-with-maven-in-minutes/
Post by Kashif BHATTI
Hello,
I have created an initial Cucumber Maven Project in ECLIPSE and the
eventual task that I have been asked to do is to be able to run it using
Maven from the command line. I have installed Maven..I also have my POM
file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
used to run the POM file)
Can someone please tell me (would be greatly appreciated if someone just
could paste exactly what I need to put into the POM file that is missing).
Here is the POM file I used with my Cucumber MAVEN Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cucumber</groupId>
<artifactId>cucumberProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumberProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</project>
Thanks
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
Matthew Piggott
2015-10-16 19:22:52 UTC
Permalink
This the m2e list, it is for the maven eclipse integration. The maven
users list is probably somewhere off maven.apache.org
Post by Kashif BHATTI
I thought this is the Maven Users list. I did take a look at what you
sent. However, when I right-click on the POM.xml it Builds successfully but
does not execute the Step Definition class. Here is what my Runner Class
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/cucumber/",
glue={"src/cucumber/features"},
dryRun = true,
monochrome = true
)
public class CucumberRunner {
}
Here is the POM.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Please advise. Thanks
Post by Fred Bricon
This is not really an m2e question, you should rather ask the Maven Users
list.
http://blog.czeczotka.com/2014/07/22/cucumber-jvm-with-maven-in-minutes/
Post by Kashif BHATTI
Hello,
I have created an initial Cucumber Maven Project in ECLIPSE and the
eventual task that I have been asked to do is to be able to run it using
Maven from the command line. I have installed Maven..I also have my POM
file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
used to run the POM file)
Can someone please tell me (would be greatly appreciated if someone just
could paste exactly what I need to put into the POM file that is missing).
Here is the POM file I used with my Cucumber MAVEN Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cucumber</groupId>
<artifactId>cucumberProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumberProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</project>
Thanks
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
Fred Bricon
2015-10-16 20:19:38 UTC
Permalink
I tried https://github.com/czeczotka/cucumber-jvm-maven and it works.

I suspect your class is not invoked because it's not suffixed by Test, as
in CucumberRunnerTest. See [1] for informations on how to include other
test classes.

[1]
https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html
Post by Matthew Piggott
This the m2e list, it is for the maven eclipse integration. The maven
users list is probably somewhere off maven.apache.org
Post by Kashif BHATTI
I thought this is the Maven Users list. I did take a look at what you
sent. However, when I right-click on the POM.xml it Builds successfully but
does not execute the Step Definition class. Here is what my Runner Class
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/cucumber/",
glue={"src/cucumber/features"},
dryRun = true,
monochrome = true
)
public class CucumberRunner {
}
Here is the POM.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Please advise. Thanks
Post by Fred Bricon
This is not really an m2e question, you should rather ask the Maven
Users list.
http://blog.czeczotka.com/2014/07/22/cucumber-jvm-with-maven-in-minutes/
Post by Kashif BHATTI
Hello,
I have created an initial Cucumber Maven Project in ECLIPSE and the
eventual task that I have been asked to do is to be able to run it using
Maven from the command line. I have installed Maven..I also have my POM
file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
used to run the POM file)
Can someone please tell me (would be greatly appreciated if someone
just could paste exactly what I need to put into the POM file that is
missing). Here is the POM file I used with my Cucumber MAVEN Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cucumber</groupId>
<artifactId>cucumberProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumberProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</project>
Thanks
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
Kashif BHATTI
2015-10-16 21:20:22 UTC
Permalink
Maybe it could be that. Right now I have a parent package "cucumber" which
has the Runner class "CucumberRunnerTest.java" and a child package which
has the StepDefinitions.java and the feature file "my feature.feature". I
just changed my POM and RunnerTestfiles to this now. I still cannot get the
StepDefintion class to execute..but the BUILD shows as success.

@CucumberOptions(

features = "src/cucumber/features/",

glue={"src/cucumber/"},

dryRun = false,

monochrome = true

)


public class CucumberRunnerTest {


}

=====================================


<build>

<plugins>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<version>3.3</version>

<configuration>

<encoding>UTF-8</encoding>

<source>1.8</source>

<target>1.8</target>

<compilerArgument>-Werror</compilerArgument>

</configuration>

</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-surefire-plugin</artifactId>

<version>2.18.1</version>

<dependencies>

<dependency>

<groupId>org.apache.maven.surefire</groupId>

<artifactId>surefire-junit47</artifactId>

<version>2.18.1</version>

</dependency>

</dependencies>

<configuration>

<includes>

<include>StepDefinitions1.java</include>

<include>CucumberRunnerTest.java</include>

</includes>

</configuration>

</plugin>

</plugins>

</build>



Thanks!
Post by Fred Bricon
I tried https://github.com/czeczotka/cucumber-jvm-maven and it works.
I suspect your class is not invoked because it's not suffixed by Test, as
in CucumberRunnerTest. See [1] for informations on how to include other
test classes.
[1]
https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html
Post by Matthew Piggott
This the m2e list, it is for the maven eclipse integration. The maven
users list is probably somewhere off maven.apache.org
Post by Kashif BHATTI
I thought this is the Maven Users list. I did take a look at what you
sent. However, when I right-click on the POM.xml it Builds successfully but
does not execute the Step Definition class. Here is what my Runner Class
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/cucumber/",
glue={"src/cucumber/features"},
dryRun = true,
monochrome = true
)
public class CucumberRunner {
}
Here is the POM.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Please advise. Thanks
Post by Fred Bricon
This is not really an m2e question, you should rather ask the Maven
Users list.
http://blog.czeczotka.com/2014/07/22/cucumber-jvm-with-maven-in-minutes/
Post by Kashif BHATTI
Hello,
I have created an initial Cucumber Maven Project in ECLIPSE and the
eventual task that I have been asked to do is to be able to run it using
Maven from the command line. I have installed Maven..I also have my POM
file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
used to run the POM file)
Can someone please tell me (would be greatly appreciated if someone
just could paste exactly what I need to put into the POM file that is
missing). Here is the POM file I used with my Cucumber MAVEN Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cucumber</groupId>
<artifactId>cucumberProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumberProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</project>
Thanks
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
Kashif BHATTI
2015-10-16 23:23:21 UTC
Permalink
all of this is under src/main/java..
Post by Kashif BHATTI
Maybe it could be that. Right now I have a parent package "cucumber" which
has the Runner class "CucumberRunnerTest.java" and a child package which
has the StepDefinitions.java and the feature file "my feature.feature". I
just changed my POM and RunnerTestfiles to this now. I still cannot get the
StepDefintion class to execute..but the BUILD shows as success.
@CucumberOptions(
features = "src/cucumber/features/",
glue={"src/cucumber/"},
dryRun = false,
monochrome = true
)
public class CucumberRunnerTest {
}
=====================================
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>StepDefinitions1.java</include>
<include>CucumberRunnerTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
Thanks!
Post by Fred Bricon
I tried https://github.com/czeczotka/cucumber-jvm-maven and it works.
I suspect your class is not invoked because it's not suffixed by Test, as
in CucumberRunnerTest. See [1] for informations on how to include other
test classes.
[1]
https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html
Post by Matthew Piggott
This the m2e list, it is for the maven eclipse integration. The maven
users list is probably somewhere off maven.apache.org
Post by Kashif BHATTI
I thought this is the Maven Users list. I did take a look at what you
sent. However, when I right-click on the POM.xml it Builds successfully but
does not execute the Step Definition class. Here is what my Runner Class
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/cucumber/",
glue={"src/cucumber/features"},
dryRun = true,
monochrome = true
)
public class CucumberRunner {
}
Here is the POM.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Please advise. Thanks
Post by Fred Bricon
This is not really an m2e question, you should rather ask the Maven
Users list.
http://blog.czeczotka.com/2014/07/22/cucumber-jvm-with-maven-in-minutes/
Post by Kashif BHATTI
Hello,
I have created an initial Cucumber Maven Project in ECLIPSE and the
eventual task that I have been asked to do is to be able to run it using
Maven from the command line. I have installed Maven..I also have my POM
file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
used to run the POM file)
Can someone please tell me (would be greatly appreciated if someone
just could paste exactly what I need to put into the POM file that is
missing). Here is the POM file I used with my Cucumber MAVEN Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cucumber</groupId>
<artifactId>cucumberProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumberProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</project>
Thanks
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
Ilko Iliev
2015-10-19 06:50:36 UTC
Permalink
you need @RunWith(Cucumber.class) on this class too - after that Run As
Junit Test should work:

@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty", "json:target/cucumber.json"})
public class CucumberTest {

}

I must say that all my tests are under src/test/java, if they are not
placed there I think you need to configure the surefire plugin to find
them. In Eclipse you can save a m2e Run configuration for mvn test for
example - this is (almost) the same as the mvn test called from the CLI.
And there is a cucumber plugin for eclipse available too[1], unfortunately
I have some troubles with its own Run configuration, but actually this has
nothing to do with maven or m2e. For all these settings and some advanced
topics I highly recommend you the Cucumber For Java book [2] or on
safaribooksonline. And of course the cucumber / bdd mailing lists at google
groups.

[1] https://github.com/cucumber/cucumber-eclipse
[2]
http://www.amazon.com/The-Cucumber-Java-Book-Behaviour-Driven/dp/1941222293
Post by Kashif BHATTI
all of this is under src/main/java..
Post by Kashif BHATTI
Maybe it could be that. Right now I have a parent package "cucumber"
which has the Runner class "CucumberRunnerTest.java" and a child package
which has the StepDefinitions.java and the feature file "my
feature.feature". I just changed my POM and RunnerTestfiles to this now. I
still cannot get the StepDefintion class to execute..but the BUILD shows as
success.
@CucumberOptions(
features = "src/cucumber/features/",
glue={"src/cucumber/"},
dryRun = false,
monochrome = true
)
public class CucumberRunnerTest {
}
=====================================
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>StepDefinitions1.java</include>
<include>CucumberRunnerTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
Thanks!
Post by Fred Bricon
I tried https://github.com/czeczotka/cucumber-jvm-maven and it works.
I suspect your class is not invoked because it's not suffixed by Test,
as in CucumberRunnerTest. See [1] for informations on how to include other
test classes.
[1]
https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html
Post by Matthew Piggott
This the m2e list, it is for the maven eclipse integration. The maven
users list is probably somewhere off maven.apache.org
Post by Kashif BHATTI
I thought this is the Maven Users list. I did take a look at what you
sent. However, when I right-click on the POM.xml it Builds successfully but
does not execute the Step Definition class. Here is what my Runner Class
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/cucumber/",
glue={"src/cucumber/features"},
dryRun = true,
monochrome = true
)
public class CucumberRunner {
}
Here is the POM.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Please advise. Thanks
Post by Fred Bricon
This is not really an m2e question, you should rather ask the Maven
Users list.
http://blog.czeczotka.com/2014/07/22/cucumber-jvm-with-maven-in-minutes/
Post by Kashif BHATTI
Hello,
I have created an initial Cucumber Maven Project in ECLIPSE and the
eventual task that I have been asked to do is to be able to run it using
Maven from the command line. I have installed Maven..I also have my POM
file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
used to run the POM file)
Can someone please tell me (would be greatly appreciated if someone
just could paste exactly what I need to put into the POM file that is
missing). Here is the POM file I used with my Cucumber MAVEN Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cucumber</groupId>
<artifactId>cucumberProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumberProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</
project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</project>
Thanks
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
Kashif BHATTI
2015-10-19 18:28:28 UTC
Permalink
I actually did have the @RunWith in there...just forgot to paste it here. Here
is what my Step Definition class upper portion looks like:

package cucumber.features;


import io.appium.java_client.MobileElement;

import io.appium.java_client.ios.IOSDriver;


import java.net.MalformedURLException;

import java.net.URL;

import java.util.concurrent.TimeUnit;


import org.openqa.selenium.By <http://org.openqa.selenium.by/>;

import org.openqa.selenium.remote.DesiredCapabilities;

import cucumber.api.java.Before;

import cucumber.api.java.en.Given;

import cucumber.api.java.en.Then;

import cucumber.api.java.en.When;


public class StepDefinitions1

{

private IOSDriver<MobileElement> driver;

@Before

.........


So please advise. Also in the earlier post I pasted my POM file. Does the
plugin/build portion look good to you ?



Thanks
Post by Kashif BHATTI
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty", "json:target/cucumber.json"})
public class CucumberTest {
}
I must say that all my tests are under src/test/java, if they are not
placed there I think you need to configure the surefire plugin to find
them. In Eclipse you can save a m2e Run configuration for mvn test for
example - this is (almost) the same as the mvn test called from the CLI.
And there is a cucumber plugin for eclipse available too[1], unfortunately
I have some troubles with its own Run configuration, but actually this has
nothing to do with maven or m2e. For all these settings and some advanced
topics I highly recommend you the Cucumber For Java book [2] or on
safaribooksonline. And of course the cucumber / bdd mailing lists at google
groups.
[1] https://github.com/cucumber/cucumber-eclipse
[2]
http://www.amazon.com/The-Cucumber-Java-Book-Behaviour-Driven/dp/1941222293
Post by Kashif BHATTI
all of this is under src/main/java..
Post by Kashif BHATTI
Maybe it could be that. Right now I have a parent package "cucumber"
which has the Runner class "CucumberRunnerTest.java" and a child package
which has the StepDefinitions.java and the feature file "my
feature.feature". I just changed my POM and RunnerTestfiles to this now. I
still cannot get the StepDefintion class to execute..but the BUILD shows as
success.
@CucumberOptions(
features = "src/cucumber/features/",
glue={"src/cucumber/"},
dryRun = false,
monochrome = true
)
public class CucumberRunnerTest {
}
=====================================
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>StepDefinitions1.java</include>
<include>CucumberRunnerTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
Thanks!
Post by Fred Bricon
I tried https://github.com/czeczotka/cucumber-jvm-maven and it works.
I suspect your class is not invoked because it's not suffixed by Test,
as in CucumberRunnerTest. See [1] for informations on how to include other
test classes.
[1]
https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html
Post by Matthew Piggott
This the m2e list, it is for the maven eclipse integration. The maven
users list is probably somewhere off maven.apache.org
Post by Kashif BHATTI
I thought this is the Maven Users list. I did take a look at what
you sent. However, when I right-click on the POM.xml it Builds successfully
but does not execute the Step Definition class. Here is what my Runner
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/cucumber/",
glue={"src/cucumber/features"},
dryRun = true,
monochrome = true
)
public class CucumberRunner {
}
Here is the POM.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Please advise. Thanks
Post by Fred Bricon
This is not really an m2e question, you should rather ask the Maven
Users list.
http://blog.czeczotka.com/2014/07/22/cucumber-jvm-with-maven-in-minutes/
Post by Kashif BHATTI
Hello,
I have created an initial Cucumber Maven Project in ECLIPSE and the
eventual task that I have been asked to do is to be able to run it using
Maven from the command line. I have installed Maven..I also have my POM
file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
used to run the POM file)
Can someone please tell me (would be greatly appreciated if someone
just could paste exactly what I need to put into the POM file that is
missing). Here is the POM file I used with my Cucumber MAVEN Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cucumber</groupId>
<artifactId>cucumberProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumberProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</
project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</project>
Thanks
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
Matthew Piggott
2015-10-19 18:48:39 UTC
Permalink
Perhaps you should find the cucumber plugin list or try the maven user
list. This list is intended for questions relating to the Maven Eclipse
plugin.
Post by Kashif BHATTI
package cucumber.features;
import io.appium.java_client.MobileElement;
import io.appium.java_client.ios.IOSDriver;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By <http://org.openqa.selenium.by/>;
import org.openqa.selenium.remote.DesiredCapabilities;
import cucumber.api.java.Before;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class StepDefinitions1
{
private IOSDriver<MobileElement> driver;
@Before
.........
So please advise. Also in the earlier post I pasted my POM file. Does the
plugin/build portion look good to you ?
Thanks
Post by Kashif BHATTI
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty", "json:target/cucumber.json"})
public class CucumberTest {
}
I must say that all my tests are under src/test/java, if they are not
placed there I think you need to configure the surefire plugin to find
them. In Eclipse you can save a m2e Run configuration for mvn test for
example - this is (almost) the same as the mvn test called from the CLI.
And there is a cucumber plugin for eclipse available too[1], unfortunately
I have some troubles with its own Run configuration, but actually this has
nothing to do with maven or m2e. For all these settings and some advanced
topics I highly recommend you the Cucumber For Java book [2] or on
safaribooksonline. And of course the cucumber / bdd mailing lists at google
groups.
[1] https://github.com/cucumber/cucumber-eclipse
[2]
http://www.amazon.com/The-Cucumber-Java-Book-Behaviour-Driven/dp/1941222293
Post by Kashif BHATTI
all of this is under src/main/java..
Post by Kashif BHATTI
Maybe it could be that. Right now I have a parent package "cucumber"
which has the Runner class "CucumberRunnerTest.java" and a child package
which has the StepDefinitions.java and the feature file "my
feature.feature". I just changed my POM and RunnerTestfiles to this now. I
still cannot get the StepDefintion class to execute..but the BUILD shows as
success.
@CucumberOptions(
features = "src/cucumber/features/",
glue={"src/cucumber/"},
dryRun = false,
monochrome = true
)
public class CucumberRunnerTest {
}
=====================================
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>StepDefinitions1.java</include>
<include>CucumberRunnerTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
Thanks!
Post by Fred Bricon
I tried https://github.com/czeczotka/cucumber-jvm-maven and it works.
I suspect your class is not invoked because it's not suffixed by Test,
as in CucumberRunnerTest. See [1] for informations on how to include other
test classes.
[1]
https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html
On Fri, Oct 16, 2015 at 3:22 PM, Matthew Piggott <
Post by Matthew Piggott
This the m2e list, it is for the maven eclipse integration. The
maven users list is probably somewhere off maven.apache.org
Post by Kashif BHATTI
I thought this is the Maven Users list. I did take a look at what
you sent. However, when I right-click on the POM.xml it Builds successfully
but does not execute the Step Definition class. Here is what my Runner
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/cucumber/",
glue={"src/cucumber/features"},
dryRun = true,
monochrome = true
)
public class CucumberRunner {
}
Here is the POM.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Please advise. Thanks
Post by Fred Bricon
This is not really an m2e question, you should rather ask the Maven
Users list.
http://blog.czeczotka.com/2014/07/22/cucumber-jvm-with-maven-in-minutes/
On Thu, Oct 15, 2015 at 4:23 PM, Kashif BHATTI <
Post by Kashif BHATTI
Hello,
I have created an initial Cucumber Maven Project in ECLIPSE and
the eventual task that I have been asked to do is to be able to run it
using Maven from the command line. I have installed Maven..I also have my
POM file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
used to run the POM file)
Can someone please tell me (would be greatly appreciated if
someone just could paste exactly what I need to put into the POM file that
is missing). Here is the POM file I used with my Cucumber MAVEN Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cucumber</groupId>
<artifactId>cucumberProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumberProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</
project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</project>
Thanks
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
Ilko Iliev
2015-10-19 20:42:40 UTC
Permalink
I agree - moreover you've posted already on the cucumber ML, so could you
please stay there as all these stuff has nothing to do with m2e
Post by Matthew Piggott
Perhaps you should find the cucumber plugin list or try the maven user
list. This list is intended for questions relating to the Maven Eclipse
plugin.
Post by Kashif BHATTI
package cucumber.features;
import io.appium.java_client.MobileElement;
import io.appium.java_client.ios.IOSDriver;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By <http://org.openqa.selenium.by/>;
import org.openqa.selenium.remote.DesiredCapabilities;
import cucumber.api.java.Before;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class StepDefinitions1
{
private IOSDriver<MobileElement> driver;
@Before
.........
So please advise. Also in the earlier post I pasted my POM file. Does the
plugin/build portion look good to you ?
Thanks
Post by Kashif BHATTI
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty", "json:target/cucumber.json"})
public class CucumberTest {
}
I must say that all my tests are under src/test/java, if they are not
placed there I think you need to configure the surefire plugin to find
them. In Eclipse you can save a m2e Run configuration for mvn test for
example - this is (almost) the same as the mvn test called from the CLI.
And there is a cucumber plugin for eclipse available too[1], unfortunately
I have some troubles with its own Run configuration, but actually this has
nothing to do with maven or m2e. For all these settings and some advanced
topics I highly recommend you the Cucumber For Java book [2] or on
safaribooksonline. And of course the cucumber / bdd mailing lists at google
groups.
[1] https://github.com/cucumber/cucumber-eclipse
[2]
http://www.amazon.com/The-Cucumber-Java-Book-Behaviour-Driven/dp/1941222293
Post by Kashif BHATTI
all of this is under src/main/java..
Post by Kashif BHATTI
Maybe it could be that. Right now I have a parent package "cucumber"
which has the Runner class "CucumberRunnerTest.java" and a child package
which has the StepDefinitions.java and the feature file "my
feature.feature". I just changed my POM and RunnerTestfiles to this now. I
still cannot get the StepDefintion class to execute..but the BUILD shows as
success.
@CucumberOptions(
features = "src/cucumber/features/",
glue={"src/cucumber/"},
dryRun = false,
monochrome = true
)
public class CucumberRunnerTest {
}
=====================================
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>StepDefinitions1.java</include>
<include>CucumberRunnerTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
Thanks!
Post by Fred Bricon
I tried https://github.com/czeczotka/cucumber-jvm-maven and it works.
I suspect your class is not invoked because it's not suffixed by
Test, as in CucumberRunnerTest. See [1] for informations on how to include
other test classes.
[1]
https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html
On Fri, Oct 16, 2015 at 3:22 PM, Matthew Piggott <
Post by Matthew Piggott
This the m2e list, it is for the maven eclipse integration. The
maven users list is probably somewhere off maven.apache.org
Post by Kashif BHATTI
I thought this is the Maven Users list. I did take a look at what
you sent. However, when I right-click on the POM.xml it Builds successfully
but does not execute the Step Definition class. Here is what my Runner
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/cucumber/",
glue={"src/cucumber/features"},
dryRun = true,
monochrome = true
)
public class CucumberRunner {
}
Here is the POM.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Please advise. Thanks
Post by Fred Bricon
This is not really an m2e question, you should rather ask the
Maven Users list.
http://blog.czeczotka.com/2014/07/22/cucumber-jvm-with-maven-in-minutes/
On Thu, Oct 15, 2015 at 4:23 PM, Kashif BHATTI <
Post by Kashif BHATTI
Hello,
I have created an initial Cucumber Maven Project in ECLIPSE and
the eventual task that I have been asked to do is to be able to run it
using Maven from the command line. I have installed Maven..I also have my
POM file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
used to run the POM file)
Can someone please tell me (would be greatly appreciated if
someone just could paste exactly what I need to put into the POM file that
is missing). Here is the POM file I used with my Cucumber MAVEN Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cucumber</groupId>
<artifactId>cucumberProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumberProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</
project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</project>
Thanks
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
Kashif BHATTI
2015-10-19 20:46:25 UTC
Permalink
OK fine. I posted there about 3-4 days ago and so far have not received a
single response. I guess I will have to try my luck to see if anyone cares
to help =).


Thanks.
Post by Ilko Iliev
I agree - moreover you've posted already on the cucumber ML, so could you
please stay there as all these stuff has nothing to do with m2e
Post by Matthew Piggott
Perhaps you should find the cucumber plugin list or try the maven user
list. This list is intended for questions relating to the Maven Eclipse
plugin.
Post by Kashif BHATTI
package cucumber.features;
import io.appium.java_client.MobileElement;
import io.appium.java_client.ios.IOSDriver;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By <http://org.openqa.selenium.by/>;
import org.openqa.selenium.remote.DesiredCapabilities;
import cucumber.api.java.Before;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class StepDefinitions1
{
private IOSDriver<MobileElement> driver;
@Before
.........
So please advise. Also in the earlier post I pasted my POM file. Does
the plugin/build portion look good to you ?
Thanks
Post by Kashif BHATTI
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty", "json:target/cucumber.json"})
public class CucumberTest {
}
I must say that all my tests are under src/test/java, if they are not
placed there I think you need to configure the surefire plugin to find
them. In Eclipse you can save a m2e Run configuration for mvn test for
example - this is (almost) the same as the mvn test called from the CLI.
And there is a cucumber plugin for eclipse available too[1], unfortunately
I have some troubles with its own Run configuration, but actually this has
nothing to do with maven or m2e. For all these settings and some advanced
topics I highly recommend you the Cucumber For Java book [2] or on
safaribooksonline. And of course the cucumber / bdd mailing lists at google
groups.
[1] https://github.com/cucumber/cucumber-eclipse
[2]
http://www.amazon.com/The-Cucumber-Java-Book-Behaviour-Driven/dp/1941222293
Post by Kashif BHATTI
all of this is under src/main/java..
Post by Kashif BHATTI
Maybe it could be that. Right now I have a parent package "cucumber"
which has the Runner class "CucumberRunnerTest.java" and a child package
which has the StepDefinitions.java and the feature file "my
feature.feature". I just changed my POM and RunnerTestfiles to this now. I
still cannot get the StepDefintion class to execute..but the BUILD shows as
success.
@CucumberOptions(
features = "src/cucumber/features/",
glue={"src/cucumber/"},
dryRun = false,
monochrome = true
)
public class CucumberRunnerTest {
}
=====================================
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>StepDefinitions1.java</include>
<include>CucumberRunnerTest.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
Thanks!
Post by Fred Bricon
I tried https://github.com/czeczotka/cucumber-jvm-maven and it works.
I suspect your class is not invoked because it's not suffixed by
Test, as in CucumberRunnerTest. See [1] for informations on how to include
other test classes.
[1]
https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html
On Fri, Oct 16, 2015 at 3:22 PM, Matthew Piggott <
Post by Matthew Piggott
This the m2e list, it is for the maven eclipse integration. The
maven users list is probably somewhere off maven.apache.org
Post by Kashif BHATTI
I thought this is the Maven Users list. I did take a look at what
you sent. However, when I right-click on the POM.xml it Builds successfully
but does not execute the Step Definition class. Here is what my Runner
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/cucumber/",
glue={"src/cucumber/features"},
dryRun = true,
monochrome = true
)
public class CucumberRunner {
}
Here is the POM.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Please advise. Thanks
Post by Fred Bricon
This is not really an m2e question, you should rather ask the
Maven Users list.
http://blog.czeczotka.com/2014/07/22/cucumber-jvm-with-maven-in-minutes/
On Thu, Oct 15, 2015 at 4:23 PM, Kashif BHATTI <
Post by Kashif BHATTI
Hello,
I have created an initial Cucumber Maven Project in ECLIPSE and
the eventual task that I have been asked to do is to be able to run it
using Maven from the command line. I have installed Maven..I also have my
POM file but I have absolutely no idea how to get Maven test running from
command line Termina (I know with TestNG you can have an xml file
configured into the POM xml and then run it. With TestNG it usually runs by
used to run the POM file)
Can someone please tell me (would be greatly appreciated if
someone just could paste exactly what I need to put into the POM file that
is missing). Here is the POM file I used with my Cucumber MAVEN Project
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cucumber</groupId>
<artifactId>cucumberProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumberProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</
project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-api</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
</project>
Thanks
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users
Loading...