Running Cucumber project created with JAVA using ECLIPSE

60 views
Skip to first unread message

Styris

unread,
Oct 16, 2015, 6:36:04 PM10/16/15
to Selenium Users
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 Terminal. 
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".

@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!

Styris

unread,
Oct 16, 2015, 7:23:54 PM10/16/15
to Selenium Users
all of this is under src/main/java..

Krishnan Mahadevan

unread,
Oct 25, 2015, 8:56:58 AM10/25/15
to Selenium Users

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/e678c015-532d-44f1-b77b-701b1816e8a6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Kiran Edupuganti

unread,
Oct 25, 2015, 9:03:43 AM10/25/15
to seleniu...@googlegroups.com

I assume  maven configured perfectly , go to folder where  pom file  existing ,open command  prompt , execute this command "man clean compile test -X"

Regards,
Kiran  Edupuganti

Reply all
Reply to author
Forward
0 new messages